Function Price within with keys computes the fair price in units of the provided reference at which the given tradable can be traded on the provided date, taking into account the provided and data.
In its simplest version, this function can be run by supplying only the input key , which serves to define the required market data that presumably apply in the pricing calculation.
Optionally, the key may be also supplied if a specific pricing model needs to be taken into account or additional tasks need to be fullfilled along with the main pricing task.
Look at for more details on these additional tasks that include cash flow generation and calculation of P&L, Carry and Roll.
By default, the price is calculated wrt the denomination currency of the reference tradable, but it may be also calculated in units of any other currency or even non-currency tradable by defining the optional key
The market risk, such as delta, gamma, vega, DV01 etc, can be also reported alongside the price by setting the optional to TRUE, in which case the two keys and must be also specified.
By default, the price is calculated as of the , but it may be also carried out as of any other given date by supplying that date through the optional key
By default, the price calculation ignores any cash flows occurring on the applicable , but this can be changed by setting the optional to TRUE
The fair value of any contributing parameter may be computed and reported by setting the optional to TRUE
An instruction may be also set, by which one or more contributing parameters are set to specific values before the price is computed. This can be done by setting the optional to TRUE
This technique can be used to calculate sensitivities on tradable parameters, such as - for example - the DV01 of a swap seen as its NPV change due to a shift in its fixed rate.
Finally, step-by-step information on the atcually undertaken calculation may be generated and displayed by setting the optional to TRUE