diff --git a/Simulation.py b/Simulation.py index 89d6215..7b2b28d 100644 --- a/Simulation.py +++ b/Simulation.py @@ -7,7 +7,7 @@ import os from hts.HTS import HTS from stock.util.Stock2Vector import Stock2Vector -from stock.util.LabelMaker import LabelMaker +from stock.util.LabelChecker import LabelChecker from stock.util.StockPredictor import StockPredictor from hts.BuySellChecker import BuySellChecker @@ -25,7 +25,7 @@ class Simulation (HTS): try: self.stock2Vector = Stock2Vector(RESOURCE_PATH) - self.labelMaker = LabelMaker(RESOURCE_PATH) + self.labelChecker = LabelChecker(RESOURCE_PATH) self.stockPredictor = StockPredictor(RESOURCE_PATH) except: pass @@ -148,7 +148,7 @@ class Simulation (HTS): if method == "answer": #self.labelMaker.makeCandidate(stock_code, today, view=True) - self.labelMaker.showLabels(stock_code, today) + self.labelChecker.showLabels(stock_code, today) else: if method == "ml": LAST_DATA = self.stock2Vector.getLastData(stock_code, today, n=3) @@ -181,8 +181,14 @@ if __name__ == "__main__": stock_codes = { "252670": ['20220801', '20220802', '20220803', '20220804', '20220805', '20220808', '20220809', '20220810', '20220811', - '20220812', '20220816'], - #"122630": ['20220801', '20220802', '20220803', '20220804', '20220805', '20220808', '20220809', '20220810', '20220811', '20220812'], + '20220812', '20220816', '20220817'], + "122630": ['20220801', '20220802', '20220803', '20220804', + '20220805', '20220808', '20220809', '20220810', '20220811', + '20220812', '20220816', '20220817'], + } + stock_codes = { + "252670": ['20220817'], + "122630": ['20220817'], } method = "rule" # "rule", "ml", "answer"