예제 #1
0
 def get_stock_list(self):
     index_member = GetIndexMember()
     index_member.get_all_index_members()
     _, stock_list_SH = index_member.get_index_members('000001.SH')
     _, stock_list_SZ = index_member.get_index_members('399106.SZ')
     self.stock_list = stock_list_SH + stock_list_SZ
     return self.stock_list
예제 #2
0
    def __init__(self):
        super().__init__()
        # 取指数成分股实例
        self.index_member_obj = GetIndexMember()
        # 取K线数据实例
        self.data_class = GetKlineData()
        # 取指标实例
        self.indicator = SaveGetIndicator()

        # 取指标数据
        self.ma5 = self.indicator.get_indicator('ma5')
        self.ma10 = self.indicator.get_indicator('ma10')
        self.now = time.time()
예제 #3
0
    def __init__(self, strategy_name='ma_strategy'):
        super().__init__()

        self.strategy_name = strategy_name
        # 取指数成分股实例
        self.index_member_obj = GetIndexMember()
        # 取K线数据实例
        self.data_class = GetKlineData()
        # 取指标实例
        self.indicator = SaveGetIndicator()

        # 取指标数据
        self.ma5 = self.indicator.get_indicator('ma5')
        self.ma10 = self.indicator.get_indicator('ma10')
        self.now = time.time()
        Environment.logger = Logger(strategy_name)
예제 #4
0
 def market_value_method(self):
     index_member_obj = GetIndexMember()
     industry_member_df = index_member_obj.get_industry_member()
     return industry_member_df