- Using a portfolio data to determine which portfolio is performing the best across multiple areas:
- volatility
- returns
- risk
- Sharpe ratios
- This python code compares my custom portfolio to the whales and two alogorithmic trading strategies
- This code compares if my custom portfolio:
- Outperforms
- Underperforms
- Or Equally perfroms
-
Analyze whale Returns of Soros, Paulson,Tiger and Berkshire
-
Analyze Algorithm 1 and Algorithm 2 Daily Returns
-
S&P 500 Returns
-
Performance Analysis
-
Risk analysis:
-
Rolling Statistics.
- Calculate and plot the rolling standard deviation for all portfolios using a 21-day window
- Calculate the correlation between each stock to determine which portfolios may mimick the S&P 500
- Choose one portfolio, then calculate and plot the 60-day rolling beta between it and the S&P 500
- Calculate and Plot Beta for a chosen portfolio and the S&P 500
-
Sharpe ratio analysis
-
Determine whether the algorithmic strategies outperform both the market (S&P 500) and the whales portfolios.
-
Create Custom Portfolio
- Choose 3-5 custom stocks with at last 1 year's worth of historic prices and create a DataFrame of the closing prices and dates for each stock.
- Calculate the weighted returns for the portfolio assuming an equal number of shares for each stock
- Calculate the Annualized Standard Deviation.
- Calculate and plot rolling
std
with a 21-day window. - Calculate and plot the correlation.
- Calculate and plot beta for your portfolio compared to the S&P 60 TSX.
-
Calculate the Sharpe ratios and generate a bar plot.
- File: Whale Analysis