StockReport is a Python program that allows you to simply create an automated PDF report about a stock.
Before starting please install the following packages:
pip install alpha_vantage
pip install pandas
pip install fpdf
pip install plotly
pip install kaleido
Then install stock-report:
pip install stock-report
This project is build with the Alpha Vantage API
You can request a free key at the following link: Claim API Key
Mac
- From your terminal, type in:
export ALPHAVANTAGE_API_KEY=xxx
- Make sure to use your actual API key for the value. You can confirm that the environment variable is saved by typing in the following which should display your API key:
echo $ALPHAVANTAGE_API_KEY
or
- From your terminal, type in:
nano .zshenv
- In nano insert
export ALPHAVANTAGE_API_KEY=xxx
- Close nano
- Restart
Windows
- Click Start and type in
environment variables
. You should see an option to Edit environment variables for your account. - In the new window that pops up, click New under the User variables section.
- Your variable name should be
ALPHAVANTAGE_API_KEY
and the variable value is where you can paste in your key.
Run with:
python3 -m stock_report
You can find your pdf in the download folder.
You can view the examples here.
MIT See here