This commit is contained in:
dosang.yoon
2022-07-11 00:01:52 +09:00
parent c7354382e8
commit 8a626831d2
4 changed files with 10 additions and 1149 deletions

View File

@@ -4,6 +4,7 @@ import csv
import pandas as pd
import plotly.graph_objects as go
from plotly import subplots
from glob import glob
from hts.BuySellChecker import BuySellChecker
@@ -164,8 +165,8 @@ class Simulation:
today = days[1]
# 데이터를 가지고 온다.
self.getCSV("./backup/" + self.stock_code + "_" + last_day + ".csv", last_day, result)
self.getCSV("./backup/" + self.stock_code + "_" + today + ".csv", today, result)
self.getCSV("./hts/data/" + self.stock_code + "_" + last_day + ".csv", last_day, result)
self.getCSV("./hts/data/" + self.stock_code + "_" + today + ".csv", today, result)
# 분석을 통해서 볼린저밴드 상/하단을 계산한다.
data = self.buySellChecker.analyze(result)
@@ -191,7 +192,7 @@ if __name__ == "__main__":
}
"""
"""
stock_codes = {
# 252670
# 122630
@@ -213,7 +214,13 @@ if __name__ == "__main__":
('20220707', '20220708')
],
}
"""
fileList = glob('./hts/backup/252670_*.csv')
fileList = sorted(fileList)
stock_codes = {'252670':[]}
for i in range(1, 11):
stock_codes['252670'].append((fileList[i-1][20:28], fileList[i][20:28]))
for stock_code in stock_codes:
simulation = Simulation(stock_code)