Building a Python stock screener from scratch

  Рет қаралды 9,907

Python enthusiast

Python enthusiast

Күн бұрын

Support the channel via the links below:
Paypal: www.paypal.com...
www.buymeacoff...
The goal of this tutorial is to give you the tools so you can build a stock screener on your own based on your own criteria. The focus is on how to extract financial data so that you can use them later on and apply different criteria.
Link to the .py file: github.com/kos...

Пікірлер: 26
@pilusass
@pilusass 2 жыл бұрын
Thanks. I would be great to see how you integrate fundamental analysis in this screening exercise
@Kig_Ama
@Kig_Ama 2 жыл бұрын
Your example is based on the tickers of the S&P 500. Is there a way to create the same screener but not based on only the tickers of the S&P 500 but based on all tickers available on yahoo finance?
@Pythonenthusiast
@Pythonenthusiast 2 жыл бұрын
Not really, no. But what is possible is to first extract the tickers that you are interested in and then import them into your script.
@Kig_Ama
@Kig_Ama 2 жыл бұрын
@@Pythonenthusiast Ty, but my problem wit this is, I dont know in which stocks I am interested in, thats why I want to program a stock screener in order to find the right ones by filtering according to specific ratios like dividend yield, gross margin, ev to revenue, and so on. Thats why I need the whole universum of stocks, the whole list of tickers. Thats why u need a stock screener.
@enzanto
@enzanto 9 ай бұрын
@@Kig_Ama not sure if there is a list that big available. Myself I scan every stock on norwegian stock market every day, as i prefer those stocks due to tax rules here. But if you want to scan as much as possible. you might want to start making a big list of all stocks that _might_ be interesting. and use that list to make a scanner.
@MKSundaram
@MKSundaram 2 жыл бұрын
Thanks for your simple and to the point video. Could you please upload a video on building web application for trading journal in python, sql, flask, etc? Thanks
@nini9042
@nini9042 11 ай бұрын
at around 7:50, why can't we set the attributes as index then use .loc to find what we need?
@Kig_Ama
@Kig_Ama 2 жыл бұрын
Sometimes the collecting data function returns something went wrong, in this case I would love to give another try for that ticker, how I have to change the code so that the ticker is used with another try?
@nomcognom2332
@nomcognom2332 2 жыл бұрын
Problem with Yahoo is that the page detects when you scrap it and after several tickers the site only lets you obtain not most recent financials.
@Pythonenthusiast
@Pythonenthusiast 2 жыл бұрын
That's a valid point and since it's free data, that's to be expected. However, using time.sleep(X) for a certain period for every Y amount of tickers might be a solution. Especially if you're scraping the data once in a while.
@nomcognom2332
@nomcognom2332 2 жыл бұрын
@@Pythonenthusiast Yeah. For few tickers it's good but if you want to create a good database in JSON files it's quite a problem. Anyway, your youtube financial series are great, man, keep it up!! :)
@robertoness142
@robertoness142 Жыл бұрын
Is possible to build a stock screener giving a score to every single value (ebitda, netdebt) and have a standing of the best rated stocks?
@Pythonenthusiast
@Pythonenthusiast Жыл бұрын
Absolutely!
@robertoness142
@robertoness142 Жыл бұрын
@@Pythonenthusiast that would be the real deal, you have the best stocks with a click. can i give a score to an indicator or a ratio, exemple: revenue/ebitda: from 0 to 0,2 5 pts >=0,2 to 0,5 4 pts tec. and them add the points for all indicators to build a standing. thanks for any replay
@Kig_Ama
@Kig_Ama 2 жыл бұрын
10:09 Why do u want to calculate the market cap or enterprise value, yahoo finance provides these values. I dont get it.
@Pythonenthusiast
@Pythonenthusiast 2 жыл бұрын
That's a great question! I'd like to answer it in two parts: 1. On many occasions I've noticed that Yahoo Finance data is incorrect, not up-to-date or I don't agree with the formulas used. 2. As for the market cap, that's definitely available and can be used from yahoo finance. As this tutorial is for educational purposes, I thought it would be good to have it in as the # of shares can be used later on if someone wants to make projections about the future and then divide those forecasts per share (such as EPS 5 years down the line). As for the enterprise value, in my opinion, long-term investments should be taken out as well and in some cases, yahoo finance doesn't do that. I am not sure whether there's some technical reason behind that. So don't blindly trust the numbers that you get out of Yahoo Finance :) I hope this helps :)
@Kig_Ama
@Kig_Ama 2 жыл бұрын
@@Pythonenthusiast Great ty for your answer, looking forward to seeing more vids like that.
@finvulisetti3987
@finvulisetti3987 2 жыл бұрын
Hi, great tutorial. I get certificate has expired (_ssl.c:997) error in ssl.py. I installed certs from yahoo site. Didnt solve it. Any ideas?
@JuanRamirez-di9bl
@JuanRamirez-di9bl Жыл бұрын
Add the following in your imports: import ssl ssl._create_default_https_context = ssl._create_unverified_context
@dimitriosdesmos4699
@dimitriosdesmos4699 2 жыл бұрын
A word of warning....although this is a great python video, DO NOT EVER, PICK STOCKS BASED ON FUNDAMENTALS, UNLESS DIVIDENDS ARE INVOLVED AND NO TRADING IS INVOLVED...JUST INVESTING......Fundamentals are not for Trading, it is a TRAP.
@Pythonenthusiast
@Pythonenthusiast 2 жыл бұрын
Great addition Dimitrios, this is just a video for education purposes. I will not be commenting on how should (or shouldn't) one invest/trade, it's a process that is different for everyone :) Some people like dividends, some not so much, some people prefer stable companies with low volatility, others prefer high growth companies.
@riyadhswe
@riyadhswe 2 жыл бұрын
1st view
@codycook3170
@codycook3170 2 жыл бұрын
👊 p̴r̴o̴m̴o̴s̴m̴
@ssautolife3841
@ssautolife3841 2 жыл бұрын
i was wondering if you can build a stock scanner for me . can i call u or u call me or something
Fundamental Analysis of Stocks with Python
19:09
Algovibes
Рет қаралды 28 М.
If __name__ == "__main__" for Python Developers
8:47
Python Simplified
Рет қаралды 407 М.
Don't look down on anyone#devil  #lilith  #funny  #shorts
00:12
Devil Lilith
Рет қаралды 45 МЛН
Mom had to stand up for the whole family!❤️😍😁
00:39
15 Python Libraries You Should Know About
14:54
ArjanCodes
Рет қаралды 394 М.
This is How I Scrape 99% of Sites
18:27
John Watson Rooney
Рет қаралды 121 М.
Download financial statements from Yahoo Finance with Python
13:52
Python enthusiast
Рет қаралды 20 М.
Predict The Stock Market With Machine Learning And Python
35:55
Dataquest
Рет қаралды 700 М.
How To Build A Trading Bot In Python
18:46
CodeTrading
Рет қаралды 786 М.
Financial Data with Python: yfinance
34:09
Data Science for Everyone
Рет қаралды 73 М.
Streamlit Elements You Should Know About in 2023
14:31
Mısra Turp
Рет қаралды 102 М.
Why technical 'analysis' is garbage (explained by a quant developer)
10:00
How To Build a Stock Screener | Python For Finance Episode 3
25:41
Richard Moglen
Рет қаралды 94 М.