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