Skip to content

TaoNYC/API_MC_Simulation_Portfolio_Forcasting

Repository files navigation

Portfolio Forcast using API and Monte Carlo Simulation

This is a Python application allowing users to do financial planning by calculating his retirement portfolio including crypto, stocks & bond and also use simulation tools to forcast future performance of the portfolio (10 years & 30 years).

The application works by extracting crypo/stock/bond prices by using Alpaca API to evaluate current portfilio valie. Then use monte carlo similuation to forcast the stock/bond portfolio valie in 10 years /30 years by applying past 3 years performance (SPY & AGG with different percentage)


Technologies

This project leverages python 3.7 +, pandas, numpy, pathlib


Installation Guide

Before running the application, first make sure below libaries are installed

  pip install pandas
  pip install numpy

Alerternatively you can simply just install requirement file included in this folder

  pip install -r requirement.txt

Usage

Step 1: run financial_planning_tools.ipynb

python financial_planning_tools.ipynb

Step 2: Evaluate the Cryptocurrency Wallet by Using the Requests Library0

image

Step 3: Evaluate the Stock and Bond Holdings by Using the Alpaca SDK

image

Step 4: Plot the total value of the member's portfolio (crypto and stock/bond) in a pie chart

image

Step 5: run and Visualize the 30-year Monte Carlo simulation on Stock/bond

image

Step 6: Visualize the probability distribution of the 30-year Monte Carlo simulation

image

Step 6: repeat same process of step 5 & 6 for 10 Year

Conclution:

looking at simulation results, even 80% in stocks & 20% in bond, the lower 95% confidence internal is only $70K, which is not likely to be enough to retire in 10 years

Contributors

Brought to you by TaoNYC. connorchen7@gmail.com


License

Columbia Fintech Coding Bootcamp

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published