init
This commit is contained in:
@@ -28,6 +28,9 @@ class Simulation (HTS):
|
||||
return
|
||||
|
||||
def draw(self, stock_code, given_day, data, bsLine):
|
||||
if bsLine is None:
|
||||
return
|
||||
|
||||
# 어제 데이터는 지운다.
|
||||
data = data.loc[pd.DatetimeIndex(data.index).day == int(given_day[6:])]
|
||||
buy_line = bsLine['buy'][381:]
|
||||
@@ -144,7 +147,7 @@ class Simulation (HTS):
|
||||
X, Y = self.stock2Vector.getDataset2D(data)
|
||||
|
||||
predY = self.stockPredictor.predict(X, Y)
|
||||
print (predY)
|
||||
bsLine = None
|
||||
else:
|
||||
LAST_DATA = self.stock2Vector.getLastData(stock_code, today)
|
||||
result = self.stock2Vector.getRealTime(stock_code, today, LAST_DATA)
|
||||
@@ -169,10 +172,10 @@ if __name__ == "__main__":
|
||||
stock_codes = {
|
||||
# 252670
|
||||
# 122630
|
||||
"252670": ['20200731'],
|
||||
"252670": ['20220801', '20220802', '20220803', '20220804', '20220805'],
|
||||
}
|
||||
|
||||
method = "ml" # "ml", "answer"
|
||||
method = "rul" # "rul", "ml", "answer"
|
||||
for stock_code in stock_codes:
|
||||
simulation = Simulation(RESOURCE_PATH)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user