Giter Club home page Giter Club logo

module_4_challenge's Introduction

Risk Return Analysis

This application takes in historical price data from 4 large portfolios as well as the S&P-500 and examines the performance of each of the 4 funds against the S&P-500 ultimately choosing one and recommending it as an investment for a retirement account. It takes into account various performance and statistical metrics like annual expected return, standard deviation, variance, sharpe ratio and Beta.


Technologies

This project uses the Python Programming language in a Jupyter Notebook as well as the following libraries

- Pandas
- Pathlib
- matplotlib
- Numpy

Installation Guide

To install you will want to pull the entire Risk_Return folder from github including its subfolder

* Subfolder
    * Resources (data folder)
    * risk_return_analysis.ipynb (the jupyter notebook itseld)

How it works

  1. First the user will open the risk_return_analysis.piynb notebook in the Risk_Return folder

  2. Then the user will simply run each cell in the notebook to get its output

    i) The app will collect the data from the whale_navs.csv and read it into a dataframe

    ii) Then it will check each dataframe for null values

    iii) Then it will process the data, calculating the daily % change and dropping the NaN values from the % change calculation

    iv) Then it will plot the daily % returns of each fund on one plot and gather the basic statistical data of each fund by use of the pandas describe function

    v) Then it will calculate the cumulative performance of each fund as well as the S&P-500 and plot them together

    vi) Then it will create a box plot to help visualize the volatility of each fund (it will do this twice, once with the S&P and once without it)

    vii) Then it will calculate and examine the mean and standard deviation of each portfolio ranking them from smallest to largest

    viii) Then it will plot the 21 day rolling standard deviation (it will do this twice, once with the S&P and once without it)

    ix) Then it will calculate and plot the Sharpe Ratio of each fund

    x) It will then conclude by calculating the Beta of the two funds with the best Sharpe Ratios and making a reccomendation on which of the two to buy.


Usage

Overall it should be a very simple application to use, all you need to do is open the risk_return_analysis.ipynb app in the Risk_Return folder and run each cell in order


Contributors

Colin Benjamin

Linkedin: Colin Benjamin

email: [email protected]


License

MIT

module_4_challenge's People

Contributors

narwhilian 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.