%% Convert a Return Series to a Price Series
% Compute the price increase of two stocks over a year's time based on three incremental return observations.

RetSeries = [0.10 0.12
             0.05 0.04
            -0.05 0.05];

RetIntervals = [182 
                 91
                 92];

StartTime = datetime('18-Dec-2000','Locale','en_US');

[TickSeries,TickTimes] = ret2tick(RetSeries,'ReturnIntervals',RetIntervals,... 
    'StartTime',StartTime)

% Copyright 2012 The MathWorks, Inc.