本文整理匯總了Python中Data.regular方法的典型用法代碼示例。如果您正苦於以下問題:Python Data.regular方法的具體用法?Python Data.regular怎麽用?Python Data.regular使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Data
的用法示例。
在下文中一共展示了Data.regular方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: percentile
# 需要導入模塊: import Data [as 別名]
# 或者: from Data import regular [as 別名]
import numpy as np
from scipy import special, optimize
from pylab import plot, show
from Data import *
my_bse=Data("BSE30data.csv")
my_nifty=Data("NIFTYdata.csv")
print percentile(my_bse.pe, 20)
print percentile(my_bse.pe, 15)
print percentile(my_nifty.pe, 20)
print percentile(my_nifty.pe, 15)
my_nifty.regular=0
print 1-percentile(my_bse.dy, 1.1)
print 1-percentile(my_bse.dy, 1.6)
print 1-percentile(my_nifty.dy, 1.1)
print 1-percentile(my_nifty.dy, 1.6)
my_bse.regular=0
"""print my_nifty.DynamicAllocation(1.1, 1.6, 1, 'none')
print my_nifty.CalculateEffectiveReturn()
print my_nifty.DynamicAllocation(1.1, 1.6, 1, 'dy')
print my_nifty.CalculateEffectiveReturn()
print my_nifty.DynamicAllocation(15, 20, 1, 'pe')
print my_nifty.CalculateEffectiveReturn()
"""
#print my_nifty.DynamicAllocationVer2(my_bse, 1)
"""print my_nifty.CalculateEffectiveReturn()
print my_bse.DynamicAllocation(15, 20, 1, 'none')
print my_bse.CalculateEffectiveReturn()
print my_bse.DynamicAllocation(1.1, 1.6, 1, 'dy')
print my_bse.CalculateEffectiveReturn()