This is a wrapper for calculating a single factor model (CAPM) alpha.
SFM.alpha(
Ra,
Rb,
Rf = 0,
...,
digits = 3,
benchmarkCols = T,
method = "LS",
family = "mopt",
warning = T
)an xts, vector, matrix, data frame, timeSeries or zoo object of asset returns
return vector of the benchmark asset
risk free rate, in same period as your returns
Other parameters like max.it or bb specific to lmrobdetMM regression.
Number of digits to round the results to. Defaults to 3.
Boolean to show the benchmarks as columns. Defaults to TRUE.
string representing linear regression model, "LS" for Least Squares and "Robust" for robust. Defaults to "LS"
If method == "Robust": This is a string specifying the name of the family of loss function to be used (current valid options are "bisquare", "opt" and "mopt"). Incomplete entries will be matched to the current valid options. Defaults to "mopt". Else: the parameter is ignored
Boolean to show warnings or not. Defaults to TRUE.
"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 portion of performance attributable to a benchmark.
While the classical CAPM has been almost completely discredited by the literature, it is an example of a simple single factor model, comparing an asset to any arbitrary benchmark.
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.
# First we load the data
data(managers)
SFM.alpha(managers[, "HAM1"], managers[, "SP500 TR"], Rf = managers[, "US 3m TR"])
#> [1] 0.005774729
SFM.alpha(managers[,1:3], managers[,8:10], Rf=.035/12)
#> Alpha : SP500 TR Alpha : US 10Y TR Alpha : US 3m TR
#> HAM1 0.006 0.009 0.008
#> HAM2 0.009 0.011 0.010
#> HAM3 0.006 0.010 0.008
# SFM.alpha(managers[,1], managers[,8:10], Rf=.035/12, benchmarkCols=FALSE) # other variations
if(requireNamespace("RobStatTM", quietly = TRUE)) { # CRAN requires conditional execution
alphas <- SFM.alpha(managers[,1:6],
managers[,8:10],
Rf=.035/12, method="Robust",
family="opt", bb=0.25, max.it=200, digits=4)
alphas["HAM1", ]
alphas[, "Alpha : SP500 TR"]
} # CRAN can have issues with RobStatTM
#> HAM1 HAM2 HAM3 HAM4 HAM5 HAM6
#> 0.0059 0.0053 0.0048 0.0029 0.0044 0.0075