Exemple #1
0
 def __init__(self):
     strategy.__init__(self)
     # 每个因子策略都需要用到是否可交易的数据
     self.strategy_data.generate_if_tradable(shift=True)
     # 读取市值数据以进行市值加权
     self.strategy_data.stock_price = data.read_data(['FreeMarketValue'],
                                                     ['FreeMarketValue'],
                                                     shift=True)
     # 用来画图的pdf对象
     self.pdfs = 'default'
Exemple #2
0
 def __init__(self, player, url):
     strategy.__init__(self,player)
     self.url = url
Exemple #3
0
 def __init__(self, player, strat_file):
     strategy.__init__(self,player)
     self.strat_file = strat_file
     self.strat = compile(pickle.load(open(self.strat_file, 'rb')), "<string>", "eval")