Skip to content

In this project, I will use quantitative analysis techniques, such as Sharpe Ratio's to leverage algorithmic trading strategies

Notifications You must be signed in to change notification settings

jharvey09/Harolds_A_Whale

Repository files navigation

Harold's A Whale

image

Table of Contents:

Background

Steps

Historical Data

Index:

Quatitive Analysis

Performance Analysis

Risk Analysis

Box Plot

Standard Deviation

Risky Portfolio

Annualized Standard Deviation

Rolling_Statistic

Calculate/Plot Correlation

Rolling Statistic Exponetially Weighted Average

Background:

I will be creating a Retirement Planning tool; that will use the Alpaca API to grab historical closing prices for a projected retirement portfolio. The portfolio will be composed of stocks and bonds, later running a few different Monte Carlo simulations to predict the portfolio performance at 30 years.

Steps:

First, read and clean several CSV files for analysis using Pandas as a DataFrame. Be ready to convert the dates to a DateTimeIndex. Next, detect and remove null values. If any columns have dollar signs or characters other than numeric values, remove those characters and convert the data types as needed. Join the CSV into a single DataFrame with columns for each portfolio's returns.

image

Conduct Quantitative Analysis:

Analyze the data to see if any portfolios outperform the stock market (i.e., the S&P 500).

Performance Analysis:

Calculate and plot the daily returns of all portfolios. Calculate and plot cumulative returns for all portfolios. Does any portfolio outperform the S&P 500?

image

image

Risk Analysis:

Create a box plot for each of the returns. Calculate the standard deviation for each portfolio. Determine which portfolios are riskier than the S&P 500. Calculate the Annualized Standard Deviation.

Box Plot:

image

Standard Deviation:

image

Which Portfolios Are Risker?:

image

Annulaized Standard Deviation:

image

Rolling Statistics:

Calculate and plot the rolling standard deviation for all portfolios using a 21-day window. Calculate and plot the correlation between each stock to determine which portfolios may mimic the S&P 500. Choose one portfolio, then calculate and plot the 60-day rolling beta between it and the S&P 500.

21 Day Rolling Standard Deviation:

image

Calculate/Plot Correlation:

image

Rolling Statistics Challenge: Exponentially Weighted Average

An alternative method to calculate a rolling window is to take the exponentially weighted moving average. Also, like a moving window average, but it assigns greater importance to more recent observations.

image

Sharpe Ratios:

Investment managers and their institutional investors look at the return-to-risk ratio, not just the returns. If; you have two portfolios that each offer a 10% return on investment. Yet one is lower risk; which portfolio would be the best fit?

image

Historical Data:

APPLE CSV

ALGORITHMIC RETURNS

COSTCO

GOOGLE

S&P500

WHALE RETURNS

About

In this project, I will use quantitative analysis techniques, such as Sharpe Ratio's to leverage algorithmic trading strategies

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published