Efficient Frontier in Python p.1

preview_player
Показать описание
Part 1: 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.
Рекомендации по теме
Комментарии
Автор

This series is awesome! Thank you! I just wish there was a follow-up discussing the parameters that were implemented but not used yet

Tapefruit
Автор

I really liked your step by step explanation. I will surely watch all your videos. Thanks for your time.

shagyhahn
Автор

Hi I get an error when I tried to print :"getData(stocks....) ", string indices must intgers typeerror. How I can fix it?
Thank you!!!

adribues
Автор

Great video at first! What do you think about not doing the calculation via the covariance-matrix but adding up the daily stock-returns depending on their allocation in the portfolio and just calculating the volatility and mean return of the created portfolio?

tschuhmann
Автор

Can't understand why we use weighted sum of mean returns multiplied by amount of days. Shouldn't we use 1 * (1 +mean returns)^days_in_period ??

ivannikonov
Автор

Still works in 2023, with minor tweaks to the code (especially using yfinance instead of get_data_yahoo).

FelipeFoltran
Автор

Why don't we use adjusted close?
What's the difference? Thanks man

chriskeo
Автор

Amazing series, thanks for sharing!

I was wondering about whether you should be working with the log returns instead of percentage returns? Because taking the average of percentage returns doesn't really make sense (I could be wrong). Or is it just because the daily returns are usually so small that it doesn't really make a difference?

richardvdoost
Автор

Excellent. You forgot to plot Efficient Frontier.

aarondelarosa
Автор

I have a little problem i get the data from reuter and download it to first in excel and then i use python. I can not recreate this so well

johannesambaye
Автор

Hello, thanks for the video but could you please explain why we use .T after weights ? It does not work when I add it
Thanks !

MA-qmyv
Автор

I'm not absolutely positive if this is true, but I believe that you can remove the entire line that has stock = [stock+" .AX" for stock in stocklist] and change the final line from print(getdata(stock, start=startDate, end=endDate)) to print(getdata(stocklist, start=startData, end=endData)). I came to this conclusion because I kept getting an error in pycharm telling me that it didn't understand the symbols with .AX at the end. Once I removed the .AX line and changed the final line it interpreted the code and created the model. If you can confirm my suspicion or correct me that would be great, Thanks.

joeygsteez
Автор

Do we need any adjustments for stocks listed on the TSX e.g. Shopify (SHOP)? AX. is giving error. Thanks !

saheedfalola
Автор

Could I get all your code. On your website code is not completely available but only partially. I would be very grateful to you

johannesambaye
Автор

can you please do a similar video for 10-20 stocks. Under my python code my EF loses its carvature the more stocks i add.

stelios
Автор

Hey Mate, How can I fix this error?

SymbolWarning: Failed to read symbol: 'CBA.AX', replacing with NaN.
'No data fetched using 'YahooDailyReader'

riocma
Автор

Question: the timedelta we use is 365 and the portfolio performance is calculated on 252 days, is it correct or should both of them have the same number of days?

damneddude
Автор

nice, instead of np.dot, use @ operator for clarity :-)

greenpumpkin
Автор

copied his code word for word and it didn't work

noelsmith