【短期利率模型之Cox-Ingersoll-Ross模型】

短期利率模型之Cox-Ingersoll-Ross模型

前言

上篇文章对Vasicek模型进行了简单的介绍,本偏文章则要对短期利率模型中的Cox-Ingersoll-Ross模型进行介绍

一、Cox-Ingersoll-Ross模型

Cox-Ingersoll-Ross模型是用于解决Vasicek模型出现负利率问题的单因素模型。

Cox-Ingersoll-Ross模型计算公式为(The equation for the CIR model is expressed as follows:)

在这里插入图片描述
其中:
rt=Instantaneous interest rate at time t(t时刻的瞬时利率)
a=Rate of mean reversion(回归速度)
b=Mean of the interest rate(长期平均水平。在长期水平下产生一系列r的轨道值)
Wt =Wiener process (random variable modeling the market risk factor/风险中性框架下的维纳过程)
σ=Standard deviation of the interest rate (measure of volatility/标准差参数)

二、Cox-Ingersoll-Ross模型的python量化

# CIR模型
# CIR模型是用于解决Vasicek模型负利率的问题
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')

在这里插入图片描述

总结

本章介绍了Cox-Ingersoll-Ross模型,Cox-Ingersoll-Ross模型是用于解决Vasicek模型出现负利率问题的单因素模型。

猜你喜欢

转载自blog.csdn.net/xiaowu1997/article/details/122724199