INNER CODE UNIT · Python
gain
adminho/trading-stock-thailand · DeepQ_trade.py:166
file_pic, file_csv, gain = port.report(episode+1)
print("Compute gain: ", gain)
print("Generate a graph figure to a file:", file_pic)
print("Log portfolio to a csv file: ", file_csv)
all_gain.append(gain)
all_pic.append(file_pic)
sec = datetime.timedelta(seconds=int(time.time() - start_time))
print ("\nCompilation Time : ", str(sec))
print("Training all episode finished!")
print("************************")
print("\n*********Runing on the best action**********")
print("Run agent")
env.reset() # reuse same environment with reset to start trading
terminate = False
s_t = env.first_state