%% Compute Estimated Expected Returns and Estimated Covariance Matrix
% This example shows how to compute the estimated expected returns and the estimated covariance matrix.

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)

% Copyright 2015 The MathWorks, Inc.