# Pricing call option on bond under CIR model by simulating noncentral chi square distribution

In the original paper of CIR model, there is a pricing formula about call option on bond $$\begin{array}{l}{C(r, t, T ; s, K)} \\ {=P(r, t, s) \chi^{2}\left(2 r^{*}[\phi+\psi+B(T, s)] ; \frac{4 \kappa \theta}{\sigma^{2}}, \frac{2 \phi^{2} r e^{\gamma(T-t)}}{\phi+\psi+B(T, s)}\right)} \\ {-K P(r, t, T) \chi^{2}\left(2 r^{*}[\phi+\psi] ; \frac{4 \kappa \theta}{\sigma^{2}}, \frac{2 \phi^{2} r e^{\gamma(T-t)}}{\phi+\psi}\right)}\end{array}$$ However, I can't understand the first parameter of the noncentral chi square. The second and the third parameter is the degree of freedom and the noncentral parameter. After simulating the random variable with these two parameters, what should I to get the value of $$\chi^{2}\left(2 r^{*}[\phi+\psi+B(T, s)] ; \frac{4 \kappa \theta}{\sigma^{2}}, \frac{2 \phi^{2} r e^{\gamma(T-t)}}{\phi+\psi+B(T, s)}\right)$$ Should I divide or multiply it?

• $\chi^2$ is the noncentral chi square cdf. the first argument is x, the abscissa, the arguments after the semi-colon are the parameters you mentioned. You don't need to generate random variables you just need a cdf routine such as this mathworks.com/help/stats/ncx2cdf.html – noob2 May 20 '19 at 1:33
• So, I only need to simulate r(short rate), then plugin those r into the bond price and option formula and average them. Am I right? – edwardngtakwa May 20 '19 at 4:08