Fundamental Analysis of Stocks with Python

Поделиться
HTML-код
  • Опубликовано: 5 мар 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

Комментарии • 82

  • @happyfa
    @happyfa 3 года назад +7

    There is little video concerning FA in python. Thanks for covering it as the most important part

    • @Algovibes
      @Algovibes  3 года назад +1

      Thanks a lot for watching :-) Appreciate your comment!

  • @adriaanborgermans5671
    @adriaanborgermans5671 Год назад +1

    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.

    • @Algovibes
      @Algovibes  Год назад

      Happy to read. Thanks a ton Adriaan!

  • @rraul
    @rraul 2 года назад +1

    Using your tips right now to create a factor investing screener. Thanks!

    • @Algovibes
      @Algovibes  2 года назад

      Awesome! Let me know more about the results :-)

  • @PavelSumik
    @PavelSumik 3 года назад +3

    your videos are really great, thank you very much for your work

    • @Algovibes
      @Algovibes  3 года назад +1

      Thank you so much for your kind words! :-)

  • @ihebbibani7122
    @ihebbibani7122 2 года назад +2

    Again , Thanks a lot for your contents !

    • @Algovibes
      @Algovibes  2 года назад

      And again, thanks a lot for your support and your positive nature :-)

  • @FRANKWHITE1996
    @FRANKWHITE1996 3 года назад +1

    Great video. Thanks mate. 🙌🙌🙌

    • @Algovibes
      @Algovibes  3 года назад

      Thanks for watching and your support :-) Appreciate it!

  • @ashmandu3309
    @ashmandu3309 2 года назад +1

    Great video! Will be looking for more python tutorials from you my sensei. OSS!

    • @Algovibes
      @Algovibes  2 года назад +2

      :D Thanks mate. I like this karate reference 😛

    • @Kig_Ama
      @Kig_Ama Год назад

      @@Algovibes 🤣👍

  • @guccipepito
    @guccipepito 2 года назад +1

    SQL video will be soooo nice thanks for your videos buddy

  • @skyline3911
    @skyline3911 2 года назад +1

    Many thanks!!! You helped me a lot!

    • @Algovibes
      @Algovibes  2 года назад

      That's awesome man, thanks a lot for your comment.

  • @safetime100
    @safetime100 3 года назад +1

    Very good 👍 thanks a lot, more to come please.

    • @Algovibes
      @Algovibes  3 года назад

      Thank you very much :-) Appreciate your comment!

  • @gacctom
    @gacctom Год назад +1

    Awesome, thank you!

    • @Algovibes
      @Algovibes  Год назад

      Thanks a lot for your comment buddy :-)

  • @mediamention-kx4ft
    @mediamention-kx4ft 2 года назад +1

    Thank you!

  • @matejmak9225
    @matejmak9225 Год назад +1

    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.

    • @Algovibes
      @Algovibes  Год назад

      stackoverflow.com/questions/64890665/how-do-i-fix-this-type-error-value-must-be-an-instance-of-str-or-bytes-not-a
      ;-)

  • @siddhigolatkar8558
    @siddhigolatkar8558 Год назад +2

    Thank you

    • @Algovibes
      @Algovibes  Год назад

      Very welcome Siddhi! Thanks for watching :-)

  • @ProSpase
    @ProSpase Год назад +1

    Is it possible to get historical FA data?

  • @azamat_kalam
    @azamat_kalam 2 года назад +1

    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

    • @Algovibes
      @Algovibes  2 года назад

      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.

  • @SarthakGarg
    @SarthakGarg 3 года назад +6

    Please make videos on sql as well

    • @Algovibes
      @Algovibes  3 года назад +2

      I will :-) Might take some time tho. Thanks for watching mate.

  • @prashantsonar898
    @prashantsonar898 2 года назад +2

    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 !!!

    • @Algovibes
      @Algovibes  2 года назад

      Thank you very much for your kind comment and your suggestion. Very much appreciated!

  • @blankerhans9659
    @blankerhans9659 2 года назад +1

    What programm are you using? In pycharm the data frames arent that good looking. :D

  • @markk4203
    @markk4203 2 года назад +2

    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?

    • @Algovibes
      @Algovibes  2 года назад +2

      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.

    • @markk4203
      @markk4203 2 года назад +2

      @Algovibes So it takes less time to query the database than it does to initially request the data and store it into the database?

    • @TainuiaKid1973
      @TainuiaKid1973 2 года назад

      @@markk4203 Yes.

    • @Kig_Ama
      @Kig_Ama Год назад

      @@Algovibes Can u make a video where u store it in a database first, so it becomes more efficient?

  • @chris_bi
    @chris_bi Год назад +1

    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...

    • @Algovibes
      @Algovibes  Год назад

      Hi Christian, I think I covered something like that in my live stream:
      ruclips.net/video/TJK-Ct9WnCw/видео.html

  • @Ctrlshiv
    @Ctrlshiv 2 года назад +1

    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!.

    • @Algovibes
      @Algovibes  2 года назад

      Thanks alot for your feedback man :-)

  • @Cunetch
    @Cunetch 2 года назад +3

    Hi, do you think you can cover discounting cash flows in Python. Is it suitable?

    • @Algovibes
      @Algovibes  2 года назад +3

      Hi man,
      in the very beginning of this channel I actually made a vid on the NPV:
      ruclips.net/video/1_uF6o-9ms0/видео.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?

    • @Cunetch
      @Cunetch 2 года назад +2

      @@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!

  • @itsdan9194
    @itsdan9194 Год назад +1

    Where can I see, for what Period the data is delivered ? Great video btw. helped a lot.

    • @Algovibes
      @Algovibes  Год назад

      Thanks mate. Just in the index of the dataframe.

  • @a1b290
    @a1b290 3 года назад +2

    Great video, enjoyed it. Thanks. Are you able to post the code?

    • @Algovibes
      @Algovibes  3 года назад +1

      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.

  • @benn8319
    @benn8319 Год назад +2

    Hi, this has stopped working. Has something changes with YFinance? Do we need an upgraded version?

    • @benn8319
      @benn8319 Год назад +1

      scratch that, but as a note, make sure you have the latest yfinance version which is now 0.2.3 as at 2023!

    • @Algovibes
      @Algovibes  Год назад +1

      thank you so much!

  • @Kig_Ama
    @Kig_Ama Год назад +1

    Is it possible to get the ISIN for the fundamentals instead of the symbol?

    • @Algovibes
      @Algovibes  Год назад

      Yeah you can extract it. It is contained in the info as well.

    • @Kig_Ama
      @Kig_Ama Год назад

      @@Algovibes r u sure? I couldn't find it in the info.

  • @Kig_Ama
    @Kig_Ama Год назад +1

    Can u provide the link for your Boolean indexing approach?

    • @Algovibes
      @Algovibes  Год назад +1

      yeah but it is an age old video :D
      ruclips.net/video/e0tL68PvwUY/видео.html

    • @Kig_Ama
      @Kig_Ama Год назад

      @@Algovibes TY :)

  • @Kig_Ama
    @Kig_Ama Год назад +1

    Do u have a github where we can download the code?

    • @Algovibes
      @Algovibes  Год назад

      Even better! You can become a channel member and get access to the code and besides that support the channel:
      ruclips.net/channel/UC87aeHqMrlR6ED0w2SVi5nwjoin

  • @mdjuneid3553
    @mdjuneid3553 3 года назад +1

    Hey can you please make a video on how to pull data data from bitmex

    • @Algovibes
      @Algovibes  3 года назад +1

      Thanks for watching and your suggestion. I noted that! :-) But you will need to be a bit patient.

  • @rushikeshjagtap5403
    @rushikeshjagtap5403 2 года назад +1

    Which editor is this?

    • @Algovibes
      @Algovibes  2 года назад

      That's Jupyter Notebook :-) Thanks for watching.

  • @bogdanexit1
    @bogdanexit1 3 года назад +1

    Please make ths video for Sql

    • @Algovibes
      @Algovibes  3 года назад

      I will, thanks a lot for your comment and for watching :-)

  • @rafaelcalisto1700
    @rafaelcalisto1700 Год назад +1

    Whats the name of this IDE?

    • @Algovibes
      @Algovibes  Год назад

      That's Jupyter Notebook. Thanks a lot for watching 🙂

  • @vatsal_kanth
    @vatsal_kanth 2 года назад +1

    Great video. also.. it would also work if we wrote, df[fundamentals] directly. :)

    • @Algovibes
      @Algovibes  2 года назад

      You are absolutely right :D I just watched the part again and facepalmed on myself. Thanks buddy!

  • @diehgo_sp
    @diehgo_sp Год назад +1

    spoiler alert, it doesn't work

    • @Algovibes
      @Algovibes  Год назад

      Can you elaborate? Happy to take a look and make an updated version of this!

  • @chris_bi
    @chris_bi Год назад +1

    Did they change something… I am no more getting any data from yfinance. I only receive an almost empty dictionary { regularMarketPrice : None, logo_url : }

  • @Binancian
    @Binancian 3 года назад +1

    Nice video.Thank you. That booling index method is too much,
    Perhaps, this df2 = df.loc[:,df.columns.isin(fundamentals)] looks simpler.

    • @Algovibes
      @Algovibes  3 года назад

      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!

    • @Lnd2345
      @Lnd2345 Год назад

      Or just df[fundamentals]