Products & Services Solutions Academia Support User Community Company

Learn more about Econometrics Toolbox   

ts2func - Convert time series to functions of time and state

Synopsis

F = ts2func(Array)

F = ts2func(Array, 'Name1', Value1, 'Name2', Value2, ...)

Description

The ts2func function encapsulates a time series array associated with a vector of real-valued observation times within a MATLAB function suitable for Monte Carlo simulation of an NVARS-by-1 state vector Xt.

Input Arguments

ArrayTime series array to encapsulate within a callable function of time and state. Array may be a vector, 2-dimensional matrix, or three-dimensional array.

Optional Input Arguments

Specify optional input arguments as variable-length lists of matching parameter name/value pairs: 'Name1', Value1, 'Name2', Value2, ... and so on. The following rules apply when specifying parameter-name pairs:

Valid parameter names are:

TimesVector of monotonically increasing observation times associated with the time series input array Array. If you do not specify a value for this argument, Times is a zero-based, unit-increment vector of the same length as that of the dimension of Array associated with time (see TimeDimension).
TimeDimensionPositive scalar integer that specifies which dimension of the input time series array Array is associated with time. The value of this argument cannot be greater than the number of dimensions of Array. If you do not specify a value for this argument, the default is 1, indicating that time is associated with the rows of Array.
StateDimensionPositive scalar integer that specifies which dimension of the input time series array Array is associated with the NVARS state variables. StateDimension cannot be greater than the number of dimensions of Array. If you do not specify a value for this argument, ts2func assigns StateDimension the first dimension of Array that is not already associated with time (the state vector Xt is associated with the first available dimension of Arraynot already assigned to TimeDimension).

Output Arguments

FCallable function F(t) of a real-valued scalar observation time t. You can invoke F with a second input (such as an NVARS-by-1 state vector X), which is a placeholder that ts2func ignores. For example, while F(t) and F(t,X) produce identical results, the latter directly supports SDE simulation methods.

Remarks

See Also

simByEuler, simulate

  


Free Interactive Computational Finance CD

View demos and recorded presentations led by industry experts.

Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS