Skip to content

lijeffrey39/stockAnalysis

Repository files navigation

stockAnalysis

Analyzing stock performance using Stock Twits

Running the program

Flags:
--daysback: # days to scrape back from the current day
--numstocks: top n stocks to invest from (lower means more risk)

  1. Scrape data from a given day
# scrape the current day's tweets for all stocks
python3 stocktwits.py --stocks --daysback 0 
  1. Scrape data from users
# scrape tweets from all users 
python3 stocktwits.py --users --daysback 75 
python3 stocktwits.py --u --daysback 20 
  1. Calculate returns from past data
# calculate returns for each day back from current day
python3 stocktwits.py --returns --daysback 30 --numstocks 5 
  1. Predict stocks
# predict which stocks to buy 
# run at end of the day
python3 stocktwits.py --numstocks 1

About

Analyzing stock performance using Stock Twits

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published