Using the SMFI5 package

After discussing the math behind interest rate models and after hard programming, let's recommend the SMFI5 package, which provides user-friendly solutions to model and simulate interest rate models (if it is modeled by an Ornstein-Uhlenbeck process), price bonds, and many other applications.

We cannot discuss it in detail, but as a short demonstration, let's call a function that simulates bond prices for different maturities:

bond.vasicek(0.5,2.55,0.365,0.3,0,3.55,1080,c(1/12, 3/12, 6/12, 1),365) 

This returns a spectacular result:

Using the SMFI5 package

Get R: Data Analysis and Visualization now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.