This repo includes the following:
- Personal Financial Planner
- Retirement Planning Tool
Both analyses are contained in this financial planner notebook.
A personal finance planner that will allow users to visualize their savings composed by investments in shares and cryptocurrencies to assess if they have enough money as an emergency fund.
A retirement planning tool that will use the Alpaca API to fetch historical closing prices for a retirement portfolio composed of stocks and bonds, then run Monte Carlo simulations to project the portfolio performance at 30 years.
The Monte Carlo data will be used to calculate the expected portfolio returns given a specific initial investment amount.
The elements of the Financial Planner are set out below.
I collected crypto prices for BTC and ETH from Alternative Free Crypto API using the requests Library:
I collected investments data using Alpaca API for SPY (stocks) and AGG (bonds):
First I created a DataFrame containing the amount of crypto assets and shares:
Then I visualised this as a pie chart:
Based on a monthly income of $12,000, I used if
conditional statements to validate if the current savings are enough for an emergency fund. It was assumed that an ideal emergency fund should be equal to three times your monthly income:
I collected 5 years of historical investments data using Alpaca API for SPY (stocks) and AGG (bonds):
Then I ran a Monte Carlo simulation to forecast 30 years cumulative returns with 500 runs, and plotted the outcome:
See below a plot of the probability distribution and confidence intervals:
The summary statistics or the Monte Carlo simulation are set out below:
I calculated the expected portfolio return at the 95% lower and upper confidence intervals based on a $20,000 initial investment:
I calculated the expected portfolio return at the 95% lower and upper confidence intervals based on a 50% increase in the initial investment:
The five year retirement option Monte Carlo simulation result is as follows:
The ten year retirement option Monte Carlo simulation result is as follows: