Update crr.py

import语句重复了
This commit is contained in:
shaoupipi 2018-05-13 10:52:59 +08:00 committed by GitHub
parent ff07764898
commit c2c7d2f171
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,8 +26,6 @@ theta当t变动1天时price的变动国内交易日每年240天
vega当v涨跌1个点时price的变动如从16%涨到17% vega当v涨跌1个点时price的变动如从16%涨到17%
''' '''
from __future__ import division
import numpy as np import numpy as np
from math import (isnan, exp, sqrt, pow) from math import (isnan, exp, sqrt, pow)
@ -180,4 +178,4 @@ def calculateImpv(price, f, k, r, t, cp, n=15):
# 保留4位小数 # 保留4位小数
v = round(v, 4) v = round(v, 4)
return v return v