%% Transform Time Series Object from Weekly to Quarterly Values
% This example shows how to transform a time series object from weekly to quarterly values.
% Load the data from the file predict_ret_data.mat and 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 toquarterly to obtain the quarterly aggregate for the x0 times series.

x1 = toquarterly(x0)

% Copyright 2015 The MathWorks, Inc.