本文整理匯總了Python中zipline.test_algorithms.TestOrderInstantAlgorithm類的典型用法代碼示例。如果您正苦於以下問題:Python TestOrderInstantAlgorithm類的具體用法?Python TestOrderInstantAlgorithm怎麽用?Python TestOrderInstantAlgorithm使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了TestOrderInstantAlgorithm類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_minute_data
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
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
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
def test_order_instant(self):
algo = TestOrderInstantAlgorithm(sim_params=self.sim_params,
instant_fill=True)
algo.run(self.df)