init
This commit is contained in:
@@ -7,6 +7,7 @@ import os
|
||||
from hts.HTS import HTS
|
||||
from stock.util.Stock2Vector import Stock2Vector
|
||||
from stock.util.StockPredictor import StockPredictor
|
||||
from stock.util.LabelMaker import LabelMaker
|
||||
from hts.BuySellChecker import BuySellChecker
|
||||
|
||||
class Simulation (HTS):
|
||||
@@ -17,6 +18,7 @@ class Simulation (HTS):
|
||||
super().__init__(RESOURCE_PATH)
|
||||
|
||||
self.stock2Vector = Stock2Vector(RESOURCE_PATH)
|
||||
self.labelMaker = LabelMaker(RESOURCE_PATH)
|
||||
self.stockPredictor = StockPredictor()
|
||||
self.buySellChecker = BuySellChecker()
|
||||
self.RESOURCE_PATH = RESOURCE_PATH
|
||||
@@ -131,7 +133,10 @@ class Simulation (HTS):
|
||||
|
||||
def simulate(self, stock_code, today, method="rule"):
|
||||
|
||||
if method == "ml":
|
||||
if method == "answer":
|
||||
bsLine, data = self.labelMaker.makeCandidate(stock_code, today, view=True)
|
||||
|
||||
elif method == "ml":
|
||||
LAST_DATA = self.stock2Vector.getLastData(stock_code, today, n=10)
|
||||
result = self.stock2Vector.getRealTime(stock_code, today, LAST_DATA)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user