https://github.com/sarahm44/personal-financial-planning
Personal finance and retirement planner which utilises Alpaca API and Alternative Free Crypto API. Monte Carlo Simulations are used to project future retirement investment performance.
https://github.com/sarahm44/personal-financial-planning
alpaca-markets crypto-api financial-analysis fintech fintech-api monte-carlo-simulation personal-finance python3
Last synced: 8 months ago
JSON representation
Personal finance and retirement planner which utilises Alpaca API and Alternative Free Crypto API. Monte Carlo Simulations are used to project future retirement investment performance.
- Host: GitHub
- URL: https://github.com/sarahm44/personal-financial-planning
- Owner: sarahm44
- Created: 2022-03-11T23:32:30.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-05T07:40:49.000Z (over 3 years ago)
- Last Synced: 2025-02-09T12:32:00.025Z (10 months ago)
- Topics: alpaca-markets, crypto-api, financial-analysis, fintech, fintech-api, monte-carlo-simulation, personal-finance, python3
- Language: Jupyter Notebook
- Homepage:
- Size: 3.03 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Personal Financial Planning

## Table of Contents
- [Overview](#overview)
* [Personal Financial Planner](#personal-financial-planner)
* [Retirement Planning Tool](#retirement-planning-tool)
- [Financial Planner](#financial-planner)
* [Collect Crypto Prices](#collect-crypto-prices)
* [Collect Investments Data](#collect-investments-data)
* [Perform a Savings Health Analysis](#perform-a-savings-health-analysis)
- [Retirement Planning](#retirement-planning)
* [Monte Carlo Simulation](#monte-carlo-simulation)
* [Retirement Analysis](#retirement-analysis)
* [Early Retirement](#early-retirement)
## Overview
This repo includes the following:
1. Personal Financial Planner
2. Retirement Planning Tool
Both analyses are contained in this [financial planner notebook](https://github.com/sarahm44/unit-5-assignment/blob/main/financial-planner.ipynb).
### Personal Financial Planner
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.
### Retirement Planning Tool
A retirement planning tool that will use the [Alpaca API](https://alpaca.markets/) 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.
## Financial Planner
The elements of the Financial Planner are set out below.
### Collect Crypto Prices
I collected crypto prices for BTC and ETH from [Alternative Free Crypto API](https://alternative.me/crypto/api/) using the requests Library:

### Collect Investments Data
I collected investments data using [Alpaca API](https://alpaca.markets/) for SPY (stocks) and AGG (bonds):

### Perform a Savings Health Analysis
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:

## Retirement Planning
### Monte Carlo Simulation
I collected 5 years of historical investments data using [Alpaca API](https://alpaca.markets/) 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:

### Retirement Analysis
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:

### Early Retirement
The five year retirement option Monte Carlo simulation result is as follows:

The ten year retirement option Monte Carlo simulation result is as follows:
