
P1: JYS
c10 JWBK378-Fletcher May 12, 2009 19:2 Printer: Yet to come
Pricing Financial Structures in Hull–White 157
Before finishing this section one final point needs to be made. Some path-dependent trades
may involve path variables dependent on the pay discount factor and, for seasoned trades, the
path variables still need to be calculated even though they are in the past. For this reason,
the instances of the controller classes in the Monte-Carlo pricing framework set the
historical
df to unit.
10.3 CONCLUDING REMARKS
We have successfully applied the pricing frameworks developed in Chapter 9 to the pricing
of both Bermudan swaptions and target redemption notes. In any real business application
the main body of code would be in C++, which would then call out to Python to perform
the evaluation of the payoff. For efficiency reasons, you would not wish to do this for every
Monte-Carlo path because the cost of crossing the C++/Python boundary is too punitive –
indeed you would have to cross the boundary for every simulation (or, equivalently, path). If
instead you pass the current state of the world at a particular time, then you only cross the
boundary as many times as there are flows (for each leg). Moreover, by passing the state of the
world through gives the writer of the Python payoff the opportunity to employ parallelisation
techniques when performing arithmetic operations within the payoff class. ...