Skip to content

davepoppins5073/Challenge5_FinancialPlanning

Repository files navigation

Challenge5_FinancialPlanning

istockphoto-1166136976-612x612

Background

My client in this exercise is a credit union. I need to build a tool to help the credit union members evaluate their financial health. That's very vague, however the credit union board wants its members to be able to assess their monthly budgets. They should also be able to forecast a reasonably effective retirement plan based on their current holdings of cryptocurrencies, stocks, and bonds.

Project Outline

Part 1: Create a Financial Planner for Emergencies

  1. Evaluate the Cryptocurrency Wallet by Using the Requests Library
  2. Evaluate the Stock and Bond Holdings by Using the Alpaca SDK
  3. Evaluate the Emergency Fund

Part 2: Create a Planner for Retirement

  1. Create the Monte Carlo Simulation
  2. Analyze the Retirement Portfolio Forecasts
  3. Forecast Cumulative Returns in 10 Years

Requirements/ Installations

The requirement.txt file in this repository contain all the packages you'll need in your conding env. Please make sure to install if you do not have them already. While you could use the package manager pip to install these individually please make use of the requirement text in the repo.

pip install for Requirements

python -m pip install -r requirements.txt

Imports

import numpy as np
import pandas as pd
import os
import alpaca_trade_api as tradeapi
import datetime as dt
import pytz
from MCForecastTools import MCSimulation

A word about predictions

9780812973815

“Consider a turkey that is fed every day. Every single feeding will firm up the bird’s belief that it is the general rule of life to be fed every day by friendly members of the human race “looking out for its best interests,” as a politician would say. On the afternoon of the Wednesday before Thanksgiving, something unexpected will happen to the turkey. It will incur a revision of belief.*” ― Nassim Nicholas Taleb, The Black Swan: The Impact of the Highly Improbable

It important whenever we are talking about prediction in any discipline, finance of course included, to acknowledge our blind spots and the extent to which the past can be a proxy for future occurrences. In thos exercise we used the Monte Carlo Method of simulation in order to predict future occurences in order to help credit union members plan for the future.

CODE

api.env

# Load the environment variables from the .env file
# by calling the load_dotenv function
load_dotenv('app.env')

In order for this code to work for you, you would need to have API keys saved to a file kept in the same directory as your ipynb file. In this case we are using the Alpaca API. If you have not done so please visit the Alpaca Website now get your API Keys.

FUNCTIONS

  1. API_CryptoCoinSetup
  2. API_CryptoPrices
  3. create_savings_df

Screen Shot 2022-04-24 at 10 17 19 PM

Screen Shot 2022-04-24 at 10 21 17 PM

Screen Shot 2022-04-24 at 10 22 49 PM

My Answer

From Investopedia we have the following: "Most experts say your retirement income should be about 80% of your final pre-retirement annual income.1 That means if you make $100,000 annually at retirement, you need at least $80,000 per year to have a comfortable lifestyle after leaving the workforce."

Judging from that quopte alone, it is fair to say that this question is not nuanced enough to answer correctly. You cannot estimate what this person needs to retire without knowing:

  1. What kind of lifestyle/quality of life does this person want after retirement?
  2. What will be their monthly and yearly withdrawals ?
  3. What is their current salary? We know that member's household income is $12,000? (Is this pre-taxes, generated by 2 people?)

What this question seeks to ask is whether an investor can make more money, or money equal to their projected returned by investing more in a more volatile asset for a shorter period of time. The answer comes down to which stock? For this stock here SPY. the answer is no. However I want to show proof.

SPY

#####Sharpe Ratio Chart

-- The Sharpe Ratio shows whether the portfolio's excess returns are due to smart investment decisions or a result of taking a higher risk. The higher a portfolio's Sharpe ratio, the better its risk-adjusted performance. The current SPDR S&P 500 ETF Sharpe ratio is 0.23. A Sharpe ratio between 0 and 1.0 is considered sub-optimal.

SPY

Sortino Ratio Chart -- The Sortino Ratio is an indicator that measures a portfolio's risk-adjusted performance. The Sortino ratio is the ratio of a portfolio's excess return to risk. It is widely used as an indicator of the "quality" of an investment fund or portfolio. The current Sortino ratio is -0.13 - A Sortino ratio between 0 and 1.0 is considered sub-optimal.

You can see the work I did below but I reran the Monte Carlo assuming the same amount of starting capital, and got a new upper and lower limit with 95% certainty:

80/20 ratio Scenario 1 -> 10 years lower w/SPY Stock: $56,633.15 -> 10 years upper w/SPY Stock: $117,595.54

880/20 ratio Scenario 2 -> 10 years lower w/ TSLA Stock: $75,205.31 -> 10 years upper w/ TSLA Stock: $366,625.64

My guess and I am not a portfolio manager, is that the strategy of investing more in a more volatile asset for a shorter period of time can work if the right stock is picked.

Resources

investopedia: http://investopedia.com portfolio labs: https://portfolioslab.com

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published