A short-rate model is usually calibrated to some initial structures in the market, typically the initial yield curve, the caps volatility surface, the swaptions volatility surface, and possibly other products, thus determining the model parameters. Vasicek, Cox Ingersoll Ross (CIR), Dothan, for instance, are among the frequently-used short-rate models. The strength of Vasicek model is analytical bond prices and analytical option prices can be obtained and easily calculatied, however, negative short rates are also possible with positive probability.
R code can be downloaded at http://www.math.ku.dk/~rolf/teaching/mfe04/MiscInfo.html#Code
Tags – vasicek , cox ingersoll ross
Read the full post at R-code for Vasicek estimation.