Create twofactor additive Gaussian interestrate model
The twofactor additive Gaussian interest ratemodel is specified using the zero curve, a, b, sigma, eta, and rho parameters for these equations:
$$r(t)=x(t)+y(t)+\varphi (t)$$
$$dx(t)=a(t)x(t)dt+\sigma (t)d{W}_{1}(t),x(0)=0$$
$$dy(t)=b(t)y(t)dt+\eta (t)d{W}_{2}(t),y(0)=0$$
where $$d{W}_{1}(t)d{W}_{2}(t)=\rho dt$$ is a twodimensional Brownian motion with correlation ρ, and ϕ is a function chosen to match the initial zero curve.
OBJ = LinearGaussian2F(ZeroCurve,a,b,sigma,eta,rho)
constructs
an object for a twofactor additive Gaussian interestrate model.
For example:
Settle = datenum('15Dec2007'); CurveTimes = [1:5 7 10 20]'; ZeroRates = [.01 .018 .024 .029 .033 .034 .035 .034]'; CurveDates = daysadd(Settle,360*CurveTimes,1); irdc = IRDataCurve('Zero',Settle,CurveDates,ZeroRates); a = .07; b = .5; sigma = .01; eta = .006; rho = .7; G2PP = LinearGaussian2F(irdc,a,b,sigma,eta,rho);
The following properties are from the LinearGaussian2F
class.

Attributes:
 

Mean reversion for the first factor, specified either as a scalar or function handle which takes time as input and returns a scalar mean reversion value. Attributes:
 

Mean reversion for the second factor, specified either as a scalar or as a function handle which takes time as input and returns a scalar mean reversion value. Attributes:
 

Volatility for the first factor, specified either as a scalar or function handle which takes time as input and returns a scalar mean volatility. Attributes:
 

Volatility for the second factor specified, either as a scalar or function handle which takes time as input and returns a scalar mean volatility. Attributes:
 

Scalar correlation of the factors. Attributes:

simTermStructs  Simulate term structures for twofactor additive Gaussian interestrate model 
Shortrate model based on two factors where the short rate is the sum of the two factors and a deterministic function, in this case ϕ(t), which is chosen to match the initial term structure.
Brigo, D. and F. Mercurio. Interest Rate Models  Theory and Practice. Springer Finance, 2006.
capbylg2f
 floorbylg2f
 HullWhite1F
 LiborMarketModel
 simTermStructs
 swaptionbylg2f