public override void update() { if (!timeGrid_.empty()) { lattice_ = this.model_.link.tree(timeGrid_); } notifyObservers(); }
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); }
/* 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); }