## G2 Model

**is a direct subtype of Model[Short Rate] with functions G2 Model Functions, keys G2 Model keys and example object G2mdl that represents a short rate that follows an affine two-factor stochastic process**

*G2 Model***given by the formula:**

*r*

*r = φ(t) + x(t) + y(t)*where

**is a determinitic process, whereas**

*φ(t)***and**

*x(t)***are stochastic processes given by the following SDEs:**

*y(t)*

*dx = -axdt + σdw1*

*dy = -bydt + ηdw2*with

**and**

*x(0) = y(0) = 0***constants.**

*a, b, σ, η***are wiener processes correlated with**

*w1, w2***, i.e.**

*ρ*

*dw1 dw2 = ρdt*