I've been trying to calibrate Hull-White 1 Factor & 2 Factor model using Caps but I've some major doubts about my methodology, and would really appreciate some help.
I am using these formulas
For getting the instantaneous forward rates needed in theta formula i used the central difference method for getting the derivatives at the discrete time intervals t
(from excel data.....assumed P(t,T)= math.exp(r*t))
1) In the A formula for P(t,T) which formula should we use? e^-rt or the Ae^-B*r(t)...If I have to use the latter one, what should I take r? the same r value i used initially for calculating DFs? or the r(t) analytical formula after the Hull White calibration? (I calibrated a,sigma value using sum squared min error with implied caplet values from formula given above and market values that i had)
2) After the calibration step, how do i get the r(t) values? i have to use monte carlo simulation
Thank you once again for your time, I am completely new to this field & would appreciate a helping hand. or the