init
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user