Пример #1
0
 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);
 }
Пример #2
0
        //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());
        }
Пример #3
0
 public CoxIngersollRoss(double r0 = 0.05,
                  double theta = 0.1,
                  double k = 0.1,
                  double sigma = 0.1)
     :base(4)
 {
    theta_ = arguments_[0];
    k_=arguments_[1];
    sigma_=arguments_[2];
    r0_ = arguments_[3];
    //theta_ = new ConstantParameter(theta, new PositiveConstraint());
    //k_ = new ConstantParameter(k, new PositiveConstraint());
    //sigma_ = new ConstantParameter(sigma, new VolatilityConstraint(k,theta));
    //r0_ = new ConstantParameter(r0, new PositiveConstraint());
 }
Пример #4
0
 public TermStructureFittingParameter(Parameter.Impl impl)
     : base(0, impl, new NoConstraint())
 {
 }
Пример #5
0
        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);
        }
Пример #6
0
 public Dynamics(Parameter fitting,
     double a,
     double sigma,
     double b,
     double eta,
     double rho)
     : base((StochasticProcess1D)new OrnsteinUhlenbeckProcess(a, sigma),
            (StochasticProcess1D)(new OrnsteinUhlenbeckProcess(b, eta)), rho)
 {
     fitting_ = fitting;
 }
Пример #7
0
 protected void generateArguments()
 {
     phi_ = new FittingParameter(termStructure(),
         a(), sigma(), b(), eta(), rho());
 }
Пример #8
0
 public Dynamics(Parameter fitting, double alpha, double sigma)
 : base((StochasticProcess1D)(new OrnsteinUhlenbeckProcess(alpha, sigma))){
   fitting_=fitting; }
Пример #9
0
 public Dynamics(Parameter fitting, double a, double sigma)
     : base(new OrnsteinUhlenbeckProcess(a, sigma))
 {
     fitting_ = fitting;
 }
Пример #10
0
 //a voir pour le sealed sinon pb avec classe mere vasicek et constructeur class Hullwithe
 protected override void generateArguments()
 {
     phi_ = new FittingParameter(termStructure(), a(), sigma());
 }
Пример #11
0
 public Dynamics(Parameter fitting, double a, double sigma)
    : base(new OrnsteinUhlenbeckProcess(a, sigma))
 {
    fitting_ = fitting;
 }