Analyzes and displays the riskiness of your stock portfolio. A project for CS428 at UIUC.
- Install Python 2.7.x
- Create a new virtualenv (
virtualenv venv
) - Activate the virtualenv (
source venv/bin/activate
) - Change directories (
cd venv
) - Clone this repo (
git clone git@github.com:Stock-Portfolio-Risk-Analyzer/spr-web.git stockportfolio
) - Change directories (
cd stockportfolio
) - Run
pip install -r requirements.txt
to install dependencies - Run
python manage.py migrate
to bring in the existing database models - Run
python manage.py runserver 0.0.0.0:5000
- Connect to
localhost:5000
from your webbrowser to view the existing site
Download and install PostgresSQL, including the development packages. For details on how to do this, consult the PostgresSQL documentation for your operating system or Linux distribution.
Then you must create a database called spra
along with a user/password called spra
.
Alternatively, you can change these settings in stockportfolio/settings/local.py
isort -rc --atomic .
flake8 stockportfolio
Optionally, you can configure the site to simulate portfolios for you.
pip install -r simulation-requirements.txt
Note that there are several system requirements that must be met.- Set up the environment:
export MATPLOTLIB_AVAILABLE=YES
To autodoc/generate templates:
sphinx-apidoc -f -o docs/ stockportfolio/ stockportfolio/api/migrations stockportfolio/settings
To build the html pages:
cd docs; make html
An example of how methods should be documented:
def get_stock_data(symbol, start_date=None, end_date=None):
"""
Get OHLC stock data from Yahoo Finance for a single stock
:param symbol: (string)
:param start_date: (DateTime)
:param end_date: (DateTime)
:return: (DataFrame) of stock data from start_date to end_date
"""
- Rohan Kapoor
- Laurynas Tamulevicius
- Enrique Espaillat
- Alex Ashley
- Ronit Chakraborty
- Arpit Dev Mathur
- Shivam Gupta
- Thibaut Xiong