Portfolio returns during the crisis
The first step in quantifying the effects of uncertainty on a financial portfolio is to examine the portfolio's return. You'll consider a portfolio of four investment bank stocks, which were both instigators and victims of the global financial crisis.
The banks are Citibank, Goldman Sachs, J.P. Morgan, and Morgan Stanley. Closing stock prices for the period 2005 - 2010 are in the available portfolio
DataFrame. You'll use this to examine the dramatic price changes during the depths of the crisis, 2008 - 2009. You'll also see how volatile the resulting portfolio_returns
were, assuming an equal-weighted portfolio with weights stored in the weights
list.
In this and in all future exercises, numpy
, pandas
and matplotlib.pyplot
are available as np
, pd
, and plt
respectively.
This exercise is part of the course
Quantitative Risk Management in Python
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Select portfolio asset prices for the middle of the crisis, 2008-2009
asset_prices = portfolio.____['2008-01-01':'2009-12-31']
# Plot portfolio's asset prices during this time
asset_prices.____.set_ylabel("Closing Prices, USD")
plt.show()