[Mod]修改black模型的calculateTheta实现
This commit is contained in:
parent
b5357c4d7d
commit
0bbb321306
@ -68,7 +68,7 @@ def calculateTheta(f, k, r, t, v, cp):
|
|||||||
"""计算Theta值"""
|
"""计算Theta值"""
|
||||||
price1 = calculatePrice(f, k, r, t*STEP_UP, v, cp)
|
price1 = calculatePrice(f, k, r, t*STEP_UP, v, cp)
|
||||||
price2 = calculatePrice(f, k, r, t*STEP_DOWN, v, cp)
|
price2 = calculatePrice(f, k, r, t*STEP_DOWN, v, cp)
|
||||||
theta = (price1 - price2) * (t * STEP_DIFF * 240)
|
theta = -(price1 - price2) / (t * STEP_DIFF * 240)
|
||||||
return theta
|
return theta
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
|
@ -7,4 +7,4 @@ appName = 'OptionMaster'
|
|||||||
appDisplayName = u'OptionMaster'
|
appDisplayName = u'OptionMaster'
|
||||||
appEngine = None
|
appEngine = None
|
||||||
appWidget = None
|
appWidget = None
|
||||||
appIco = 'rm.ico'
|
appIco = 'om.ico'
|
BIN
vnpy/trader/app/optionMaster/om.ico
Normal file
BIN
vnpy/trader/app/optionMaster/om.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 66 KiB |
3
vnpy/trader/app/optionMaster/omBase.py
Normal file
3
vnpy/trader/app/optionMaster/omBase.py
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# encoding: UTF-8
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user