本文整理汇总了Python中zipline.test_algorithms.TestOrderInstantAlgorithm.run方法的典型用法代码示例。如果您正苦于以下问题:Python TestOrderInstantAlgorithm.run方法的具体用法?Python TestOrderInstantAlgorithm.run怎么用?Python TestOrderInstantAlgorithm.run使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类zipline.test_algorithms.TestOrderInstantAlgorithm
的用法示例。
在下文中一共展示了TestOrderInstantAlgorithm.run方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_minute_data
# 需要导入模块: from zipline.test_algorithms import TestOrderInstantAlgorithm [as 别名]
# 或者: from zipline.test_algorithms.TestOrderInstantAlgorithm import run [as 别名]
def test_minute_data(self):
source = RandomWalkSource(freq='minute',
start=pd.Timestamp('2000-1-3',
tz='UTC'),
end=pd.Timestamp('2000-1-4',
tz='UTC'))
self.sim_params.data_frequency = 'minute'
algo = TestOrderInstantAlgorithm(sim_params=self.sim_params,
instant_fill=True)
algo.run(source)
示例2: test_minute_data
# 需要导入模块: from zipline.test_algorithms import TestOrderInstantAlgorithm [as 别名]
# 或者: from zipline.test_algorithms.TestOrderInstantAlgorithm import run [as 别名]
def test_minute_data(self):
source = RandomWalkSource(
freq="minute", start=pd.Timestamp("2000-1-1", tz="UTC"), end=pd.Timestamp("2000-1-1", tz="UTC")
)
algo = TestOrderInstantAlgorithm(sim_params=self.sim_params, data_frequency="minute", instant_fill=True)
algo.run(source)
示例3: test_order_instant
# 需要导入模块: from zipline.test_algorithms import TestOrderInstantAlgorithm [as 别名]
# 或者: from zipline.test_algorithms.TestOrderInstantAlgorithm import run [as 别名]
def test_order_instant(self):
algo = TestOrderInstantAlgorithm(sim_params=self.sim_params, data_frequency="daily", instant_fill=True)
algo.run(self.df)
示例4: test_order_instant
# 需要导入模块: from zipline.test_algorithms import TestOrderInstantAlgorithm [as 别名]
# 或者: from zipline.test_algorithms.TestOrderInstantAlgorithm import run [as 别名]
def test_order_instant(self):
algo = TestOrderInstantAlgorithm(sim_params=self.sim_params,
instant_fill=True)
algo.run(self.df)