Fundamental pricing question regarding Numeraires

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Fundamental pricing question regarding Numeraires

vgdev
Hi,

Can someone please explain to me what is going on in the three last line of code in Matthias Gronckis blog post about cva/exposure for bermudan swaptions? I am confused about how he is handling the numeraire.

# Apply payoff function
npv[npv < 0] = 0
# Deflate NPV
npv = npv / numeraires[:,-1]
npv = np.mean(npv) * numeraires[0,0]

Why does he need to deflate the NPV? And what does the syntax numeraires[:,-1] do? I am programming something similar in C++, so I would really appreciate a few comments about this.