Financial Time Series Toolbox    
fetch

Extract data from financial time series object

Syntax

Arguments

oldfts
Existing financial time series object
StartDate
First date in the range from which data is to be extracted.
StartTime
Beginning time on each day. If you do not require specific times or oldfts does not contain time information, use []. If you specify StartTime, you must also specify EndTime.
EndDate
Last date in the range from which data is to be extracted.
EndTime
Ending time on each day. If you do not require specific times or oldfts does not contain time information, use []. If you specify EndTime, you must also specify StartTime.
delta
Skip interval. May be any positive integer. Units for the skip interval specified by dmy_specifier.
dmy_specifier
Specifies the units for delta. May be
D, d (Days)
M, m (Months)
Y, y (Years)
time_ref

Time reference intervals or specific times. Valid time reference intervals are 1, 5, 15, or 60 minutes. Enter specific times as 'hh:mm'.

Description

newfts = fetch(oldfts, StartDate, StartTime, EndDate, EndTime, delta, dmy_specifier, time_ref) requests data from a financial time series object beginning from the start date and/or start time to the end date and/or end time, skipping a specified number of days, months, or years.

Examples

Example 1. Create a financial time series object containing both dates and times:

To fetch all dates and times from this financial time series, enter

or

These commands reproduce the entire time series shown above.

To fetch every other day's data, enter

This produces

Example 2. Create a financial time series object with time intervals of less than one hour:

Use fetch to extract data from this time series object at five-minute intervals for each day starting at 11:00 o'clock on January 1, 2001.

You can use this version of fetch to extract data at specific times. For example, to fetch data only at 11:06 and 12:06 from myFts2, enter

See Also

extfield, ftsbound, getfield, subsref


  extfield fieldnames