Products & Services Solutions Academia Support User Community Company

Learn more about Econometrics Toolbox   

drift - Construct drift-rate model components

Synopsis

DriftRate = drift(A, B)

Class

Drift

Description

This constructor specifies the drift-rate component of continuous-time stochastic differential equations (SDEs). The drift-rate specification supports the simulation of sample paths of NVARS state variables driven by NBROWNS Brownian motion sources of risk over NPERIODS consecutive observation periods, approximating continuous-time stochastic processes.

The drift-rate specification can be any NVARS-by-1 vector-valued function F of the general form:

(11-7)

associated with a vector-valued SDE of the form

where:

The drift-rate specification is flexible, and provides direct parametric support for static/linear drift models. It is also extensible, and provides indirect support for dynamic/nonlinear models via an interface. This enables you to specify virtually any drift-rate specification.

Input Arguments

Specify required input parameters as one of the following types:

The required input parameters are:

AThis argument represents the parameter A. If you specify A as an array, it must be an NVARS-by-1 column vector. If you specify A as a function, it must return an NVARS-by-1 column vector when invoked with two inputs:
  • A real-valued scalar observation time t.

  • An NVARS-by-1 state vector Xt.

BThis argument represents the parameter B. If you specify B as an array, it must be an NVARS-by-NVARS 2-dimensional matrix. If you specify B as a function, it must return an NVARS-by-NVARS column vector when invoked with two inputs:
  • A real-valued scalar observation time t.

  • An NVARS-by-1 state vector Xt.

Output Arguments

DriftRateObject of class drift that encapsulates the composite drift-rate specification, with the following displayed parameters:
  • Rate: The drift-rate function, F. Rate is the drift-rate calculation engine. It accepts the current time t and an NVARS-by-1 state vector Xt as inputs, and returns an NVARS-by-1 drift-rate vector.

  • A: Access function for the input argument A.

  • B: Access function for the input argument B.

Remarks

When you specify the input arguments A and B as MATLAB arrays, they are associated with a linear drift parametric form. By contrast, when you specify either A or B as a function, you can customize virtually any drift-rate specification.

Accessing the output drift-rate parameters A and B with no inputs simply returns the original input specification. Thus, when you invoke drift-rate parameters with no inputs, they behave like simple properties and allow you to test the data type (double vs. function, or equivalently, static vs. dynamic) of the original input specification. This is useful for validating and designing methods.

When you invoke drift-rate parameters with inputs, they behave like functions, giving the impression of dynamic behavior. The parameters A and B accept the observation time t and a state vector Xt, and return an array of appropriate dimension. Specifically, parameters A and B evaluate the corresponding drift-rate component. Even if you originally specified an input as an array, drift treats it as a static function of time and state, thereby guaranteeing that all parameters are accessible by the same interface.

Examples

Creating Drift and Diffusion Objects as Model Parameters

See Also

diffusion, sdeddo

  


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