returns the net present value of the instrument.
returns all additional result returned by the pricing engine.
This method causes the object to forward all notifications, even when not calculated. The default behavior is to forward the first notification received, and discard the others until recalculated; the rationale is that observers were already notified, and don't need further notification until they recalculate, at which point this object would be recalculated too. After recalculation, this object would again forward the first notification received.
warning Forwarding all notifications will cause a performance hit, and should be used only when discarding notifications cause an incorrect behavior.
returns the error estimate on the NPV when available.
This method constrains the object to return the presently cached results on successive invocations, even if arguments upon which they depend should change.
This method force the recalculation of any results which
would otherwise be cached. It is not declared as
const
since it needs to call the
non-const
notifyObservers
method.
note Explicit invocation of this method is not necessary if the object registered itself as observer with the structures on which such results depend. It is strongly advised to follow this policy when possible.
returns any additional result returned by the pricing engine.
set the pricing engine to be used.
warning calling this method will have no effects in case the performCalculation method was overridden in a derived class.
This method reverts the effect of the freeze
method, thus re-enabling recalculations.
Observer interface
returns the date the net present value refers to.
zero-inflation-indexed swap
fixed x zero-inflation, i.e. fixed x CPI(i'th fixing)/CPI(base) versus floating + spread
Note that this does ony the inflation-vs-floating-leg. Extension to inflation-vs-fixed-leg. is simple - just replace the floating leg with a fixed leg.
Typically there are notional exchanges at the end: either inflated-notional vs notional; or just (inflated-notional - notional) vs zero. The latter is perhaphs more typical. warning Setting subtractInflationNominal to true means that the original inflation nominal is subtracted from both nominals before they are exchanged, even if they are different.
This swap can mimic a ZCIIS where [(1+q)^n - 1] is exchanged against (cpi ratio - 1), by using differnt nominals on each leg and setting subtractInflationNominal to true. ALSO - there must be just one date in each schedule.
The two legs can have different schedules, fixing (days vs lag), settlement, and roll conventions. N.B. accrual adjustment periods are already in the schedules. Trade date and swap settlement date are outside the scope of the instrument.