Fundamental Analysis of Stocks with Python
Vložit
- čas přidán 5. 03. 2021
- Hi everyone,
in this video we are going to take a look at analyzing stocks using fundamental analysis with Python. We are scraping financials via the Yahoo Finance API and utilizing the data. We are doing a peer group comparison and find the highest dividend payers (in terms of dividend yield) in the Dow Jones.
Get the Notebook/Source code by becoming a Tier-2 Channel member:
/ @algovibes
Video on getting tickers from wikipedia:
• Trading strategy and B...
Check out my Python for Finance stuff!
• Python for Finance
Disclaimer:
This video is no investment advice. It is for educational and entertainment purposes only.
#Python #FundamentalAnalysis #Stockmarket
There is little video concerning FA in python. Thanks for covering it as the most important part
Thanks a lot for watching :-) Appreciate your comment!
I learn a alot each time i watch a video of yours. I will look for more videos in fundamental analysis in Python. I hope i found one where you backtest a fundamental strategy.
Happy to read. Thanks a ton Adriaan!
your videos are really great, thank you very much for your work
Thank you so much for your kind words! :-)
Again , Thanks a lot for your contents !
And again, thanks a lot for your support and your positive nature :-)
Using your tips right now to create a factor investing screener. Thanks!
Awesome! Let me know more about the results :-)
SQL video will be soooo nice thanks for your videos buddy
Thank you!
Great video! Will be looking for more python tutorials from you my sensei. OSS!
:D Thanks mate. I like this karate reference 😛
@@Algovibes 🤣👍
Many thanks!!! You helped me a lot!
That's awesome man, thanks a lot for your comment.
Awesome, thank you!
Thanks a lot for your comment buddy :-)
Great video. Thanks mate. 🙌🙌🙌
Thanks for watching and your support :-) Appreciate it!
Hello,
Awesome video as always. Can I ask you a question ? In the end I have problem with showing graph because of this:
TypeError: 'value' must be an instance of str or bytes, not a float → probably when I require to values on x and y axis.... Is there any solution for this ? Thank you for answer.
stackoverflow.com/questions/64890665/how-do-i-fix-this-type-error-value-must-be-an-instance-of-str-or-bytes-not-a
;-)
Very good 👍 thanks a lot, more to come please.
Thank you very much :-) Appreciate your comment!
Hey, Algovibes
Thanks for the videos! How to compare a company's (e.g. 'TSLA') most recent earnings to past earnings, both quarterly and yearly?
Thanks
Hi man, thanks for watching. As far as I know you can pull the PnL for multiple years using yfinance. With that you could compare it. I got more videos on fundamental analysis with Python on my list btw.
Please make videos on sql as well
I will :-) Might take some time tho. Thanks for watching mate.
Is it possible to get historical FA data?
Thank you
Very welcome Siddhi! Thanks for watching :-)
Hi Super video....can you also a do video on Fundamental analysis for DAX using same features on last 15 years data and use Deep learning for prediction ? Thank you Again !!!
Thank you very much for your kind comment and your suggestion. Very much appreciated!
Pretty awesome stuff, I tried and it work until the point it gave me some namerrror in jupyter so not sure what's wrong, I'm not py pro so I will deep on it later, will reinstall everything from 0 and try again, appreciate the work!.
Thanks alot for your feedback man :-)
What programm are you using? In pycharm the data frames arent that good looking. :D
Jupyter :D
Where can I see, for what Period the data is delivered ? Great video btw. helped a lot.
Thanks mate. Just in the index of the dataframe.
I would love a combination of this video and your new SQL-Tutorial ;-)
I'm currently building a quarterly Portfolio Check-up where I could use some help...
Hi Christian, I think I covered something like that in my live stream:
czcams.com/video/TJK-Ct9WnCw/video.html
Around 5:10, you note this takes a long time because the program has to scrape at every step. What is involved with the database that makes this unnecessary and the database faster/more efficient? And--if it's about already having the data in the database, then does this take into consideration the time it took to import data into the database originally?
The data is requested via the request module in the background. When you are storing the fundamentals into a database (sqlite or mysql or whatever you want) you don't have to perform this request anymore and can directly query the data using a sql statement.
Regarding the last question: The data is not really dynamic (such as prices which are updated every fraction of a second) so it is not relevant to take this into consideration.
@Algovibes So it takes less time to query the database than it does to initially request the data and store it into the database?
@@markk4203 Yes.
@@Algovibes Can u make a video where u store it in a database first, so it becomes more efficient?
Hi, do you think you can cover discounting cash flows in Python. Is it suitable?
Hi man,
in the very beginning of this channel I actually made a vid on the NPV:
czcams.com/video/1_uF6o-9ms0/video.html
Maybe helpful. But I wanted to do some Corporate Finance / Financial modeling topics - just don't know if there is any demand for that. Do you have anything specific what you would be interested in?
@@Algovibes Thank you for replying, I am asking because I am using excel to compute equity value and modeling in general. When I analyze stocks, however retrieving all balance sheet, CF and earnings info is time consuming. Maybe if there is a way to speed up the process of gathering and filtering large amounts of accounting and financial data (like earnings, EBITDA, Depreciation and Amortization) over 10 years for instance. Thank you anyway, whatever you can come up with will be very helpful I am sure!
Great video, enjoyed it. Thanks. Are you able to post the code?
Thanks a lot for your feedback :-) Appreciate it!
Yes I will work on publishing my code within this year but I just don't have enough time right now to set it up properly and want to focus the remaining time on producing content. Thanks a lot for your understanding.
Hi, this has stopped working. Has something changes with YFinance? Do we need an upgraded version?
scratch that, but as a note, make sure you have the latest yfinance version which is now 0.2.3 as at 2023!
thank you so much!
Is it possible to get the ISIN for the fundamentals instead of the symbol?
Yeah you can extract it. It is contained in the info as well.
@@Algovibes r u sure? I couldn't find it in the info.
Which editor is this?
That's Jupyter Notebook :-) Thanks for watching.
Can u provide the link for your Boolean indexing approach?
yeah but it is an age old video :D
czcams.com/video/e0tL68PvwUY/video.html
@@Algovibes TY :)
Hey can you please make a video on how to pull data data from bitmex
Thanks for watching and your suggestion. I noted that! :-) But you will need to be a bit patient.
Do u have a github where we can download the code?
Even better! You can become a channel member and get access to the code and besides that support the channel:
czcams.com/channels/87aeHqMrlR6ED0w2SVi5nw.htmljoin
Please make ths video for Sql
I will, thanks a lot for your comment and for watching :-)
Whats the name of this IDE?
That's Jupyter Notebook. Thanks a lot for watching 🙂
Great video. also.. it would also work if we wrote, df[fundamentals] directly. :)
You are absolutely right :D I just watched the part again and facepalmed on myself. Thanks buddy!
spoiler alert, it doesn't work
Can you elaborate? Happy to take a look and make an updated version of this!
Did they change something… I am no more getting any data from yfinance. I only receive an almost empty dictionary { regularMarketPrice : None, logo_url : }
Nice video.Thank you. That booling index method is too much,
Perhaps, this df2 = df.loc[:,df.columns.isin(fundamentals)] looks simpler.
Thanks for your comment, appreciate it :-)
Do whatever you prefer but make sure it does the right job :-P On a serious note: Thanks for sharing your approach!
Or just df[fundamentals]