Пример #1
0
 public override void update()
 {
     if (!timeGrid_.empty())
     {
         lattice_ = this.model_.link.tree(timeGrid_);
     }
     notifyObservers();
 }
Пример #2
0
 public LatticeShortRateModelEngine(ShortRateModel model,
                                    TimeGrid timeGrid)
     : base(model)
 {
     timeGrid_  = new TimeGrid(timeGrid.Last(), timeGrid.size() - 1 /*timeGrid.dt(1) - timeGrid.dt(0)*/);
     timeGrid_  = timeGrid;
     timeSteps_ = 0;
     lattice_   = this.model_.link.tree(timeGrid);
 }
        /*public override void update()
         * {
         *  if (!timeGrid_.empty())
         *      lattice_ = this.model_.tree(timeGrid_);
         *  this.notifyObservers();
         * }*/

        #region PricingEngine

        /* protected OneAssetOption.Arguments arguments_ = new OneAssetOption.Arguments();
         * protected OneAssetOption.Results results_ = new OneAssetOption.Results();
         *
         * public IPricingEngineArguments getArguments() { return arguments_; }
         * public IPricingEngineResults getResults() { return results_; }
         * public void reset() { results_.reset(); }
         */
        #region Observer & Observable


        public override void update()
        {
            if (!timeGrid_.empty())
            {
                lattice_ = this.model_.tree(timeGrid_);
            }

            base.update();
        }
Пример #4
0
 /*! \name High-level interface
  *
  *  Users of discretized assets should use these methods in
  *  order to initialize, evolve and take the present value of
  *  the assets.  They call the corresponding methods in the
  *  Lattice interface, to which we refer for
  *  documentation.
  *
  *  @{
  */
 public void initialize(Lattice method, double t)
 {
     method_ = method;
     method_.initialize(this, t);
 }
Пример #5
0
        /*! \name High-level interface

            Users of discretized assets should use these methods in
            order to initialize, evolve and take the present value of
            the assets.  They call the corresponding methods in the
            Lattice interface, to which we refer for
            documentation.

            @{
        */
        public void initialize(Lattice method, double t)
        {
            method_ = method;
            method_.initialize(this, t);
        }