This function shows you how to calculate a bond's price when the interest rate follows the Vasicek model. The function shows the analytical solution to the ODE, it shows how solve the ODE numerically using ode45, and it shows how to solve for the bond's price using Monte Carlo simulations.
Philip (2020). Vasicek (https://www.mathworks.com/matlabcentral/fileexchange/57354-vasicek), MATLAB Central File Exchange. Retrieved .