Financial Time Series Toolbox | ![]() ![]() |
Create Financial Time Series Objects
It is advantageous to work with financial time series objects rather than with the vectors now in the workspace. By using objects, you can easily keep track of the dates. Also, you can easily manipulate the data series based on dates because the object keeps track of the administration of time series for you.
Use the object constructor fints
to construct three financial time series objects.
t0 = fints(sdates, sdata, {'Close'}, 'd', 'Inc'); d0 = fints(divdates, divdata, {'Dividends'}, 'u', 'Inc'); x0 = fints(expdates, expdata, {'Metric'}, 'w', 'Index');
The variables t0
, d0
, and x0
, are financial time series objects containing the stock closing prices, dividend payments, and the explanatory data, respectively. To see the contents of an object, type its name at the MATLAB command prompt and press Enter. For example:
d0 d0 = 'desc:' 'Inc' 'freq:' 'Unknown (0)' '' '' 'dates: (4)' 'Dividends: (4)' '04/15/99' '0.2000' '06/30/99' '0.3500' '10/02/99' '0.2000' '12/30/99' '0.1500'
![]() | Load the Data | Create Closing Prices Adjustment Series | ![]() |