If you like this video and want to support the channel: Buy Me a Drink: www.buymeacoffee.com/parttimelarry Also, I will be starting a spinoff channel on AI in music, art, and gaming in 2023. Subscribe at: youtube.com/@parttimeai Source Code: github.com/hackingthemarkets/quantstats-demo Buy Me a Coffee: buymeacoffee.com/parttimelarry Follow Me: twitter.com/parttimelarry
@brightosisiogu26263 жыл бұрын
Wow! Larry! You are aging backwards! So much fresher and younger! Thanks for yet another amazingly educative content.
@Patiencelad2 жыл бұрын
Great stuff! Thanks for putting this together. I actually needed to use this with a custom return stream, and although you didn't go into it, seeing you delve into the code helped me find what I needed.
@idevbrandonАй бұрын
I love it and learnt so much from you. Thank you! Have a good day, bro :)
@Caminovic3 жыл бұрын
Hi Larry, nice to see you back!!
@PavelSumik3 жыл бұрын
Larry is just a leader in programming, my incredible admiration, I send greetings
@FRANKWHITE19963 жыл бұрын
Thanks for sharing! 👍
@alihobballah Жыл бұрын
This is amazing content !!! quality presentation ! Thank you for making this video.. It's so useful !!!!
@javadvahedi62783 жыл бұрын
Many thanks for your great channel. The video on quantstat was great. A suggestion for next video, would you please have a video about amix strategy based on two indicators, SSL and QQE.
@richardchu15933 жыл бұрын
Hi Larry, unrelated to this video, but I would like to suggest some potential ideas for future video series/topic: (1) News to Penny Stock Day-Trading: A SQLite database to fetch and store a list of penny stock news for the day during pre-market from TD Ameritrade, than maybe quickly run a NLP against the news articles to return 1 to trade, 0 to pass. Same concept can be applied to Crypto/Binance?
@DevAtul2 жыл бұрын
Hi Larry, Thank you for such a good content on Python and finance. I am binge watching your videos. I have a request. There is a paper by Jegadeesh and Titman where they are showing the efficacy of Price momentum and somewhat disproves "Efficient Market Hypothesis." Can you create that portfolio and backtest using Python? Thanks.
@NoToBusinessCasual3 жыл бұрын
Great topic.
@rithirongk2 жыл бұрын
very informative, thx.
@Ro1andDesign3 жыл бұрын
Hi Larry, interesting video yet again! Can this library also plot dynamic portfolios and strategies, so non buy-and-hold? E.g. combine this with the ARK invest etfs, but through time based on changing holdings within the etf/portfolio Would love to see it!
@revenge94313 жыл бұрын
Special thanks to Ran Aroussi and PTL as well!
@thomas2004ch3 жыл бұрын
Interesting! But it seems the portfolio is simply buy and hold. How about if I simply use the SMA cross over strategy? It would be very nice if you could give such an example.
@franky122 жыл бұрын
Great tutorial. I would be interested to know if and how quantstats can also be used for dynamic portfolios, e.g. to analyze trading strategies in backtesting.
@vdzneladze13 жыл бұрын
Larry thank you for great tutorial. I began to worry about 3 weeks pause.
@theodorelee43833 жыл бұрын
I was getting this error "Expecting value: line 1 column 1 (char 0)" when running the FB returns query. This is due to having an antiquated version of yfinance, if you're getting the same error just update yfinance using "pip install yfinance --upgrade" love the channel!
@samueltamayogaviria33772 жыл бұрын
hello, is there any way to import a csv with the returns of a personal trading strategy?
@insected833 жыл бұрын
hot off the press!
@XeitoX5063 жыл бұрын
Hi Larry, could you please explain how to configure a strategy with technical analysis indicator combine with this tool? Great video 👍🏻
@franky122 жыл бұрын
Do you know the *PyPortfolioOpt* python library that implements portfolio optimization methods?
@illsdom60552 жыл бұрын
Is it possible to do a portfolio backtest on the asset allocation of the stocks?
@rafaelg82382 жыл бұрын
Great a video. Normally you share the code in anywhere? Or another doubt, is possible to show in chart the lines each tickers separated?
@AlexeyZubkov3 жыл бұрын
can you pull data of standard % move prior earnings of company?
@NoToBusinessCasual3 жыл бұрын
Are we bound to get price history from QS? Can we loop through our own set of Ticker files?
@saviocoelho62296 ай бұрын
Is your portfolio analysis code still running? I tried to make one, but the .utils.make_index function is giving the TypeError: unsupported operand type(s) for +: 'float' and 'str'. This is my code that caused the error: import quantstats as qs qs.extend_pandas() IAC = {"SPY": 1.3, "AGG": -.3} portfolio = qs.utils.make_index(IAC) I even tested with other ticker combinations and directly entering the ticker and weights in make_index and the error repeats in the same way. I also tested in previous versions and the error repeats again. Does anyone know if there is an error in the package or is it my code?
@darshitsarda96325 ай бұрын
same error
@davidreeves8382Ай бұрын
@@darshitsarda9632 - i reproduced the same error
@kuatroka Жыл бұрын
Hi, Thanks for the video. A slightly tangential question, but I’m asking since you’re very versed in the Python trading topic. Can you recommend a Python module that analyses the actual transactions? Not the forecasted portfolio earnings based on the past stock price, but something like where I can give it a parquet/csv file with a list of transactions( ticker, entry date, entry quantity, entry price, exit date, exit price) and the Python module would analyse and spit out the profit / loss data. Even for cases where I’m adding or reducing a position with the same ticker or enter and exit the same ticket multiple times for different time periods ( month, quarter, year) So I could see what was my best, worst transaction, etc. Thanks
@parttimelarry Жыл бұрын
I'm planning to do a trading journal project where we build something like this, but am working on the machine learning content now. I'm not sure about existing modules for this, I would just write some Python that loads your CSV into a pandas dataframe and do calculations on it there. Or if you don't want to code it yourself there are some existing journal SaaS apps that are free if you make your trades public.
@kuatroka Жыл бұрын
@@parttimelarry Thanks Larry. It's surprising though that there aren't any big name module for this. Tracking transactions seems like a pretty typical and extremely important investment/trading activity. I think I just need to scout github more conscientiously. Thanks
@nima88303 жыл бұрын
Well done Larry. Are these concepts applicable to intraday algorithmic strategies?
@parttimelarry3 жыл бұрын
This is a long term portfolio analysis library, so not for short term trading
@karthickb1973 Жыл бұрын
i am trying to workaround simply by cumulating intraday returns to daily returns
@jessojohn92262 жыл бұрын
can you do a video on integrating backtrader with quant stats to produce performance report?
@davidreeves8382Ай бұрын
i tried the index - using META instead of FB and I get the error message: TypeError: unsupported operand type(s) for +: 'float' and 'str'. Any ideas?
@emskiphoto3 жыл бұрын
Thanks to Larry and Ran Aroussi
@safishajjouz1662 жыл бұрын
There is a caveat. The library does not download adjusted close prices. So, you should be careful of what returns we are talking about.
@thomasforsythe99513 жыл бұрын
How do I use a specific date for benchmarking?
@moeunit676767 Жыл бұрын
What did you do at 8:31 to highlight and change everything green. Sorry I am a novice. Thank you
@parttimelarry Жыл бұрын
I commented out all the selected lines by pressing command and /
@moeunit676767 Жыл бұрын
@@parttimelarry thank you so much for answering. Subscribed and cant wait to watch more content. I am going to do a little more walking before i run after this but I want to complete it so I apologize for another question. I copy and pasted your code for charting GLD and got this error " File "C:\Users\willi\AppData\Local\Programs\Python\Python311\Lib\site-packages\pandas\core\ops\invalid.py", line 36, in invalid_comparison raise TypeError(f"Invalid comparison between dtype={left.dtype} and {typ}") TypeError: Invalid comparison between dtype=datetime64[ns, America/New_York] and datetime"
@patite31032 жыл бұрын
Thank you for the video! For the code "fmaga = portfolio = qs.utils.make_index(tickers)" I get an error: module 'quantstats.utils' has no attribute 'make_index' Could someone solve this problem? Thanks
@danielrv13253 жыл бұрын
How do you change the date to download the data? I tried to change period to a data and it is not working
@alexanderfiner75523 жыл бұрын
Awesome work Larry - the only thing is I don't see the code on github :(
@parttimelarry3 жыл бұрын
Hey thanks! Oops, just pushed it: github.com/hackingthemarkets/quantstats-demo
@alexanderfiner75523 жыл бұрын
@@parttimelarry Thanks man very much appreciate it. I work as an assistant investment analyst, I love the bit about even managers can understand the code, it's actually a very accurate statement haha. These tear sheets or known as factsheets, are valued by highly clients, but often it's necessary to explain each aspect of the metrics used etc. I've run the code you've uploaded, the only error I get is ---- FileNotFoundError: [Errno 2] No such file or directory: 'output/gld.html' / No such file or directory: 'output/fb_earnings.png' - maybe I need to change a directory somewhere?
@parttimelarry3 жыл бұрын
@@alexanderfiner7552 hey, if you copied down individual scripts, I would create a directory called "output" in the same directory where you are running the script. or you can remove the "output/" part of the path and it will write the files to the same directory.
@alexanderfiner75523 жыл бұрын
@@parttimelarry Thanks soo much mate
@corteman3 жыл бұрын
I wonder if it works with futures/micro futures...
@mr.gk52 жыл бұрын
Does this work with foreign stocks?
@xxmrfreexx3 жыл бұрын
Is there anyway to accept work as lancer ?
@AirForceA7x3 жыл бұрын
What Reddit chat did you find this package?
@rancholaflorida11683 жыл бұрын
Your fundamental analysis it's sucks , but your code it's clean and powerful
@Sam-lx1lu Жыл бұрын
Getting this error for some of the code snippets: from : qs.reports.html(stock, title='Test', output='output/TSLA.html') Exception has occurred: TypeError DataFrame.pivot() takes 1 positional argument but 4 were given File "C:\Users\Samue\Desktop\Python\PY.py", line 10, in qs.reports.html(stock, title='Test', output='output/TSLA.html') TypeError: DataFrame.pivot() takes 1 positional argument but 4 were given