| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Econometrics Toolbox |
| Contents | Index |
| Learn more about Econometrics Toolbox |
DriftRate = drift(A, B)
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:
Xt is an NVARS-by-1 state vector of process variables.
dWt is an NBROWNS-by-1 Brownian motion vector.
A and B are model parameters.
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.
Specify required input parameters as one of the following types:
A MATLAB array. Specifying an array indicates a static (non-time-varying) parametric specification. This array fully captures all implementation details, which are clearly associated with a parametric form.
A MATLAB function. Specifying a function provides indirect support for virtually any static, dynamic, linear, or nonlinear model. This parameter is supported via an interface, because all implementation details are hidden and fully encapsulated by the function.
The required input parameters are:
| A | This 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:
|
| B | This 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:
|
| DriftRate | Object of class drift that encapsulates
the composite drift-rate specification, with the following displayed
parameters:
|
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.
Creating Drift and Diffusion Objects as Model Parameters
![]() | diffusion | garchar | ![]() |
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 |