base.py 文件源码

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

项目:slaveo 作者: lamter 项目源码 文件源码
def touch_open_indexes(self):
        """
        ???????????
        :return:
        """
        quo = self.quotation

        assert isinstance(quo, pd.DataFrame)

        if self.open_indexes == self.INDEXES_TYPE_MA:
            # ????
            ma = pd.merge(self.codes[["open_ma", "close"]], quo[["bid1"]], left_index=True, right_index=True)
            # ????? < ??,? ??? > ??
            ma["open_position"] = ma.bid1 > ma.open_ma
            self.codes.open_position = ma.open_position
            if self.debug:
                open_num = ma.open_position.value_counts()[True]
                self.log.debug("%s ????????? " % open_num)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号