Select Stocks by Volume Increases | Beginner Python Stock Market Tutorial

Опубликовано: 29 Сентябрь 2020
на канале: Derrick Sherrill
25,009
1.1k

In this one, let's create a simple python script which goes through a list of stock tickers and checks to see if their volume is trending much higher today than a previous period.

The idea is that if we know stocks that have big volatility increases, we can research them and see if we should buy in or not.

Sample CSV Data with all stock tickers:
https://github.com/Derrick-Sherrill/D...

WayScript Program
https://wayscript.com/shared/IaWYxEtj

Merch Store --
https://derricksherrill.store/
Support the Channel on Patreon --
  / derricksherrill  
Join The Socials --
Reddit -   / codewithderrick  
FB -   / codewithderrick  
Insta -   / codewithderrick  
Twitter -   / codewithderrick  
LinkedIn -   / derricksherrill  
GitHub - https://github.com/Derrick-Sherrill
*****************************************************************
Full code from the video:

https://github.com/Derrick-Sherrill/D...

** Youtube descriptions don't allow for greater than, less than signs **
import yfinance as yf
import pandas as pd

df = pd.read_csv('companylist.csv')

print(df['Symbol'])
increased_symbols = []

for stock in df['Symbol']:
stock = stock.upper()
if '^' in stock:
pass
else:
try:
stock_info = yf.Ticker(stock)
hist = stock_info.history(period="5d")
previous_averaged_volume = hist['Volume'].iloc[1:4:1].mean()
todays_volume = hist['Volume'][-1]
if todays_volume #greater than previous_averaged_volume * 4:
increased_symbols.append(stock)
except:
pass

print(increased_symbols)


Packages (& Versions) used in this video:
Pandas 1.1
yfinance

*****************************************************************
Thank you for everyone watching! It's super touching that so many people enjoy the content. We just broke 44k subscribers. That's incredible! I can't thank you all enough for the feedback and encouragement on all the videos. Y'all rock!

Code from this tutorial and all my others can be found on my GitHub:
https://github.com/Derrick-Sherrill/D...

Check out my website:
https://www.derricksherrill.com/

If you liked the video - please hit the like button. It means more than you know. Thanks for watching and thank you for all your support!!

--- Channel FAQ --

What text editor do you use?
Atom - https://atom.io/

What Equipment do you use to film videos?
https://www.amazon.com/shop/derricksh...

What editing software do you use?
Adobe CC - https://www.adobe.com/creativecloud.html
Premiere Pro for video editing
Photoshop for images
After Effects for animations

Do I have any courses available?
Yes & always working on more!
https://www.udemy.com/user/derrick-sh...

Where do I get my music?
I get all my music from the copyright free Youtube audio library
https://www.youtube.com/audiolibrary/...

Let me know if there's anything else you want answered!

-------------------------

Always looking for suggestions on what video to make next -- leave me a comment with your project! Happy Coding!