Covariance and Correlation Matrix of stock returns with Python

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ต.ค. 2024

ความคิดเห็น • 26

  • @vedavyas8496
    @vedavyas8496 3 ปีที่แล้ว +2

    Thankyou for noticing Indian viewers. Love from INDIA...

    • @Algovibes
      @Algovibes  3 ปีที่แล้ว +2

      Sure! :-) I have a video building a momentum trading strategy with Indian stocks. Might be interesting for you: th-cam.com/video/YIsKSQh1xpY/w-d-xo.html
      Love ❤️ back to India. We are with you in these times!

  • @bryan-9742
    @bryan-9742 2 ปีที่แล้ว +2

    I wonder if you could show how to denoise the matrix perhaps? Via deprados work with Wiltshire
    Matrices? That’s be great to see on a
    Pandas data frame matrix. Love your videos

    • @Algovibes
      @Algovibes  2 ปีที่แล้ว

      Thanks a lot mate. Do you have any more context / resources on your request? Sound's interesting.

  • @markk4203
    @markk4203 3 ปีที่แล้ว +1

    It was on 42 likes... I liked it anyway. :) Thanks for doing these!

  • @maxguy3692
    @maxguy3692 2 ปีที่แล้ว +1

    DON'T TRY THIS HARD TO CHANGE UR INDIAN ACCENT,YOUR CONTENT QUALITY IS AWESOME

    • @Algovibes
      @Algovibes  2 ปีที่แล้ว +1

      thx buddy, I will NEVER change my Indian accent!

  • @revenge9431
    @revenge9431 2 ปีที่แล้ว +1

    what libraries are these functions .cov() & .var() etc. part of? numpy or the datareader?
    I also noticed that you are not installing yfinance. It appears that datareader has this already built in function?
    thanks, amazing video like always

    • @Algovibes
      @Algovibes  2 ปีที่แล้ว

      Pandas. And numpy under the hood. Thanks a lot for your kind words man.

  • @pitlac197
    @pitlac197 3 ปีที่แล้ว +1

    Hi great video - is it possible to create a correlation matrix for specific dates only - for example AAPL correlation with GOOG on 19th April and 22nd July only etc

    • @Algovibes
      @Algovibes  3 ปีที่แล้ว

      Thanks buddy. Yes that's possible. After calculating the returns you are filtering the data frame for the date and then apply the corr function.

  • @suns1953
    @suns1953 2 ปีที่แล้ว +1

    thank you

    • @Algovibes
      @Algovibes  2 ปีที่แล้ว +1

      Thanks for watching :-)

  • @Young_Santana808
    @Young_Santana808 3 ปีที่แล้ว +1

    Thanks alot

    • @Algovibes
      @Algovibes  3 ปีที่แล้ว

      Welcome :-) Thanks for watching!

  • @erenselman6873
    @erenselman6873 2 ปีที่แล้ว +1

    Hey Great Video!
    Is it possible to generate a portfolio of for example 5 assets out of 20 assets. But the 5 assets are in combination the leastest correlated ones?

    • @Algovibes
      @Algovibes  2 ปีที่แล้ว

      Thanks mate,
      yes, that's definitely possible.
      Efficient frontier could also be interesting for you btw:
      th-cam.com/video/mJTrQfzr0R4/w-d-xo.html

    • @erenselman6873
      @erenselman6873 2 ปีที่แล้ว +1

      @@Algovibes As I can see, you work with weights there. I know this. But I'm speaking about selecting Assets out of a Universe of Assets. After that, it would make sense to speak about weighing or Portfolio optimization.

    • @Algovibes
      @Algovibes  2 ปีที่แล้ว

      @@erenselman6873 Sounds like simply screening for the least correlated ones or am I getting you wrong?

  • @enriquegallar7805
    @enriquegallar7805 2 ปีที่แล้ว +1

    Why pct_change and not log returns? Does it make sense to evaluate monthly and compare month to month evolution? Are there any libraries to animate these results?

    • @Algovibes
      @Algovibes  2 ปีที่แล้ว

      you can use log returns... I just didn't here. Regarding the second question: Can you elaborate what you want to animate?

  • @maydum8438
    @maydum8438 4 ปีที่แล้ว

    Please include the code file(s) at the description. Thanks!

    • @Algovibes
      @Algovibes  4 ปีที่แล้ว

      Thanks for watching! :) Sure, I will in the near future. Kindly asking for you patience until then.

  • @aksingh11
    @aksingh11 2 ปีที่แล้ว +1

    excellent video - running into an error /usr/local/lib/python3.7/dist-packages/pandas_datareader/base.py:272: SymbolWarning: Failed to read symbol: 'ES=F', replacing with NaN.
    warnings.warn(msg.format(sym), SymbolWarning)
    ---------------------------------------------------------------------------
    RemoteDataError Traceback (most recent call last)
    in ()
    ----> 1 df = reader.get_data_yahoo(porti,start,end)

    • @Algovibes
      @Algovibes  2 ปีที่แล้ว +1

      Thanks man! Probably just a wrong ticker name. Can you double check?

    • @aksingh11
      @aksingh11 2 ปีที่แล้ว

      @@Algovibes its happening with multiple tickers (using google colab btw , will that make a difference ?)