Git Product home page Git Product logo

awesome_retirement_portfolio_projector_tool's Introduction

Awesome Retirement Portfolio Projector Tool

The Awesome Retirement Portfolio Projector is a scalable, user friendly application that allows retail investors to do sophisticated predictive modeling for all phases of retirement.

After answering a series of profile questions, retail investors are able to receive a recommended portfolio and to run statistical simulation on stocks in this optimized recommended portfolio; and get a good estimate of their portfolios likely outcome over a specified time horizon. Simulations make use of historical pricing data from the Alpaca API. Simulations can be run for three different risk profiles - Low, Moderate, and High. Lower risk profiles have their portfolio rebalanced to include fixed income as a percent of the portfolio.

The application is a foundation that can be scaled to use a variety of input data sources, customizable expected returns, and limits on the allocation of individual assets. Profile questions can be modified to make a more detailed financial profile around common life scenarios such as debt, dependents, long term care, divorce, and multiple retirement income sources.


Technologies

Built on Python, this application makes use of the following libraries:

  • Fire
  • Questionary
  • Numpy
  • Pandas
  • Voila
  • SciPy
  • alpaca_trade_api
  • sqlalchemy
  • dotenv
  • hvplot
  • matplotlib

The Alpaca Trade api provides a variety of updated stock and financial information.


Installation Guide

All python packages can be installed via PIP in the command line. For the Alpaca API, you will need to create and account and set up an API key at Alpaca

Once you have your Alpaca Key and Alpaca Secret Key, make sure to include it as an ".env" file, following the example of the file "sample.env" included.

Pre-rec Packages


Examples

Here is a walk through example of a user who runs a portfolio simulation with a high risk tolerance.

Asking Profile Questions

Simply tell the app what stocks you have in your portfolio.

Loading Stock Tickers


Usage

To run the application, install the libraries listed above and run (write) python awesome_tool.py from the command line.

The application will provide a recommended portfolio based on risk profile. The key elements for the recommendation are:

  1. Assure diversification by using multiassets, including a set of diversified ETFs and Funds, that is easily customizable in the Jupyter Notebook.

  2. Risk level will be controlled by managing the equity allocation:

  • High Risk : 75 - 90%
  • Moderate Risk: 40 - 60%
  • Low Risk : 5 - 20%
  1. Weights are optimized for a maximum Sharpe ratio.

The application then runs a Montecarlo simulation based on the historical pricing data of your portfolio:

Processing Simulation

The number of runs of the Montecarlo Simulation it has been set to 100 for a faster speed in the running of the program. This is easible customizable in Jupyter lab for higher amounts, like 500 or 1000.

Next steps

We will include in next versions:

1. Option to customize expected returns
3. Inclusion of monthly contributions for retirement (in the MonteCarlo simulation)
4. Rebalance of the portfolio
5. Options to upload several portfolios, and keep them available for next usage
6. Interphase to add portfolio from different sources, such as Schwab, Ameritrade, Fidelity, eTrade, etc.
7. Option to use yahoo finance if .env file for Alpaca is not available

Contributors

Written by team awesome fintech students


License

GPU License

awesome_retirement_portfolio_projector_tool's People

Contributors

paocarvajal1912 avatar woodedlawn avatar fishamekuria2019 avatar charlestwitchell avatar brewmasta avatar

Watchers

James Cloos avatar  avatar  avatar

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.