CBlackModel.py 文件源码

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

项目:MarkovModels 作者: pmontalb 项目源码 文件源码
def calculate_vega(forward, strike, implied_sigma, annuity, days_to_maturity):
    """ This function returns Vega, which is the same for both payer/receiver
    :param forward:
    :param strike:
    :param implied_sigma:
    :param annuity:
    :param days_to_maturity:
    :return:
    """
    from scipy.stats import norm
    from math import sqrt
    d1 = calculate_d1(forward, strike, implied_sigma, days_to_maturity)
    year_fraction = float(days_to_maturity) / 365
    vega = annuity * forward * sqrt(year_fraction) * norm.pdf(d1)

    return vega
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号