CAPM.alpha {PerformanceAnalytics} | R Documentation

## calculate CAPM alpha

### Description

This is a wrapper for calculating a CAPM alpha.

"Alpha" purports to be a measure of a manager's skill by measuring the portion of the managers returns that are not attributable to "Beta", or the performance relative to a benchmark.

### Usage

    CAPM.alpha(Ra, Rb, rf = 0)

### 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

### Value

CAPM alpha

### 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

`CAPM.beta` `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.alpha(data.zoo[, 1, drop=FALSE], data.zoo[, 2, drop=FALSE], rf = rf.zoo)

[Package PerformanceAnalytics version 0.9.5 Index]