CAPM.beta {PerformanceAnalytics} | R Documentation

## calculate CAPM beta

### Description

CAPM Beta is the beta of an asset to the variance and covariance of an initial portfolio. Used to determine diversification potential. also called "systematic beta" by several papers.

This function uses a linear intercept model to achieve the same results as the symbolic model used by `BetaCoVariance`

### Usage

    CAPM.beta(Ra, Rb, rf = 0, digits = 4)

### Arguments

`Ra` | a vector, matrix, data frame, timeSeries or zoo object of asset returns
`Rb` | return vector of the benchmark asset
`rf` | risk free rate, in same period as your returns
`digits` | number of digits to round results to

### Details

cov(Ra,Rb)/var(Ra)

Ruppert(2004) reports that this equation will give the estimated slope of the linear regression of Ra on Rb and that this slope can be used to determine the risk premium or excess expected return (see Eq. 7.9 and 7.10, p. 230-231)

### Value

systematic beta of an asset to the index

### Note

### Author(s)

Peter Carl

### References

Sharpe, W.F. Capital Asset Prices: A theory of market equilibrium under conditions of risk. Journal of finance, vol 19, 1964, 425-442.
Ruppert, David. Statistics and Finance, an Introduction. Springer. 2004.

### See Also

`BetaCoVariance` `CAPM.alpha` `CAPM.utils`

### Examples

    # First we load the data
    data(edhec)
    edhec.length = dim(edhec)[1]
    start = rownames(edhec[1,])
    start
    end = rownames(edhec[edhec.length,])
    edhec.zoo = zoo(edhec, order.by = rownames(edhec))
    rf.zoo = download.RiskFree(start = start, end = end)
    sp500.zoo = download.SP500PriceReturns(start = "1996-12-31", end = end)

    # Now we have to align it as "monthly" data
    time(edhec.zoo) = as.yearmon(time(edhec.zoo))
    time(sp500.zoo) = as.yearmon(time(sp500.zoo))
    time(rf.zoo) = as.yearmon(time(rf.zoo))
    data.zoo = merge(edhec.zoo[,9,drop=FALSE],sp500.zoo)
    time(data.zoo) = as.Date(time(data.zoo),format="%b %Y")
    time(rf.zoo) = as.Date(time(rf.zoo),format="%b %Y")

    CAPM.beta(data.zoo[, 1, drop=FALSE], data.zoo[, 2, drop=FALSE], rf = rf.zoo)

[Package PerformanceAnalytics version 0.9.5 Index]