本文整理汇总了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()