Robinhood Portfolio Save

DEPRECATED. Portfolio analyzer for Robinhood accounts

Project README

DEPRECATION NOTICE

This app is deprecated. I switched to different broker in 2017. I tried to maintain this repo, but it is becoming increasingly difficult mostly due to lack of interest. Many parts of this repo should be viable as long as the Robinhood API stays the same.

Note

This app is relying on pandas-datareader for stock historical prices. Over the last couple years multiple APIs were obsoleted by their providers (Google Finance, Morningstar) and as I am no longer a RH client I have no time to keep up with those changes. If you encounter the "Bad Gateway" error or similar it is likely that the current market data source is no longer valid. You are welcome to fork and try different sources of quotes - I will try to fix it, when/if I have time.

Current API is TIINGO for stock and market index.

Robinhood Portfolio

Python client to analyze the Robinhood portfolio. Based on unofficial robinhood-api and python libraries for financial analysis, such as:

Current Features

  • Creates a Flask web server with lightweight page Replaced with Jupyter notebook
  • Downloads orders and dividends from Robinhood account.
  • Downloads market data from google API and market index from open source. Supports incremental download for additional dates to reduce a number of requests to open APIs.
  • Calculates the total return of the portfolio, including dividend payouts and risk metric for the portfolio
  • Calculates the risk metric for individual securities and correlations between securities
  • Calculates Markowitz portfolios

LINK to Jupyter Notebook demo

Screenshots (OLD FLASK APP)

Image1 Image2 Image3 Image4 Image5

Non-Docker way

Create virtual environment, install dependencies:

git clone https://github.com/omdv/robinhood-portfolio && cd robinhood-portfolio
virtualenv robinhood && source robinhood/bin/activate && pip3 install -r requirements.txt

Or using conda (my preference):

conda create -n robinhood python=3.7
conda activate robinhood && pip install -r requirements.txt

To run:

jupyter notebook

Open main.ipynb, enter TIINGO api_key, Robinhood credentials, set demo_run variable to False to run with your data, execute all cells.

Docker way

docker run --name robinhood -d -p 8888:8888 omdv/robinhood-portfolio:notebook start.sh jupyter notebook --NotebookApp.token='' --notebook-dir='./work'

Once up and running connect to http://localhost:8888. Open main.ipynb, follow instructions.

Disclaimer

This tool uses the unofficial Robinhood API to access your account. This code and the corresponding tools are provided on "as is" basis and the user is responsible for the safety of his/her own account.


Related

Open Source Agenda is not affiliated with "Robinhood Portfolio" Project. README Source: omdv/robinhood-portfolio
Stars
80
Open Issues
0
Last Commit
3 years ago
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating