Estimate Capital Asset Pricing Model Using SUR
This example shows how to implement the capital asset pricing model (CAPM) using the Econometrics Toolbox™ VAR model framework.
The CAPM model characterizes comovements between asset and market prices. Under this framework, individual asset returns are linearly associated with the return of the whole market (for details, see [105], [154], and [201]). That is, given the return series of all stocks in a market () and the return of a riskless asset (), the CAPM model for return series () is
for all assets in the market.
is an -by-1 vector of asset alphas that should be zero, and it is of interest to investigate assets whose asset alphas are significantly away from zero. is a -by-1 vector of asset betas that specify the degree of comovement between the asset being modeled and the market. An interpretation of element of is
If , then asset moves in the same direction and with the same volatility as the market, i.e., is positively correlated with the market.
If , then asset moves in the opposite direction, but with the same volatility as the market, i.e., is negatively correlated with the market.
If , then asset is uncorrelated with the market.
In general:
determines the direction that the asset is moving relative to the market as described in the previous bullets.
is the factor that determines how much more or less volatile asset is relative to the market. For example, if , then asset is 10 times as volatile as the market.
Load and Process Data
Load the CAPM data set included in the Financial Toolbox™ documentation.
load CAPMuniverse
varWithNaNs = Assets(any(ismissing(AssetsTimeTable),1))
varWithNaNs = 1×2 cell
{'AMZN'} {'GOOG'}
dt = AssetsTimeTable.Time;
dt.Format = "yyyy-MM-dd";
dateRange = [dt(1) dt(end)]
dateRange = 1×2 datetime
2000-01-03 2005-11-07
T = height(AssetsTimeTable)
T = 1471
The AssetsTimeTable
is a timetable containing 1471 daily returns of a set of 12 stocks (columns 1 through 12), the return of the whole market (column 13, MARKET
), and one riskless asset (column 14, CASH
). The returns were measured from 2000-01-03 through 2005-11-07. AMZN
and GOOG
had their IPO during sampling, and so they have missing trailing values.
Compute the response and predictor series for the SUR by subtracting all assets and the market return by the riskless asset.
DTT = varfun(@(x)(x - AssetsTimeTable.CASH),AssetsTimeTable(:,1:13)); DTT.Properties.VariableNames = AssetsTimeTable.Properties.VariableNames(1:13); n = width(DTT) - 1
n = 12
DTT
is a 1471-by-13 timetable of the 12 asset and market return series adjusted by the riskless return.
Create Multivariate Time Series Model
Create a varm
model object that characterizes the CAPM model. You must specify the number of response series and degree of the autoregressive polynomial.
Mdl = varm(n,0);
Mdl
is a varm
model object that characterizes the desired CAPM model.
Estimate Multivariate Time Series Model
Pass the CAPM model specification (Mdl
), the response series (Y
), and the predictor data (X
) to estimate
. Request to return the estimated multivariate time series model and the estimated coefficient standard errors. estimate
maximizes the likelihood using the expectation-conditional-maximization (ECM) algorithm.
[EstMdl,EstCoeffSEMdl] = estimate(Mdl,DTT{:,1:(end-1)},X=DTT{:,end});
EstMdl
has the same structure as Mdl
, but EstMdl
contains the parameter estimates. EstCoeffSEMdl
is a structure array containing the estimated standard errors of the parameter estimates. EstCoeffSEMdl
:
Contains the biased maximum likelihood standard errors.
Does not include the estimated standard errors of the intra-period covariances.
Analyze Coefficient Estimates
Display the regression estimates, their standard errors, their t statistics, and p-values. By default, the software estimates, stores, and displays standard errors from maximum likelihood.
results = summarize(EstMdl); results.Table
ans=24×4 table
Value StandardError TStatistic PValue
___________ _____________ __________ __________
Constant(1) 0.0044305 0.0013709 3.2319 0.0012298
Constant(2) 0.00016934 0.0012625 0.13413 0.8933
Constant(3) -0.00039977 0.00072318 -0.5528 0.5804
Constant(4) -0.00067309 0.00070971 -0.9484 0.34293
Constant(5) 0.00018643 0.001389 0.13421 0.89324
Constant(6) 0.0046034 0.0014338 3.2107 0.0013242
Constant(7) 0.0015126 0.00088576 1.7077 0.087697
Constant(8) -0.00022511 0.00050184 -0.44856 0.65375
Constant(9) 0.00020429 0.00072638 0.28124 0.77853
Constant(10) 0.00016834 0.00042152 0.39937 0.68962
Constant(11) 0.0004766 0.00086392 0.55167 0.58118
Constant(12) 0.00083861 0.00093527 0.89665 0.3699
Beta(1,1) 1.385 0.20647 6.708 1.9727e-11
Beta(2,1) 1.4067 0.19016 7.3974 1.3886e-13
Beta(3,1) 1.0482 0.10892 9.6237 6.353e-22
Beta(4,1) 0.84687 0.10689 7.9226 2.3256e-15
⋮
Response series 6 has a significant asset alpha.
sigASymbol = Assets(6)
sigASymbol = 1×1 cell array
{'GOOG'}
As a result, GOOG
has exploitable economic properties.
All asset betas are greater than 3. This indicates that all assets are significantly correlated with the market.
However, GOOG
has an asset beta of approximately 0.37
, whereas all other asset betas are greater than or close to 1. This indicates that the magnitude of the volatility of GOOG
is approximately 37% of the market volatility. The reason for this is that GOOG
steadily and almost consistently appreciated in value while the market experienced volatile horizontal movements.
For more details and an alternative analysis, see Capital Asset Pricing Model with Missing Data.