Description Usage Arguments Details Value Author(s) Examples
CAPMList
is a helper function that computes the "alphas" and "betas" in the sense of the CAPM for
series of asset returns. It is meant to be used for computing "prior" means for the Black-Litterman model.
1 2 | CAPMList(returns, marketIndex, riskFree = NULL, regFunc = BLCOPOptions("regFunc"),
coeffExtractFunc = NULL, ...)
|
returns |
A matrix or data.frame of asset returns, with different columns corresponding to different assets |
marketIndex |
A time series of returns for some market index (e.g. SP500) |
riskFree |
Risk-free rate of return |
regFunc |
The name of the function to used to regress the asset return series against the market index. This is set in the BLCOP options,
and is |
coeffExtractFunc |
A function that extracts the intercept (alpha) and coefficient of the market index (beta) from the results of a call to the regression function. It should return a vector containing these two elements. |
... |
Additional arguments to the regression function |
coeffExtractFun
is needed because some regression functions such as gls
from the nlme
package
don't return their results in the same format as lm
does. If it is not supplied, a default that works with lm
results is used.
A data.frame
with one column for the "alphas" and another for the "betas"
Francisco Gochez <fgochez@mango-solutions.com>
1 2 | library(MASS)
CAPMList(monthlyReturns, marketIndex = sp500Returns, riskFree = US13wTB, regFunc = "rlm")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.