# QuantLib_TwoFactorModel_ShortRateDynamics man page

TwoFactorModel::ShortRateDynamics — Class describing the dynamics of the two state variables.

## Synopsis

`#include <ql/models/shortrate/twofactormodel.hpp>`

Inherited by G2::Dynamics.

### Public Member Functions

**ShortRateDynamics** (const boost::shared_ptr< **StochasticProcess1D** > &**xProcess**, const boost::shared_ptr< **StochasticProcess1D** > &**yProcess**, **Real correlation**)

virtual **Rate shortRate** (**Time** t, **Real** x, **Real** y) const =0

const boost::shared_ptr< **StochasticProcess1D** > & **xProcess** () const

Risk-neutral dynamics of the first state variable x.

const boost::shared_ptr< **StochasticProcess1D** > & **yProcess** () const

Risk-neutral dynamics of the second state variable y. **Real correlation** () const

Correlation $ rho $ between the two brownian motions.

boost::shared_ptr< **StochasticProcess** > **process** () const

Joint process of the two variables.

## Detailed Description

Class describing the dynamics of the two state variables.

We assume here that the short-rate is a function of two state variables x and y. [ r_t = f(t, x_t, y_t) ] of two state variables $ x_t $ and $ y_t $. These stochastic processes satisfy [ x_t = mu_x(t, x_t)dt + sigma_x(t, x_t) dW_t^x ] and [ y_t = mu_y(t,y_t)dt + sigma_y(t, y_t) dW_t^y ] where $ W^x $ and $ W^y $ are two brownian motions satisfying [ dW^x_t dW^y_t = rho dt ].

## Author

Generated automatically by Doxygen for QuantLib from the source code.

## Referenced By

The man pages xProcess(3) and yProcess(3) are aliases of QuantLib_TwoFactorModel_ShortRateDynamics(3).