[Fix]修复CRR定价公式的错误

This commit is contained in:
vn.py 2018-01-13 17:31:30 +08:00
parent a7bbeb73bc
commit 010bd71dd4

View File

@ -78,7 +78,7 @@ def generateTree(f, k, r, t, v, cp, n):
#----------------------------------------------------------------------
def calculatePrice(f, k, r, t, v, cp, n=15):
"""计算期权价格"""
oTree, uTree = calculatePrice(f, k, r, t, v, cp)
oTree, uTree = generateTree(f, k, r, t, v, cp, n)
return oTree[0, 0]
#----------------------------------------------------------------------