A demo version of the "Robo Advisor" project, for student reference.
Issues requests to the AlphaVantage Stock Market API in order to provide automated stock or cryptocurrency trading recommendations.
- Anaconda 3.7
- Python 3.7
- Pip
Fork this repository under your own control, then clone or download the resulting repository onto your computer. Then navigate there from the command line:
cd robo-advisor-demo-2019
NOTE: subsequent usage and testing commands assume you are running them from the repository's root directory.
Use Anaconda to create and activate a new virtual environment, perhaps called "stocks-env":
conda create -n stocks-env python=3.7 # (first time only)
conda activate stocks-env
From inside the virtual environment, install package dependencies:
pip install -r requirements.txt
Before using or developing this application, take a moment to obtain an AlphaVantage API Key (e.g. "abc123").
After obtaining an API Key, create a new called ".env" (in your local repo, NOT your remote repo), and update the contents of the ".env" file to specify your real API Key:
ALPHAVANTAGE_API_KEY="abc123"
Don't worry, the ".env" has already been ignored from version control for you!
Run the recommendation script:
python app/robo_advisor.py
Install pytest (first time only):
pip install pytest
Run tests:
pytest
# or, skipping tests that issue network requests:
CI=true pytest