%% Transform Time Series Object from Weekly to Semiannual Values
% This example shows how to transform a time series object from weekly to semiannual values.
% Load the data from the file predict_ret_data.mat and then use the fints function to create a time series object with a weekly frequency.

load predict_ret_data.mat
x0 = fints(expdates, expdata, {'Metric'}, 'w', 'Index')

%
% Use tosemi to obtain the semiannual aggregate for the x0 times series.

x1 = tosemi(x0)

% Copyright 2015 The MathWorks, Inc.