Efficient Frontier in Python p.2

preview_player
Показать описание
Part 2: Building the Efficient Frontier in Python

In this series we are building the Efficient Frontier in Python with Dash as a web application over multiple tutorials.

★ ★ QuantPy GitHub ★ ★

★ ★ Discord Community ★ ★

★ ★ Support our Patreon Community ★ ★
Get access to Jupyter Notebooks that can run in the browser without downloading python.

★ ★ ThetaData API ★ ★
ThetaData's API provides both realtime and historical options data for end-of-day, and intraday trades and quotes. Use coupon 'QPY1' to receive 20% off on your first month.

★ ★ Online Quant Tutorials ★ ★

★ ★ Contact Us ★ ★

Disclaimer: All ideas, opinions, recommendations and/or forecasts, expressed or implied in this content, are for informational and educational purposes only and should not be construed as financial product advice or an inducement or instruction to invest, trade, and/or speculate in the markets. Any action or refraining from action; investments, trades, and/or speculations made in light of the ideas, opinions, and/or forecasts, expressed or implied in this content, are committed at your own risk an consequence, financial or otherwise. As an affiliate of ThetaData, QuantPy Pty Ltd is compensated for any purchases made through the link provided in this description.
Рекомендации по теме
Комментарии
Автор

That's a wondereful serires of video! But I got a little question about the expected return. In the code we use E[x] = Weights * returns * k, it's assumed that's not compound interest? In reality should not that be (1 + weights * returns)^k - 1? Hope get the reply! Sincerely Thanks!

连邦-dv
Автор

Thank you for this great video! I guess you have missed an important step in your optimization. Actually you minimized the negative sharpe ratio and in the results you had the minimized optimal value for negative sharpe. I think you had to multiply it by another negative at the end when you assign the final results. I think you should have written this line of code like this:
mxSR = - result['fun']

Again, thank you very much for this great video!

samasedaghat
Автор

thanks for the video! Could you do a new video explaining more in detail the risk free rate. From where can we download the risk free rate (RFR)? What happens if the RFR is negative as in many countries the case is? Is a negative RFR in financial models meaningful ie. Sharpe ratio, Black-Scholes formula, CAPM...?. What is the impact of the RFR on your results? Thank you for your amazing channel!!

patite
Автор

Is there any reason why we choose to minimize the negative sharpe ratio instead of trying to maximize a positive sharpe ratio? I'm very new to this and would really appreciate if anyone could enlighten me, thanks!

finalpurez
Автор

i get a negative sharp ratio, does this mean i made an error in my code? or that the expected returns of the portfolio are negative?

jaspervanhestw
Автор

Isn't final sharp ratio should be negative?
Also, 0.013 just too low for sharp ratio

tracywang
Автор

Hi Buddy, thanks for the video. One question, after the minimization process, the min negative sharpe ratio should be negative, so that the max sharpe ratio can be positive ?

MrSonglu
Автор

I don’t recognize your casing standard. Do you code in cpp? Reminds me of cpp code. Is that your first language?

phillipraywood
Автор

Hello,
First of all thanks for the videos! They are quite helpful
I have a question, I have coded this program to optimise Apple, Pepsi, Waste Management and General Electric. I get a positive returns in all them but GE, and a positive SR 1.06 for the initial weights. When I minimise the negative SR, at the end the max SR the function returns is negative, how can it be? Thanks a lot!

nadalpieraslopez
Автор

why we are trying to minimize the maximum negative sharpe ratio. Though we are trying to maximize the sharpe ratio. I am saying that why we can't juse use (Portfolio Returns - Risk Free Rate) / Standard Deviation. I don't understand the negative here.

yinglongliu
Автор

Thanks dude! Love your work. Learning so much watching you. Unfortunately I'm getting a kinda brutal error:

'AttributeError: module 'scipy' has no attribute 'minimize''
Has the minimize function been removed in the most recent version of scipy? Everything on Stack Overflow is refers to the 'optimize', but my python environment isn't liking that either....

Sorry, kinda new to this coding business. Any help would be greatly appreciated

alexkelso
Автор

Thanks for the Video! I'm new on coding but It has been super helpful. I need to ask I did get a negative maxSR, any idea why's this happening?

manuelmartinezsantillan
Автор

What do I do if I use more than 3 shares such as 100 shares. Do I then also have to enter the weighting manually so that it results in 100%. So how do I incorporate random weights for a number of stocks to perform the efficient frontier. Thanks
Many greetings
Johannes

johannesambaye
Автор

I didn't quite get that alphabetical order to be honest. Thought that it was 100% on BHP

gloryths
Автор

Great video!! Could you please also do a portfolio optimization on the Kenneth French 49 Industry daily portforlio?

estaykylyshbek
Автор

I'm going to play around with this, mixing in cryptocurrency.
Question is, is there a good way to weigh in a safe percentage for a highly speculative coin that hasn't been in the market for long enough to do a good backtest?

vladk
Автор

hey man, thanks for these videos. I dont understand 99% of it but I was wondering if we could apply this to a cryptocurrency portfolio?

splendorman