This commit is contained in:
dsyoon
2022-08-05 01:06:37 +09:00
parent a3e390ab70
commit e0a336c8cc

View File

@@ -135,8 +135,8 @@ class Simulation (HTS):
if method == "answer": if method == "answer":
bsLine, data = self.labelMaker.makeCandidate(stock_code, today, view=True) bsLine, data = self.labelMaker.makeCandidate(stock_code, today, view=True)
else:
elif method == "ml": if method == "ml":
LAST_DATA = self.stock2Vector.getLastData(stock_code, today, n=10) LAST_DATA = self.stock2Vector.getLastData(stock_code, today, n=10)
result = self.stock2Vector.getRealTime(stock_code, today, LAST_DATA) result = self.stock2Vector.getRealTime(stock_code, today, LAST_DATA)
@@ -166,13 +166,14 @@ if __name__ == "__main__":
stock_codes = { stock_codes = {
# 252670 # 252670
# 122630 # 122630
"122630": ['20220803'], "252670": ['20220804'],
} }
method = "answer" # "ml", "answer"
for stock_code in stock_codes: for stock_code in stock_codes:
simulation = Simulation(RESOURCE_PATH) simulation = Simulation(RESOURCE_PATH)
for given_day in stock_codes[stock_code]: for given_day in stock_codes[stock_code]:
simulation.simulate(stock_code, given_day, method='ml') simulation.simulate(stock_code, given_day, method=method)
print ("done...") print ("done...")