This commit is contained in:
dosangyoon
2021-10-17 21:13:22 +09:00
parent f2fa13453d
commit 20591c7a17
5 changed files with 731 additions and 65 deletions

View File

@@ -133,19 +133,6 @@ class Simulation:
return
def getAverageVolume(self, stock_code):
index = 0
while index < 10:
this_day = datetime.today() - timedelta(days=index+1)
fileName = "./data/"+stock_code+"_"+this_day.strftime("%Y%m%d")+".csv"
#fileName = "./data/" + stock_code + "_20211013.csv"
if os.path.isfile(fileName):
data = pd.read_csv(fileName)
return data
index += 1
return 2000000
def simulate(self, stock_code, GIVEN_DAY):
result = {"check": set(),
"time": [],
@@ -155,8 +142,6 @@ class Simulation:
"low": [],
"vol": []}
averageVolume = self.getAverageVolume(stock_code)
# 데이터를 가지고 온다.
self.getCSV("./data/"+stock_code+"_"+GIVEN_DAY+".csv", GIVEN_DAY, result)