MeanEstim: Mean vector estimator

View source: R/dispatchers.R

MeanEstimR Documentation

Mean vector estimator

Description

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.

Usage

MeanEstim(x, type, ...)

Arguments

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

Details

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

Value

a numeric vector containing the specified estimation of the mean vector.

References

\insertRef

Jorion1986HDShOP

\insertRef

BOP2019HDShOP

Examples

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)


HDShOP documentation built on Nov. 10, 2022, 5:12 p.m.