public G2(Handle <YieldTermStructure> termStructure, double a, double sigma, double b, double eta, double rho) : base(5) { //TermStructureConsistentModel = termStructure; /* regroupement car plant!! * *a_ = arguments_[0]; * sigma_ = arguments_[1]; * b_ = arguments_[2]; * eta_ = arguments_[3]; * rho_ = arguments_[4];*/ termStructure_ = termStructure; a_ = arguments_[0] = new ConstantParameter(a, new PositiveConstraint()); sigma_ = arguments_[1] = new ConstantParameter(sigma, new PositiveConstraint()); b_ = arguments_[2] = new ConstantParameter(b, new PositiveConstraint()); eta_ = arguments_[3] = new ConstantParameter(eta, new PositiveConstraint()); rho_ = arguments_[4] = new ConstantParameter(rho, new BoundaryConstraint(-1.0, 1.0)); generateArguments(); termStructure.registerWith(update); }
public PiecewiseTimeDependentHestonModel(Handle <YieldTermStructure> riskFreeRate, Handle <YieldTermStructure> dividendYield, Handle <Quote> s0, double v0, Parameter theta, Parameter kappa, Parameter sigma, Parameter rho, TimeGrid timeGrid) : base(5) { s0_ = s0; riskFreeRate_ = riskFreeRate; dividendYield_ = dividendYield; timeGrid_ = timeGrid; arguments_[0] = theta; arguments_[1] = kappa; arguments_[2] = sigma; arguments_[3] = rho; arguments_[4] = new ConstantParameter(v0, new PositiveConstraint()); s0.registerWith(update); riskFreeRate.registerWith(update); dividendYield.registerWith(update); }
public LmExponentialCorrelationModel(int size, double rho) : base(size, 1) { corrMatrix_ = new Matrix(size, size); pseudoSqrt_ = new Matrix(size, size); arguments_[0] = new ConstantParameter(rho, new PositiveConstraint()); generateArguments(); }
public LmLinearExponentialVolatilityModel(List <double> fixingTimes, double a, double b, double c, double d) : base(fixingTimes.Count, 4) { fixingTimes_ = fixingTimes; arguments_[0] = new ConstantParameter(a, new PositiveConstraint()); arguments_[1] = new ConstantParameter(b, new PositiveConstraint()); arguments_[2] = new ConstantParameter(c, new PositiveConstraint()); arguments_[3] = new ConstantParameter(d, new PositiveConstraint()); }
public LmLinearExponentialCorrelationModel(int size, double rho, double beta, int?factors = null) : base(size, 2) { corrMatrix_ = new Matrix(size, size); factors_ = factors ?? size; arguments_[0] = new ConstantParameter(rho, new BoundaryConstraint(-1.0, 1.0)); arguments_[1] = new ConstantParameter(beta, new PositiveConstraint()); generateArguments(); }
public LmLinearExponentialCorrelationModel(int size, double rho, double beta, int factors) : base(size, 2) { corrMatrix_=new Matrix(size, size); factors_=factors; arguments_[0] = new ConstantParameter(rho, new BoundaryConstraint(-1.0, 1.0)); arguments_[1] = new ConstantParameter(beta, new PositiveConstraint()); generateArguments(); }
public LmLinearExponentialVolatilityModel( List<double> fixingTimes, double a, double b, double c, double d) : base(fixingTimes.Count, 4) { fixingTimes_=fixingTimes; arguments_[0] = new ConstantParameter(a, new PositiveConstraint()); arguments_[1] = new ConstantParameter(b, new PositiveConstraint()); arguments_[2] = new ConstantParameter(c, new PositiveConstraint()); arguments_[3] = new ConstantParameter(d, new PositiveConstraint()); }
public BlackKarasinski(Handle <YieldTermStructure> termStructure, double a, double sigma) : base(2) { a_ = arguments_[0]; sigma_ = arguments_[1]; a_ = arguments_[0] = new ConstantParameter(a, new PositiveConstraint()); sigma_ = arguments_[1] = new ConstantParameter(sigma, new PositiveConstraint()); termStructure_ = new Handle <YieldTermStructure>(); termStructure_ = termStructure; termStructure.registerWith(update); }
public BlackKarasinski( Handle<YieldTermStructure> termStructure, double a, double sigma ) : base(2) { a_=arguments_[0]; sigma_=arguments_[1]; a_ = arguments_[0] = new ConstantParameter(a, new PositiveConstraint()); sigma_ = arguments_[1] = new ConstantParameter(sigma, new PositiveConstraint()); termStructure_ = new Handle<YieldTermStructure>(); termStructure_ = termStructure; termStructure.registerWith(update); }
public Vasicek(double r0, double a, double b = 0.05, double sigma = 0.01, double lambda = 0.0) : base(4) { r0_ = r0; a_ = (Parameter)arguments_[0]; b_ = (Parameter)arguments_[1]; sigma_ = arguments_[2]; lambda_ = arguments_[3]; a_ = arguments_[0] = new ConstantParameter(a, new PositiveConstraint()); b_ = arguments_[1] = new ConstantParameter(b, new NoConstraint()); sigma_ = arguments_[2] = new ConstantParameter(sigma, new PositiveConstraint()); lambda_ = arguments_[3] = new ConstantParameter(lambda, new NoConstraint()); }
//private class Dynamics; public Vasicek(double r0, double a , double b , double sigma, double lambda ) :base(4){ r0_ = r0; a_ = (Parameter)arguments_[0]; b_ = (Parameter)arguments_[1]; sigma_ = arguments_[2]; lambda_ = arguments_[3]; a_ = arguments_[0] = new ConstantParameter(a, new PositiveConstraint()); b_ = arguments_[1] = new ConstantParameter(b, new NoConstraint()); sigma_ = arguments_[2] = new ConstantParameter(sigma, new PositiveConstraint()); lambda_ = arguments_[3] = new ConstantParameter(lambda, new NoConstraint()); }
public HestonModel(HestonProcess process) : base(5) { process_ = process; arguments_[0] = new ConstantParameter(process.theta(), new PositiveConstraint()); arguments_[1] = new ConstantParameter(process.kappa(), new PositiveConstraint()); arguments_[2] = new ConstantParameter(process.sigma(), new PositiveConstraint()); arguments_[3] = new ConstantParameter(process.rho(), new BoundaryConstraint(-1.0, 1.0)); arguments_[4] = new ConstantParameter(process.v0(), new PositiveConstraint()); generateArguments(); process_.riskFreeRate().registerWith(update); process_.dividendYield().registerWith(update); process_.s0().registerWith(update); }
public G2(Handle <YieldTermStructure> termStructure, double a, double sigma, double b, double eta, double rho) : base(5) { termStructure_ = termStructure; a_ = arguments_[0] = new ConstantParameter(a, new PositiveConstraint()); sigma_ = arguments_[1] = new ConstantParameter(sigma, new PositiveConstraint()); b_ = arguments_[2] = new ConstantParameter(b, new PositiveConstraint()); eta_ = arguments_[3] = new ConstantParameter(eta, new PositiveConstraint()); rho_ = arguments_[4] = new ConstantParameter(rho, new BoundaryConstraint(-1.0, 1.0)); generateArguments(); termStructure.registerWith(update); }
public G2(Handle<YieldTermStructure> termStructure, double a, double sigma, double b, double eta, double rho) : base(5) { //TermStructureConsistentModel = termStructure; /* regroupement car plant!! * *a_ = arguments_[0]; sigma_ = arguments_[1]; b_ = arguments_[2]; eta_ = arguments_[3]; rho_ = arguments_[4];*/ termStructure_ = termStructure; a_ = arguments_[0] = new ConstantParameter(a, new PositiveConstraint()); sigma_ = arguments_[1] = new ConstantParameter(sigma, new PositiveConstraint()); b_ = arguments_[2] = new ConstantParameter(b, new PositiveConstraint()); eta_ = arguments_[3] = new ConstantParameter(eta, new PositiveConstraint()); rho_ = arguments_[4] = new ConstantParameter(rho, new BoundaryConstraint(-1.0, 1.0)); generateArguments(); termStructure.registerWith(update); }