View source: R/SFM.coefficients.R
SFM.coefficients | R Documentation |
The single factor model is the beta of an asset to the variance and covariance of an initial portfolio. Used to determine diversification potential. "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.
SFM.coefficients(
Ra,
Rb,
Rf = 0,
subset = TRUE,
...,
method = "Robust",
family = "mopt",
digits = 3,
benchmarkCols = T,
Model = F,
warning = T
)
Ra |
an xts, 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 |
subset |
a logical vector representing the set of observations to be used in regression |
... |
Other parameters like max.it or bb specific to lmrobdetMM regression. Another interesting parameter is round.by.alphas, and round.by.betas which can be set to round off the returned values, otherwise the values |
method |
(Optional): string representing linear regression model, "LS" for Least Squares and "Robust" for robust. Defaults to "LS |
family |
(Optional): 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 |
digits |
(Optional): Number of digits to round the results to. Defaults to 3. |
benchmarkCols |
(Optional): Boolean to show the benchmarks as columns. Defaults to TRUE. |
Model |
(Optional): Boolean to return the fitted model. Defaults to FALSE |
warning |
(Optional): Boolean to show warnings or not. Defaults to TRUE. |
This function is designed to be used a a wrapper for SFM's regression models. Using this, one can easily fit different types of linear models like Ordinary Least Squares or Robust Estimators like Huber.
\beta_{a,b}=\frac{CoV_{a,b}}{\sigma_{b}}=\frac{\sum((R_{a}-\bar{R_{a}})(R_{b}-\bar{R_{b}}))}{\sum(R_{b}-\bar{R_{b}})^{2}}
Ruppert(2004) reports that this equation will give the estimated slope of
the linear regression of R_{a}
on R_{b}
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).
Dhairya Jain
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.
Bacon, Carl. Practical portfolio
performance measurement and attribution. Wiley. 2004.
BetaCoVariance
SFM.alpha
CAPM.utils
SFM.beta
if(requireNamespace("RobStatTM", quietly = TRUE)) { # CRAN requires conditional execution
data(managers)
SFM.coefficients(managers[,1], managers[,8])
SFM.coefficients(managers[,1:6], managers[,8:9], Rf = managers[,10])
SFM.coefficients(managers[,1:6], managers[,8:9],
Rf=.035/12, method="Robust",
family="mopt", bb=0.25,
max.it=200)
} # CRAN requires conditional execution
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.