本文整理匯總了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)