PORTFOLIO THEORY with MATRIX ALGEBRA using Python: OPTIMIZATION [Part II]

Поделиться
HTML-код
  • Опубликовано: 21 сен 2024

Комментарии • 34

  • @trevortrevor5419
    @trevortrevor5419 Год назад +3

    I think a part 3 doing a further dive into the UW paper and Markowitz portfolio theory with Python would be a valuable video.
    Particularly, optimizing the portfolio to minimize risk for a desired return level. Not too much of an extension from what you presented, but I’m always pleasantly surprised at the new takes I get on how to tackle some of these problems when I watch your videos.
    These two videos felt like you’re branching out a bit more than usual from implementing different TA strats. I personally loved them and hope to see more in the future!

  • @anvaravazbekov8786
    @anvaravazbekov8786 Год назад +8

    Very informative. Keep on going with this type of topics. Much more interesting than crypto strategies

    • @Algovibes
      @Algovibes  Год назад

      I actually started with rather empirical/quantitative finance topics 😁 But I will try to keep a balanced mixture of both. Thanks a lot for your feedback anyways!

  • @Mvobrito
    @Mvobrito Год назад +2

    I think it would be a great exercise trying to optimize the lookback period such that we have the best prediction for the future returns and future covariances.
    If we are rebalancing the portfolio every month (and this period can be optimized as well), maybe the covariance matrix of the past 6 months is the optimal predictor for the covariance matrix of the next month.
    Same thing for future returns, but here we can combine, 3, 6, 9, 12 momentum, etc.

  • @MrDavidleitch
    @MrDavidleitch Год назад +1

    outstandingly useful. Although I have retired from investment banking I will use these techniques to find the optimum(best sharpe ratio) wind and solar quantity of MW per fuel and zone for a portfolio of renewable energy zones in Australia using 30 years of forecast half hourly capacity factors for wind and solar for each zone.

    • @Algovibes
      @Algovibes  Год назад

      Sounds very interesting! Thanks a lot for your comment and sharing a real world application of this. Appreciate it!

  • @theWSt
    @theWSt Год назад +1

    Unbelievable, when I learned these matrix operations at school and university, I thought I would never need it. But you nicely presented this helpful algorithm, thx for the video!

    • @Algovibes
      @Algovibes  Год назад +1

      Haha :-) Having a good algebra foundation is key at least in all quantitative focused jobs.
      I am actually using those concepts nearly everyday.

  • @rraul
    @rraul Год назад +4

    Premium content! Thanks and applauses 👏👏👏

    • @Algovibes
      @Algovibes  Год назад +1

      Thanks buddy. Appreciate your long term support every time!

  • @YZhou-g5q
    @YZhou-g5q Год назад +1

    I appreciate your effort, can't wait for more contents of this kind.

    • @Algovibes
      @Algovibes  Год назад

      Thanks buddy, appreciate your comment!

  • @WorldWideSk8boarding
    @WorldWideSk8boarding Год назад +1

    incredible videos

  • @MrDavidleitch
    @MrDavidleitch Год назад

    Actually I do have a question and I am no expert on matrices, in the part 1 video it was noted that for the variance the correct formula transposed the weights W.T.(return.cov()).dot(W) ** 5 but in this video where you calculate the Sharpe ratio the transpose is not mentioned. I get it doesn't matter for an equal weight portfolio but when running the solver shouldn't it use the transpose?

    • @Algovibes
      @Algovibes  Год назад

      Sorry David for the late reply. I touched this in the first part. Doesn't make a difference. Reason behind that is the structure of the numpy array.

  • @karthickmurugan8478
    @karthickmurugan8478 Год назад +1

    Thanks for your valuable content🫡

    • @Algovibes
      @Algovibes  Год назад +1

      Very welcome :-) Thanks for watching and leaving a comment.

  • @harsh2782
    @harsh2782 9 месяцев назад

    if my portfolio is supposed to be equally weighted how can I have no short-sell constraints?

  • @randomvidsyt671
    @randomvidsyt671 Год назад +1

    Question, just curious, where did you learn and what books did you read to get to this level of programming & data science skill?

    • @Algovibes
      @Algovibes  Год назад

      Sure man, I am talking about my background here:
      ruclips.net/video/qCZiENV83rE/видео.html
      Video is roughly 2 years old but since then I just climbed the corporate ladder a bit further 😛

    • @randomvidsyt671
      @randomvidsyt671 Год назад +1

      @@Algovibes yo you replied what a chad

  • @arunkamath
    @arunkamath Год назад +1

    Hi @Algovibes, I have one strategy but I need to check it for past profit/loss. I tried creating a python script to test it out but I wasn't successful. How do I send the strategy to you so that you can make a video? It is based on fibonacci. I saw the videos on this in nifty. However, since crypto is 24/7 there are certain challenges as compared to those videos.

    • @Algovibes
      @Algovibes  Год назад

      Sure! Just drop me a mail with the exact strategy.

    • @arunkamath
      @arunkamath Год назад

      @@Algovibes what's your email. Yt find out in your description

  • @ArmorrYT
    @ArmorrYT Год назад +1

    How is it that the equal weighted portfolio is outperforming optimized in all parameters?
    Shouldn't the optimized one take the equal weighted then? What am I missing on?

    • @eugenelee9826
      @eugenelee9826 Год назад

      That is because he was optimizing for Sharpe ratio (highest risk adjusted returns) not absolute performance.

    • @ArmorrYT
      @ArmorrYT Год назад

      @@eugenelee9826 the sharpe ratio was also lesser right?

    • @eugenelee9826
      @eugenelee9826 Год назад +1

      @@ArmorrYT That is because he split the dataset into training and test. Weights were optimized from training data set only and subsequently backtested against the test dataset which produced lower sharpe vs the equal weight.

    • @Algovibes
      @Algovibes  Год назад

      You are right that when taking the whole dataset into account you could never get a better Sharpe compared to the equal weighted when optimizing (well technically if the equal weighted is the optimal portfolio).
      What I wanted to show is that when you simulate a situation where you set up an optimal portfolio and hold that portfolio with the optimized weights you aren't necessarily getting a better risk adjusted return.
      Or in short: Exactly as @eugeneleee9826 said.

    • @ArmorrYT
      @ArmorrYT Год назад +1

      I somehow seem to have missed the train test split in between. On me

  • @rollinas1
    @rollinas1 Год назад +1

    as an MBA student, I find your videos too informative. It will be putting us out of business lol

    • @Algovibes
      @Algovibes  Год назад

      Don't worry about that! Well I mean you are already extending your horizon watching these kinds of videos which is the right attitude to basically succeed in any field.

    • @rollinas1
      @rollinas1 Год назад +1

      @@Algovibes keep doing what you are doing. This is great content.