INNER CODE UNIT · Python

html

adminho/trading-stock-thailand · DeepQ_trade.py:116

	html = html_template % (log_path, list_pic)
	# and save html file	
	file_name = prefix_name + "_" + "log.html"
	f = open(file_name, "w")
	f.write(html)
	f.close()
	return file_name
	
def training_agent(symbol, startDate, endDate, total_episode = 100):	
	start_time = time.time()	
	# set Environment for trading	
	env = Environment(symbol, startDate, endDate)		
	agent = DeepQAgent(env)		
	all_gain, all_pic = [], []
	for episode in range(0, total_episode):			
		print("\n==================== Episode: %s ====================" % (episode+1))
		terminate =False			
		env.reset() 

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…