meanEstimation: Estimation of mean returns

Description Usage Arguments Details Value Author(s) References Examples

View source: R/meanEstimation.R

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:

Value

A (N x 1) vector of expected returns.

Author(s)

David Ardia, Kris Boudt and Jean-Philippe Gagnon Fleury.

References

Jorion, P. (1986). Bayes-Stein estimation for portfolio analysis. Journal of Finance and Quantitative Analysis 21(3), pp.279-292.

Martellini, L. (2008). Towards the design of better equity benchmarks. Journal of Portfolio Management 34(4), Summer,pp.34-41.

RiskMetrics (1996) RiskMetrics Technical Document. J. P. Morgan/Reuters.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# Load returns of assets or portfolios
data("Industry_10")
rets = Industry_10

# Naive estimation of the mean
meanEstimation(rets)

# Naive estimation of the mean
meanEstimation(rets, control = list(type = 'naive'))

# Ewma estimation of the mean with default lambda = 0.94
meanEstimation(rets, control = list(type = 'ewma'))

# Ewma estimation of the mean with lambda = 0.9
meanEstimation(rets, control = list(type = 'ewma', lambda = 0.9))

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

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

Example output

      NoDur       Durbl       Manuf       Enrgy       HiTec       Telcm 
 0.05027778  0.03658730  0.03063492 -0.04273810  0.06551587  0.02817460 
      Shops        Hlth       Utils       Other 
 0.05007937  0.09416667  0.08607143  0.04626984 
      NoDur       Durbl       Manuf       Enrgy       HiTec       Telcm 
 0.05027778  0.03658730  0.03063492 -0.04273810  0.06551587  0.02817460 
      Shops        Hlth       Utils       Other 
 0.05007937  0.09416667  0.08607143  0.04626984 
       NoDur        Durbl        Manuf        Enrgy        HiTec        Telcm 
-0.003582241  0.155887404  0.049821638 -0.066564853  0.040681726  0.050996689 
       Shops         Hlth        Utils        Other 
 0.189095402  0.013381921  0.097695288  0.090992281 
      NoDur       Durbl       Manuf       Enrgy       HiTec       Telcm 
-0.05678814  0.19266423  0.02465281  0.01362420 -0.01133239  0.04589916 
      Shops        Hlth       Utils       Other 
 0.18121262 -0.05632996  0.07204848  0.06949461 
    NoDur     Durbl     Manuf     Enrgy     HiTec     Telcm     Shops      Hlth 
0.6420357 1.0626698 0.7854288 1.2366279 0.8893272 0.7658757 0.7393299 0.9760685 
    Utils     Other 
0.7906612 0.8229165 
     NoDur      Durbl      Manuf      Enrgy      HiTec      Telcm      Shops 
0.05312579 0.05283149 0.05270353 0.05112624 0.05345336 0.05265064 0.05312153 
      Hlth      Utils      Other 
0.05406926 0.05389524 0.05303963 
Warning messages:
1: In mu - mu_min :
  Recycling array of length 1 in vector-array arithmetic is deprecated.
  Use c() or as.vector() instead.

2: In mu - mu_min :
  Recycling array of length 1 in vector-array arithmetic is deprecated.
  Use c() or as.vector() instead.

3: In (1 - phi) * mu + phi * mu_min :
  Recycling array of length 1 in vector-array arithmetic is deprecated.
  Use c() or as.vector() instead.

RiskPortfolios documentation built on May 17, 2021, 1:10 a.m.