I was tasked with analysing a number of financial portfolios across the areas of:
- volatility
- returns
- risk
- Sharpe ratios
I created an analysis notebook that analyzes and visualizes the major metrics of the portfolios across all of these areas, and determines which portfolio outperformed the others.
My data set included a number of different portfolios.
The three main tasks were to:
- Read in and wrangle returns data
- Determine success of each portfolio
- Choose and evaluate a custom portfolio
For the data preparation I was required to do the following:
- Use Pandas to read each CSV file in as a DataFrame.
- Detect and remove all null values.
- Convert the S&P 500 closing prices to daily returns.
- Join the Whale Returns, Algorithmic Returns, and the S&P 500 Returns into a single DataFrame with columns for each portfolio's individual returns.
See the single DataFrame below:
In this section, I was required to calculate and visualize performance and risk metrics for the portfolios.
I was required to calculate and plot Beta for a chosen portfolio (algo 1) and the S&P 60 TSX.
Determine whether the algorithmic strategies outperform both the market (S&P TSX 60) and the whales portfolios
I created a custom portfolio of Cardano, Bitcoin and Ethereum.
I used the Google Finance function to choose a portfolio, then downloaded the data needed as CSV files.
In my notebook I read in the CSVs and joined them as a single DataFrame, as below:
I calculated the weighted returns for the portfolio assuming an equal number of shares for each stock:
Then I added these to my DataFrame containing all portfolios:
I was required to calculate and plot 60-day Rolling Beta for My Portfolio compared to the S&P 60 TSX.