<> Of short-term interest rate model Cox-Ingersoll-Ross Model
<> preface
The last article is right Vasicek The model is briefly introduced , This article will focus on the short-term interest rate model Cox-Ingersoll-Ross The model is introduced
<> one ,Cox-Ingersoll-Ross Model
Cox-Ingersoll-Ross The model is used to solve Vasicek Single factor model with negative interest rate .
Cox-Ingersoll-Ross The calculation formula of the model is (The equation for the CIR model is expressed as
follows:)
among :
rt=Instantaneous interest rate at time t(t Instantaneous interest rate at time )
a=Rate of mean reversion( Regression speed )
b=Mean of the interest rate( Long term average . At a long-term level, a series of r Track value of )
Wt =Wiener process (random variable modeling the market risk
factor/ Wiener process under risk neutral framework )
σ=Standard deviation of the interest rate (measure of volatility/ Standard deviation parameter )
<> two ,Cox-Ingersoll-Ross Modelled python quantification
# CIR Model # CIR The model is used to solve Vasicek The problem of model negative interest rate import math import numpy as np def CIR(
r0,K,theta,sigma,T=1,N=10,seed=777): np.random.seed(seed) df=T/float(N) rates=[
r0] for i in range(N): dr=K*(theta-rates[-1])*dt+sigma*math.sqrt(rates[-1])
*math.sqrt(dt)*np.random.normal() rates.append(rates[-1]+dr) return range(N+1)
,rates import matplotlib.pyplot as plt plt.figure(figsize=(12,10)) for K in [
0.002,0.02,0.2]: x,y=CIR(0.005,K,0.15,sigma,T=10,N=200,seed=777) plt.plot(
x,y,label='K=%s'%K) plt.legend(loc=0) plt.xlabel('CRR model')
<> summary
This chapter introduces Cox-Ingersoll-Ross Model ,Cox-Ingersoll-Ross The model is used to solve Vasicek Single factor model with negative interest rate .
Technology
Daily Recommendation