daecker / robo-advisor-demo-2019

A demo version of the "Robo Advisor" project, for student reference

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Robo Advisor" Project - Demo

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.

Prerequisites

  • Anaconda 3.7
  • Python 3.7
  • Pip

Installation

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

Setup

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 file in this repository called ".env", 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!

NOTE: this app will try to use a "demo" API key if this environment variables is not configured.

Usage

Run the recommendation script:

python app/robo_advisor.py

Testing

Install pytest (first time only):

pip install pytest

Run tests:

pytest

# or, skipping tests that issue network requests:
CI=true pytest

About

A demo version of the "Robo Advisor" project, for student reference

License:Other


Languages

Language:Python 100.0%