This code snippet plots forward rate curve for Vasicek model. It uses Quantlib with GnuPlot. Please refer to Showing graphs in Quantlib for details of setup of GnuPlot.
The function shows how increasing the mean reversion speed makes the forward curve approach long term mean faster. eg., this is the grph output after running the function:
Got a question or problem with this link? Just enter your message and click on submit. No registration is required.