Ejemplo n.º 1
0
 public Fj_Helper(Handle <HestonModel> hestonModel, HullWhite hullWhiteModel, double rhoSr, double term,
                  double strike, int j)
 {
     j_      = j;
     lambda_ = hullWhiteModel.a();
     eta_    = hullWhiteModel.sigma();
     v0_     = hestonModel.link.v0();
     kappa_  = hestonModel.link.kappa();
     theta_  = hestonModel.link.theta();
     gamma_  = hestonModel.link.sigma();
     d_      = 4.0 * kappa_ * theta_ / (gamma_ * gamma_);
     rhoSr_  = rhoSr;
     term_   = term;
 }
Ejemplo n.º 2
0
 public FdmHullWhiteOp(FdmMesher mesher,
                       HullWhite model,
                       int direction)
 {
     x_     = mesher.locations(direction);
     dzMap_ = new TripleBandLinearOp(new FirstDerivativeOp(direction, mesher).mult(-1.0 * x_ * model.a()).add(
                                         new SecondDerivativeOp(direction, mesher).mult(0.5 * model.sigma() * model.sigma()
                                                                                        * new Vector(mesher.layout().size(), 1.0))));
     mapT_      = new TripleBandLinearOp(direction, mesher);
     direction_ = direction;
     model_     = model;
 }