示例#1
0
文件: plot_test.py 项目: linbirg/RL
def get_ohlc():
    ohlcs = ld.load_cvs(DATA_FILE)
    prices = [(
        dtutil.date_time_str_2_float(olhc[0]+' '+olhc[1]),
        float(olhc[2]),
        float(olhc[3]),
        float(olhc[4]),
        float(olhc[5])
     ) for olhc in ohlcs]
    return prices
示例#2
0
文件: stock_env.py 项目: linbirg/RL
 def _get_ohlc(self):
     ohlcs = ld.load_cvs(self.data_path)
     # [[t,open,high,low,close]]
     prices = [[
         dtutil.date_time_str_2_float(olhc[0] + ' ' + olhc[1]),
         float(olhc[2]),
         float(olhc[3]),
         float(olhc[4]),
         float(olhc[5])
     ] for olhc in ohlcs]
     return prices