Join Whale Returns, Algorithmic Returns, and the S&P 500 Returns into a single DataFrame with columns for each portfolio's returns.Īnalyze the data to see if any of the portfolios outperform the stock market (i.e., the S&P 500). Convert the S&P 500 closing prices to daily returns. The whale portfolios and algorithmic portfolio CSV files contain daily returns, but the S&P 500 CSV file contains closing prices. If any columns have dollar signs or characters other than numeric values, remove those characters and convert the data types as needed. Sp500_history.csv: Contains historical closing prices of the S&P 500 Index. Whale_returns.csv: Contains returns of some famous "whale" investors' portfolios.Īlgo_returns.csv: Contains returns from the in-house trading algorithms from Harold's company. Be sure to convert the dates to a DateTimeIndex. Use Pandas to read the following CSV files as a DataFrame.
#ROLLING EXPONENTIALLY WEIGHTED STANDARD DEVIATION PANDAS CODE#
Use the Whale Analysis Starter Code to complete the following steps: The CSV files include whale portfolio returns, algorithmic trading portfolio returns, and S&P 500 historical prices.
You will then use this analysis to create a custom portfolio of stocks and compare its performance to that of the other portfolios, as well as the larger market ( S&P 500 Index).įor this homework assignment, you have three main tasks:įile: Whale Analysis Starter Code Prepare the Dataįirst, read and clean several CSV files for analysis. You will be given the historical daily returns of several portfolios: some from the firm's algorithmic portfolios, some that represent the portfolios of famous "whale" investors like Warren Buffett, and some from the big hedge and mutual funds. You need to create a tool (an analysis notebook) that analyzes and visualizes the major metrics of the portfolios across all of these areas, and determine which portfolio outperformed the others. You just learned these quantitative analysis techniques with Python and Pandas, so Harold has come to you with a challenge-to help him determine which portfolio is performing the best across multiple areas: volatility, returns, risk, and Sharpe ratios. Some of the investment managers love them, some hate them, but they all think their way is best. Harold's company has been investing in algorithmic trading strategies. Unit 4 Homework Assignment: A Whale Off the Port(folio)