Get Started

Excess returns

In order to perform a robust analysis on your portfolio returns, you must first subtract the risk-free rate of return from your portfolio returns. The portfolio return minus the risk-free rate of return is known as the Excess Portfolio Return.

In the United States, the risk-free rate has been close to 0 since the financial crisis (2008), but this step is crucial for other countries with higher risk-free rates such as Venezuela or Brazil.

The FamaFrenchData DataFrame is available in your workspace and contains the proper data for this exercise. The portfolio you will be working with is the equal-weighted portfolio from Chapter 2.

This is a part of the course

“Introduction to Portfolio Risk Management in Python”

View Course

Exercise instructions

  • Calculate excess portfolio returns by subtracting the risk free ('RF') column from the 'Portfolio' column in FamaFrenchData.
  • Review the plot of returns and excessive returns.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Calculate excess portfolio returns
FamaFrenchData['Portfolio_Excess'] = ____

# Plot returns vs excess returns
CumulativeReturns = ((1+FamaFrenchData[['Portfolio','Portfolio_Excess']]).cumprod()-1)
CumulativeReturns.plot()
plt.show()
Edit and Run Code