Glad I could help! To get directly connected with me and discuss your projects with me and other like minded people, you may consider joining my Patreon Exclusive Community: www.patreon.com/fpritvik
Do we can use efficient Frontier in real life scenario? if yes then How Can we take care of the assumption that returns are normally distributed? And if there is any other more effective way to find out optimum Risk return, considering returns are not normally distributed.
You have a valid point. Returns are not normally distributed... they are negatively skewed. In order to solve this problem (at least partially), analysts use Black-Litterman model to incorporate manager's opinions as well.
Can we take returns data and convert it into normal Distribution and then use efficient frontier? Will it be more effective or won't work? And Thanks for replying 😊
Hi Ritvik, a great tutorial, thankyou! Could a constraint be applied here that would return a frontier for only positive holdings (no shorts)? I'm assuming I'd have to join the Sharpe ratios to a DataFrame that sums the stock weights from WeightA and WeightB, and then eliminate rows with values
It's not a stupid question as all. @ is used to do matrix multiplication. Suppose you have 2 matrices and want to do matrix/vector multiplication, then we use @. You remember MMULT function in Excel? It is exactly the same in Python. Please let me know if you understood. :)
Can anybody give me the code of the last part that is CML, as I am a student of finance but learning python. Ritvik sir please make more such videos. Love it, thank you. 👍
@@FinancialProgrammingwithRitvik On finding the best optimisation of risky portfolio with respect to return and portfolio from 10 companies to 5 companies; on which basis should the 5 companies must be chosen as fit for best riskier optimisation asset sir..
We get nan because we are dividing present day's price with last day price and for the first row there's no last day price available. To understand, you can try it on MS excel, it will throw a #NA there.
When we have more than 2 stocks in the portfolio, how to come with portfolio weights (with both positive and negative combinations)? let's say, 7 stocks and 5000 portfolio.
Interesting comment and a very good question. Swati, The closing price of a stock is the price of that stock at the close of the trading day. The adjusted closing price is a more complex analysis that uses the closing price as a starting point, but it takes into account factors such as dividends, stock splits, and new stock offerings to determine a value. Mostly, they are the same as other factors don't occur frequently.
@@swatityagi222 It's already present in my Google Drive. You can get a free access on my google drive by following steps mentioned on my RUclips Channel banner. But this service is only for my subscribers.
@@FinancialProgrammingwithRitvik I am starting to program in python and so far I have done the portfolio in excel. I have difficulty programming the line and including it in the graph.
@@camfvc I have uploaded the code in my Google drive. I recommend you to copy paste it and then run line by line to understand/decode the code. Let me know if it works for you.
@@FinancialProgrammingwithRitvik I don't have access to your Google drive, I followed the link docs.google.com/forms/d/1if18SNBxegvkBUMri1YT01n8htGaKmrjkXyToTROLpg/viewform?edit_requested=true, and submitted it.
Hi, I get a lot of errors and I have exactly replicated your code, but the blue word on your code when extracting the stock prices, doesnt appear blue to me, I think that the problem is there
I understand, but sometimes we make some basic mistake and don't recognize. Have you got the access to my Google drive? If yes, then copy and paste my code in anaconda; run it there and then see what was the mistake in your code. 🙂
𝐓𝐢𝐩 𝐦𝐞
by:
buying me a coffee in US Dollars: www.buymeacoffee.com/fpritvikusd
buying me a coffee in Euros: www.buymeacoffee.com/fpritvik
Thanks for your work. u are one of the best channels in youtube
Thanks for your appreciation. Please share my videos to support me. And I am in need of that.
I was really lost and was feeling really hopeless thenI found your channel thank you so much for doing this sir!
Glad I could help! To get directly connected with me and discuss your projects with me and other like minded people, you may consider joining my Patreon Exclusive Community: www.patreon.com/fpritvik
Good tutorial.. It would also be great if there was some explanation on how investors should use the efficient frontier for their personal portfolios
Great suggestion!
This is really good gives inside to the potential of coding and provides base for new student of finance
thank you for this initiative
My pleasure!
Do we can use efficient Frontier in real life scenario? if yes then How Can we take care of the assumption that returns are normally distributed? And if there is any other more effective way to find out optimum Risk return, considering returns are not normally distributed.
You have a valid point. Returns are not normally distributed... they are negatively skewed. In order to solve this problem (at least partially), analysts use Black-Litterman model to incorporate manager's opinions as well.
Can we take returns data and convert it into normal Distribution and then use efficient frontier? Will it be more effective or won't work? And Thanks for replying 😊
Could you please send me the graph of the calculated efficient frontier with its capital allocation line? Thank you
For freelance service inquiries, please contact here: fpritvik@gmail.com
amazing. thanks bro. it helps a lot. subscribed
Thanks for the sub! :)
great job man, thank you for your content, it's so helpfull. though i couldnt find the drive link, can you please share it with me.
fpritvik.com/ecommunity
Hi Ritvik, a great tutorial, thankyou!
Could a constraint be applied here that would return a frontier for only positive holdings (no shorts)?
I'm assuming I'd have to join the Sharpe ratios to a DataFrame that sums the stock weights from WeightA and WeightB, and then eliminate rows with values
Yes, it can be done. I will shortly make a video on the related topic.
@@FinancialProgrammingwithRitvik Much appreciated, thanks again!
bro your way of explaining things is awesome and loved your voice. Subscribed your channel also. Keep it up
Thanks for your appreciation
Hi, sorry for a kinda stupid question but could you explain what @ work in your code?
It's not a stupid question as all. @ is used to do matrix multiplication. Suppose you have 2 matrices and want to do matrix/vector multiplication, then we use @. You remember MMULT function in Excel? It is exactly the same in Python. Please let me know if you understood. :)
Can anybody give me the code of the last part that is CML, as I am a student of finance but learning python.
Ritvik sir please make more such videos. Love it, thank you. 👍
Thanks.
May I know on which basis should take the return and volatility while optimising five best risky portfolios asset from 10 companies....
I couldn't understand your question. Could you please elaborate?
@@FinancialProgrammingwithRitvik On finding the best optimisation of risky portfolio with respect to return and portfolio from 10 companies to 5 companies; on which basis should the 5 companies must be chosen as fit for best riskier optimisation asset sir..
Thanks for your comment. Focus on Diversification of stocks :)
May I get the link Or the reason for getting nan for the first value while returning log value...
We get nan because we are dividing present day's price with last day price and for the first row there's no last day price available. To understand, you can try it on MS excel, it will throw a #NA there.
Thank you
My pleasure! Have you considered real-time data to build the efficient frontier?
No beatbox? Thanks for the video
It is a very old video. At that time, I didn't even start beatboxing.
When we have more than 2 stocks in the portfolio, how to come with portfolio weights (with both positive and negative combinations)?
let's say, 7 stocks and 5000 portfolio.
I couldn't understand your questions. Could you please elaborate in detail, if possible?
@@FinancialProgrammingwithRitvik he asked a simple question that what if we have more than two stocks?
@@ekta9197 I am a bit confused... I used more than 2 stocks to make the efficient frontier.
Why have you used 'Adj close' while reading data from the web?
Interesting comment and a very good question. Swati, The closing price of a stock is the price of that stock at the close of the trading day. The adjusted closing price is a more complex analysis that uses the closing price as a starting point, but it takes into account factors such as dividends, stock splits, and new stock offerings to determine a value. Mostly, they are the same as other factors don't occur frequently.
@@FinancialProgrammingwithRitvik : Hey Ritvik, is it possible to get the ppt used in the video?
@@swatityagi222 It's already present in my Google Drive. You can get a free access on my google drive by following steps mentioned on my RUclips Channel banner. But this service is only for my subscribers.
I get minus value for var... can u help?
I guess you took profit/loss from the beginning and the negative value would be max loss possibility with 95.5% confidence.
Hi, congrats for your tutorials! I'm trying to do the cml but i can't...Can you help me?
How can I help you?
@@FinancialProgrammingwithRitvik
I am starting to program in python and so far I have done the portfolio in excel. I have difficulty programming the line and including it in the graph.
@@camfvc I have uploaded the code in my Google drive. I recommend you to copy paste it and then run line by line to understand/decode the code. Let me know if it works for you.
@@FinancialProgrammingwithRitvik
I don't have access to your Google drive, I followed the link docs.google.com/forms/d/1if18SNBxegvkBUMri1YT01n8htGaKmrjkXyToTROLpg/viewform?edit_requested=true, and submitted it.
Yes, I can see your google form response. Just provided the access to your email address. Can you access it now?
Shouldnt the returns formula be (c2-c1)/c1
We can use this formula as well. It calculates absolute returns. On the other hand, I did logarithmic returns calculation.
Hi, I get a lot of errors and I have exactly replicated your code, but the blue word on your code when extracting the stock prices, doesnt appear blue to me, I think that the problem is there
I understand, but sometimes we make some basic mistake and don't recognize. Have you got the access to my Google drive? If yes, then copy and paste my code in anaconda; run it there and then see what was the mistake in your code. 🙂
have you installed the pandas library? pip install pandas
or conda install pandas
@@joaoaug pandas doesn't need installation. It's already there. Anyways, You may try pip install pandas.