test_events.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:zipline-chinese 作者: zhanghan1990 项目源码 文件源码
def test_AfterOpen(self, ms):
        should_trigger = partial(
            AfterOpen(minutes=5, hours=1).should_trigger,
            env=self.env,
        )
        for m in islice(ms, 64):
            # Check the first 64 minutes of data.
            # We use 64 because the offset is from market open
            # at 13:30 UTC, meaning the first minute of data has an
            # offset of 1.
            self.assertFalse(should_trigger(m))
        for m in islice(ms, 64, None):
            # Check the rest of the day.
            self.assertTrue(should_trigger(m))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号