def index_model(self):
"""
Build a asset protfolio using index model.
"""
hs300_data = ts.get_hist_data('hs300', self.start, self.end)
self.stockdata['hs300'] = hs300_data['close']
for stock_single in self.stocklist:
self.stockdata[stock_single] = ts.get_hist_data(stock_single, self.start, self.end)['close']
returns = (self.stockdata/self.stockdata.shift(1))-1
print('This function will be completed later!')
# To be continued
评论列表
文章目录