MeanEstim | R Documentation |
A user-friendly function for estimation of the mean vector. Essentially, it is a function dispatcher for estimation of the mean vector that chooses a method accordingly to the type argument.
MeanEstim(x, type, ...)
x |
a p by n matrix or a data frame of asset returns. Rows represent different assets, columns – observations. |
type |
a character. The estimation method to be used. |
... |
arguments to pass to estimators |
The available estimation methods for the mean are:
Function | Paper | Type |
.rowMeans | trad | |
mean_bs | Jorion 1986 | bs |
mean_js | Jorion 1986 | js |
mean_bop19 | Bodnar et al 2019 | BOP19 |
a numeric vector— a value of the specified estimator of the mean vector.
Jorion1986HDShOP
\insertRefBOP2019HDShOP
n<-3e2 # number of realizations
p<-.5*n # number of assets
x <- matrix(data = rnorm(n*p), nrow = p, ncol = n)
Mean_trad <- MeanEstim(x, type="trad")
mu_0 <- rep(1/p, p)
Mean_BOP <- MeanEstim(x, type="BOP19", mu_0=mu_0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.