# Fitting to Market Data in Extended Vasicek / Hull White

1. We need to know the spot rate $$r$$ at a certain time $$t$$ and yield curve at a certain time $$t$$ which imply $$P(r,t,T)$$.
2. We can calculate continuously compounded interest rate $$R(r,t,T)$$ at certain time $$t$$ by formula of $$-\frac{1}{(T-t)}\ln{P(r,t,T)}$$
3. After that, we must choose the volatility function for spot ($$\sigma_{r}(r,t)$$) and volatility for continuously compounded interest rate ($$\sigma_{R}(r,t,T)$$) right? How can we choose it? It is said that the volatility refers to the standard deviation of proportional changes in the value of the variable. So we must have data for each day, than differentiate the $$R(r,t,T)$$ between two consecutive days, and then make the difference proportional by percentage, than find the standard deviation. Is it true?
4. Then it's said that we can find $$B(0,T)$$ of the data with the equation of $$B(t,T) = \frac{R(r,t,T)\sigma_{R}(r,t,T)(T-t)}{r\sigma_{r}(r,t)}$$. Can it be done just by inputting all variables we've got in $$t = 0$$?
5. After that we find the $$B(t,T)$$ of the Hull-White model by the formula of $$\frac{B(0,T) - B(0,t)}{\frac{\partial B(0,t)}{\partial t}}$$. How can you find $$B(0,t)$$ and $$\frac{\partial B(0,t)}{\partial t}$$?
6. We can continue by finding $$\hat{A}(t,T)$$, $$a(t)$$, and $$\phi(t)$$
7. Then we can model the interest rate with $$\sigma$$, $$a$$, $$\phi$$ in the function of time
8. We can calculate $$B(t,T)$$ and $$A(t,T)$$ for the ZCB price with Hull White model