characteristic_funs.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:fftoptionlib 作者: arraystream 项目源码 文件源码
def cir_int_rt_chf(u, t, k, theta, sigma, r0):
    r = np.sqrt(k ** 2 - 1j * u * 2 * sigma ** 2)
    cosh_fun = np.cosh(r * t / 2)
    sinh_fun = np.sinh(r * t / 2)
    coth_fun = cosh_fun / sinh_fun
    a_t_v = np.exp(t * theta * (k ** 2) / (sigma ** 2)) / (cosh_fun + (k / r) * sinh_fun) ** (
        2 * k * theta / (sigma ** 2))
    b_t_v = 2 * 1j * u / (k + r * coth_fun)
    return a_t_v * np.exp(b_t_v * r0)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号