Technical Analysis Reporting tool
A basic Python program to
- Fetch daily price history for a symbol
- Use TA-Lib to compute some technical indicators
- Find BUY/SELL dates in the history
- Graph and report all the above, saving as PDF
Setup
Install TA-Lib
wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz \
&& sudo tar -xzf ta-lib-0.4.0-src.tar.gz \
&& sudo rm ta-lib-0.4.0-src.tar.gz \
&& cd ta-lib/ \
&& sudo ./configure --prefix=/usr \
&& sudo make \
&& sudo make install \
&& cd ~ \
&& sudo rm -rf ta-lib/ \
&& pip install ta-lib
Install other packages
pip3 install -r requirements.txt
Usage
Default data source is Alpha Vantage, which requires an API_KEY. Code expects that key to be stored in an environment variable, $API_KEY
. Suggest setting up a .envrc
file and using direnv
Invoke
python3 ./genSymbolReport.py -s "T"