init
This commit is contained in:
@@ -7,7 +7,7 @@ import os
|
|||||||
|
|
||||||
from hts.HTS import HTS
|
from hts.HTS import HTS
|
||||||
from stock.util.Stock2Vector import Stock2Vector
|
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 stock.util.StockPredictor import StockPredictor
|
||||||
from hts.BuySellChecker import BuySellChecker
|
from hts.BuySellChecker import BuySellChecker
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@ class Simulation (HTS):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
self.stock2Vector = Stock2Vector(RESOURCE_PATH)
|
self.stock2Vector = Stock2Vector(RESOURCE_PATH)
|
||||||
self.labelMaker = LabelMaker(RESOURCE_PATH)
|
self.labelChecker = LabelChecker(RESOURCE_PATH)
|
||||||
self.stockPredictor = StockPredictor(RESOURCE_PATH)
|
self.stockPredictor = StockPredictor(RESOURCE_PATH)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
@@ -148,7 +148,7 @@ class Simulation (HTS):
|
|||||||
|
|
||||||
if method == "answer":
|
if method == "answer":
|
||||||
#self.labelMaker.makeCandidate(stock_code, today, view=True)
|
#self.labelMaker.makeCandidate(stock_code, today, view=True)
|
||||||
self.labelMaker.showLabels(stock_code, today)
|
self.labelChecker.showLabels(stock_code, today)
|
||||||
else:
|
else:
|
||||||
if method == "ml":
|
if method == "ml":
|
||||||
LAST_DATA = self.stock2Vector.getLastData(stock_code, today, n=3)
|
LAST_DATA = self.stock2Vector.getLastData(stock_code, today, n=3)
|
||||||
@@ -181,8 +181,14 @@ if __name__ == "__main__":
|
|||||||
stock_codes = {
|
stock_codes = {
|
||||||
"252670": ['20220801', '20220802', '20220803', '20220804',
|
"252670": ['20220801', '20220802', '20220803', '20220804',
|
||||||
'20220805', '20220808', '20220809', '20220810', '20220811',
|
'20220805', '20220808', '20220809', '20220810', '20220811',
|
||||||
'20220812', '20220816'],
|
'20220812', '20220816', '20220817'],
|
||||||
#"122630": ['20220801', '20220802', '20220803', '20220804', '20220805', '20220808', '20220809', '20220810', '20220811', '20220812'],
|
"122630": ['20220801', '20220802', '20220803', '20220804',
|
||||||
|
'20220805', '20220808', '20220809', '20220810', '20220811',
|
||||||
|
'20220812', '20220816', '20220817'],
|
||||||
|
}
|
||||||
|
stock_codes = {
|
||||||
|
"252670": ['20220817'],
|
||||||
|
"122630": ['20220817'],
|
||||||
}
|
}
|
||||||
|
|
||||||
method = "rule" # "rule", "ml", "answer"
|
method = "rule" # "rule", "ml", "answer"
|
||||||
|
|||||||
Reference in New Issue
Block a user