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!
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!
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.
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.
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!
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?
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 😛
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.
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?
@@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.
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.
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.
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!
Very informative. Keep on going with this type of topics. Much more interesting than crypto strategies
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!
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.
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.
Sounds very interesting! Thanks a lot for your comment and sharing a real world application of this. Appreciate it!
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!
Haha :-) Having a good algebra foundation is key at least in all quantitative focused jobs.
I am actually using those concepts nearly everyday.
Premium content! Thanks and applauses 👏👏👏
Thanks buddy. Appreciate your long term support every time!
I appreciate your effort, can't wait for more contents of this kind.
Thanks buddy, appreciate your comment!
incredible videos
thanks a lot buddy
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?
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.
Thanks for your valuable content🫡
Very welcome :-) Thanks for watching and leaving a comment.
if my portfolio is supposed to be equally weighted how can I have no short-sell constraints?
Question, just curious, where did you learn and what books did you read to get to this level of programming & data science skill?
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 😛
@@Algovibes yo you replied what a chad
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.
Sure! Just drop me a mail with the exact strategy.
@@Algovibes what's your email. Yt find out in your description
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?
That is because he was optimizing for Sharpe ratio (highest risk adjusted returns) not absolute performance.
@@eugenelee9826 the sharpe ratio was also lesser right?
@@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.
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.
I somehow seem to have missed the train test split in between. On me
as an MBA student, I find your videos too informative. It will be putting us out of business lol
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.
@@Algovibes keep doing what you are doing. This is great content.