Go to Deriscope's documentation start page

Ibor_Rate_Bond_Functions

Function Discount Margin within Ibor Rate Bond returns the referenced bond's approximate discount margin with respect to a given forecasting ibor index curve using the following algorithm.
First a new yield curve is created using as market data a newly constructed object of type
ImpYC Fwd Spreaded, which object is linked to the given forecasting curve.
This new yield curve is designed to be used for discounting purposes, along with the given forecasting curve, in pricing the referenced bond.
So that no ambiguity arises, the discounting yield curve is equipped with an Issuer that differs from that of the forecasting curve.
The next step involves the creation of an object of type
Valuation that holds the price of the referenced bond as calculated with both mentioned curves.
The last step amounts to calling the function
Valuation::Fair Value on the last object, which applies a root finding method to solve for the Spread that the ImpYC Fwd Spreaded object should have in order for the calculated bond price to equal a given target level.