Giter VIP home page Giter VIP logo

robinhood-portfolio's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.