blotter.py 文件源码

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

项目:blotter 作者: matthewgilbert 项目源码 文件源码
def automatic_events(self, timestamp):
        """
        Update the current time of the Blotter, triggering all scheduled events
        between previous clock time and new clock time such as interest
        charges, margin charges, PnL calculations and PnL sweeps. See
        create_events() for more information on the type of events.

        Parameters
        ----------
        timestamp: pandas.Timestamp
            Time to update clock to and tigger internal events up until
        """

        current_time = self._holdings.timestamp
        # first event so there is nothing automatic that needs to be done
        if current_time is pd.NaT:
            return
        actions = self._get_actions(current_time, timestamp, self._actions)
        for ts, action in actions.iteritems():
            events = self.create_events(ts, action)
            self.dispatch_events(events)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号