Products & Services Solutions Academia Support User Community Company

Learn more about Financial Toolbox   

ewstats - Expected return and covariance from return time series

Syntax

[ExpReturn, ExpCovariance, NumEffObs] = ewstats(RetSeries, 
DecayFactor, WindowLength)

Arguments

RetSeries

Return Series: number of observations (NUMOBS) by number of assets (NASSETS) matrix of equally spaced incremental return observations. The first row is the oldest observation, and the last row is the most recent.

DecayFactor

(Optional) Controls how much less each observation is weighted than its successor. The kth observation back in time has weight DecayFactor^k. DecayFactor must lie in the range: 0 < DecayFactor <= 1.

Default = 1, the equally weighted linear moving average model (BIS).

WindowLength

(Optional) Number of recent observations in the computation. Default = NUMOBS.

Description

[ExpReturn, ExpCovariance, NumEffObs] = ewstats(RetSeries, DecayFactor, WindowLength) computes estimated expected returns, estimated covariance matrix, and the number of effective observations.

ExpReturn is a 1-by-NASSETS vector of estimated expected returns.

ExpCovariance is an NASSETS-by-NASSETS estimated covariance matrix. The standard deviations of the asset return processes are given by

     STDVec = sqrt(diag(ExpCovariance))  

The correlation matrix is

     CorrMat = ExpCovariance./( STDVec*STDVec' )

NumEffObs is the number of effective observations = (1-DecayFactor^WindowLength)/(1-DecayFactor).

A smaller DecayFactor or WindowLength emphasizes recent data more strongly but uses less of the available data set.

Examples

RetSeries = [ 0.24 0.08 
              0.15 0.13 
              0.27 0.06 
              0.14 0.13 ];

DecayFactor = 0.98;

[ExpReturn, ExpCovariance] = ewstats(RetSeries, DecayFactor)

ExpReturn =

    0.1995    0.1002

ExpCovariance =

    0.0032   -0.0017
   -0.0017    0.0010

See Also

cov, mean

  


Free Interactive Computational Finance CD

View demos and recorded presentations led by industry experts.

Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS