Skip to content

shijialee/stock_data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Goal

Get historical data to do backtesting.

Prepare

  • refresh nasdaq / nyse symbols, run this periodically to get latest symbols.
    • source symbol_sync.sh
  • create required sqlite tables
    • sqlite3 stocks.sqlite < schema.sql

Run

  • setup bash env STOCK_LOG_LEVEL for log level
    • for example: export STOCK_LOG_LEVEL=DEBUG
  • get history since 2021-01-01
    • python history.py --date 2021-01-01 > /tmp/history.log 2>&1
  • generate moving average for last 300 days - need at least 150 working days data
    • python moving_average.py 300

About

Prepare stock data for backtesting

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published