meanEstimation: Estimation of mean returns

Description Usage Arguments Details Value Author(s) References Examples

Description

Function which is used to compute the estimation of the mean returns

Usage

1
meanEstimation(rets, control = list())

Arguments

rets

a (T x N) matrix of past returns.

control

control parameters (see *Details*).

Details

The argument control is a list that can supply any of the following components:

type

method used to estimate the mean returns, among 'naive', 'ewma', 'bs' and 'mart' where:

'naive' is used to compute the arithmetic mean of the returns.

'ewma' is used to compute the exponential weighted moving average mean of the returns. The data must be sorted from the oldest to the latest.

'bs' is used to compute the Bayes-Stein estimation.

'mart' is used to compute the Martinelli implied returns.

Default: type = 'naive'.

lambda

decay parameter. Default: lambda = 0.94.

Value

A (N x 1) vector of expected returns.

Author(s)

David Ardia <david.ardia@unifr.ch> and Jean-Philippe Gagnon Fleury.

References

Jorion, P. (2004). Bayes-Stein Estimation for Portfolio Analysis Journal of Finance and Quantitative Analysis 21(3), pp.279–292.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# For the examples, we simply generate a 100 x 25 random matrix.
set.seed(3214)
T = 100
N = 25
rets = matrix(rnorm(T*N), nrow = T, ncol = N)

#Computes the naive estimation of the mean.
meanEstimation(rets)

#Computes the naive estimation of the mean.
meanEstimation(rets, control = list(type = "naive"))

#Computes the ewma estimation of the mean with default lambda = 0.94.
meanEstimation(rets, control = list(type = "ewma"))

#Computes the ewma estimation of the mean with lambda = 0.9.
meanEstimation(rets, control = list(type = "ewma", lambda = 0.9))

#Computes the Martinelli's estimation of the mean.
meanEstimation(rets, control = list(type = "mart"))

#Computes the Bayes-Stein's estimation of the mean.
meanEstimation(rets, control = list(type = "bs"))

ExpectedReturns documentation built on May 2, 2019, 5:49 p.m.