init
This commit is contained in:
@@ -186,7 +186,6 @@ class Simulation (HTS):
|
||||
return result
|
||||
|
||||
def simulate(self, stock_codes:dict=None, analyzed_day=1000):
|
||||
|
||||
if stock_codes is not None:
|
||||
for stock_code in stock_codes:
|
||||
for given_day in stock_codes[stock_code]:
|
||||
@@ -220,13 +219,6 @@ class Simulation (HTS):
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
||||
for i in range(3, len(a)+1):
|
||||
print (a[i-3: i])
|
||||
print (a[i - 3])
|
||||
print (a[i - 1])
|
||||
|
||||
|
||||
PROJECT_HOME = os.getcwd()
|
||||
RESOURCE_PATH = os.path.join(PROJECT_HOME, "resources")
|
||||
|
||||
@@ -238,8 +230,7 @@ if __name__ == "__main__":
|
||||
'20220901', '20220902', '20220905', '20220906', '20220907', '20220908','20220913','20220914','20220915','20220916'
|
||||
],
|
||||
"122630": [
|
||||
'20220901', '20220902', '20220905', '20220906', '20220907', '20220908', '20220913', '20220914', '20220915',
|
||||
'20220916'
|
||||
'20220901', '20220902', '20220905', '20220906', '20220907', '20220908', '20220913', '20220914', '20220915', '20220916'
|
||||
]
|
||||
}
|
||||
#simulation.simulate(stock_codes)
|
||||
|
||||
@@ -726,7 +726,7 @@ class BuySellChecker:
|
||||
outFp.write(str(df["label"][i]) + "\n")
|
||||
return
|
||||
|
||||
def checkTransaction(self, data, data_5, data_30, isRealTime=True):
|
||||
def checkTransaction(self, stock_code, data, data_5, data_30, isRealTime=True):
|
||||
# 어제 오늘 데이터로 분석
|
||||
bsLine = {}
|
||||
size = len(data["close"])
|
||||
|
||||
@@ -21,6 +21,7 @@ class HTS:
|
||||
def __init__(self, RESOURCE_PATH):
|
||||
self.RESOURCE_PATH = RESOURCE_PATH
|
||||
#self.connect()
|
||||
self.connect2DB(os.path.join( RESOURCE_PATH, "hts.db"))
|
||||
return
|
||||
|
||||
def connect(self):
|
||||
|
||||
Reference in New Issue
Block a user