Exercise

Calculating beta using co-variance

Beta is an essential component of many financial models, and is a measure of systematic risk, or exposure to the broad market. In the CAPM model, beta is one of two essential factors.

Historical beta can be estimated in a number of ways. In this exercise, you will use the following simple formula involving co-variance and variance to a benchmark market portfolio:

$$ \beta_P = \frac{Cov(R_P, R_B)}{Var(R_B)} $$

  • \(\beta_P\): Portfolio beta
  • \(Cov(R_P, R_B)\): The co-variance between the portfolio (P) and the benchmark market index (B)
  • \(Var(R_B)\): The variance of the benchmark market index

The FamaFrenchData DataFrame is available in your workspace and contains the proper data for this exercise.

Instructions 1/3

undefined XP
    1
    2
    3

Generate a co-variance matrix between 'Portfolio_Excess' and 'Market_Excess' columns.