[Fix]修复CRR定价公式的错误
This commit is contained in:
parent
a7bbeb73bc
commit
010bd71dd4
@ -78,7 +78,7 @@ def generateTree(f, k, r, t, v, cp, n):
|
|||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
def calculatePrice(f, k, r, t, v, cp, n=15):
|
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]
|
return oTree[0, 0]
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user