Giter VIP home page Giter VIP logo

financial_planning's Introduction

Financial_Planning

This jupyter notebook does two things. Firstly, a portfolio consisting of stocks, bonds and cryptocurrency are evaluated to check for emergency fund adequacy against the given monthly income of $12,000. Secondly, the stock/bond portion of the portfolio is analyzed to see if the owner is able to retire in 10 years. A 10 and 30 year Monte Carlo Simulation are run with a 95% confidence interval to determine the range the portfolio is most likely going to be valued at for the given time periods. This ultimately gives a recommendation on whether or not the owner can retire in 10 years given a more aggressive investment strategy.


Technologies

Language: Python 3.9.12

Libraries used:

Pandas - For the creation and visualization of Data Frames

Jupyter Labs - An ipython kernel for interactive computing in python

OS - Miscellaneous operating system interface

Dotenv - Module to load environment variables

Alpaca Trade API - API for the Alpaca trading platform

MC Forecast Tools - A copy of this module is included in the downloadable files for this project


Installation Guide

If you are using an anaconda or a conda environment chances are pandas, os and jupyter labs are already installed in your virtual environment

If they are not then run:

    pip install pandas
    pip install jupyterlab
    pip install os

dotenv and alpaca_trade_api need to be installed separately as they do not come in the anaconda environment. You will need to run:

    pip install dotenv
    pip install alpaca-trade-api

A copy of the 'MCForecastTools.py' file is included in this repository.


Usage

To run this jupyter lab notebook you will need to use GitBash and navigate to where you have exported the files associated with this project.

Next you will need to perform the following

Activate

This will open a jupyter lab notebook in your default browser with a special paramater to allow the .env file to be seen as it is usually a hidden file type.

Important: You are going to need to create a .env file and populate it with your own personal Alpaca API Key and Secret Key.

Here is what it should look like:

.env

To do this you create a new text file from the notebook launcher and rename it .env make sure to remove the .txt portion.

Next open 'financial_planning_tools.ipynb' and click the double arrow to run the notebook. Alternatively you can run each cell individually.

Make sure to follow the pseudocode to see the coding logic and fully understand what is being displayed.

Note - This may take a while to run as the Monte Carlo Simulation typically has a faily long run time. Expect around 3-5 minutes of waiting before notebook is complete.


Highlights:

Here are a few snippets of what you can find in this project

JSON Data from API:

json_data

10 Year Simulation Plot:

cumulative_10

10 Year Simulation Distribution:

distribution


Contributors

Created by Silvano Ross while in the UW FinTech Bootcamp

Contact Info: email: [email protected] | GitHub | LinkedIn


License

MIT

financial_planning's People

Contributors

silvanoross avatar

Watchers

 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.