This Jupyter notebook contains code that automates a quantitative analysis using statistical algorithms to evaluate investment options for inclusion into client portfolios based on key risk-management metrics: the daily returns, standard deviations, Sharpe ratios, and betas. The analysis includes four new investment options (Soros, Tiger Global, Berkshire Hathaway, & Paulson) for inclusion in the client portfolios compared to the S&P 500 Index.
Programming Language: Python 3.7.13
Interactive Development Environment: JupyterLab
Libraries:
Pandas
- A Python library that is used for data manipulation, analysis, and visualization.Pathlib
- A Python module that provides an object-oriented interace to working with files & directories.Numpy
- A Python library that is used for scientific computing and data analysis and provides a number of mathematical functions that can be applied to large sets of numerical data such as linear algebra operations, Fourier transforms, and random number generation.Matplotlib
- A Python for creating static, animated, and interactive visualizations in Python. It provides a wide variety of customizable visualizations, including line plots, scatter plots, bar plots, histograms, heatmaps, and more.
Operating System(s): Any operating system that supports Python, including Windows & macOS.
To run this analysis, make sure you install the necessary dependencies:
- Install
Python
:https://www.python.org/downloads/
- Install and run
Jupyter Lab
:https://jupyter.org/install
- Install the necessary libraries using pip, the package installer for Python:
pip install pandas pathlib numpy matplotlib
- Clone the repository:
git clone "https://github.com/mikenguyenx/4_risk_return_analysis"
using git or download the ZIP file and extract it to a local directory.
To run the script for the Fund Portfolio Risk Return Analysis:
- Open a terminal or command prompt and navigate to the directory with the analysis.
- Launch Jupyter Lab:
jupyter lab
- Open
risk_return_analysis.ipynb
in Jupyter Lab. - Run the code cells by clicking on the run button or by pressing the
Shift + Enter
key combination to load and preprocess the data, and generate visualizations - The script uses
Pandas
to collect CSV data into theJupyter notebook
file for analysis using statistical algorithms andMatplotlib
visualizations to analyze fund portfolio performance, risk, volatility, and portfolio returns.
Below are screenshots of examples of results from the analysis:
Mike Nguyen
MIT