init
This commit is contained in:
@@ -150,6 +150,7 @@ if week in (0, 1, 2, 3, 4): # 0:월, 1:화, 2:수, 3:목, 4:금, 5:토, 6:일
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ERROR_COUNT = 0
|
ERROR_COUNT = 0
|
||||||
while ERROR_COUNT < 3:
|
while ERROR_COUNT < 3:
|
||||||
try:
|
try:
|
||||||
@@ -165,6 +166,7 @@ if week in (0, 1, 2, 3, 4): # 0:월, 1:화, 2:수, 3:목, 4:금, 5:토, 6:일
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ERROR_COUNT = 0
|
ERROR_COUNT = 0
|
||||||
while ERROR_COUNT < 3:
|
while ERROR_COUNT < 3:
|
||||||
try:
|
try:
|
||||||
@@ -180,6 +182,7 @@ if week in (0, 1, 2, 3, 4): # 0:월, 1:화, 2:수, 3:목, 4:금, 5:토, 6:일
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inFileName = PROJECT_HOME + '/resources/stock.db'
|
inFileName = PROJECT_HOME + '/resources/stock.db'
|
||||||
analyzerSqlite = AnalyzerSqlite(stockFileName)
|
analyzerSqlite = AnalyzerSqlite(stockFileName)
|
||||||
|
|
||||||
@@ -232,5 +235,6 @@ if week in (0, 1, 2, 3, 4): # 0:월, 1:화, 2:수, 3:목, 4:금, 5:토, 6:일
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print("time : %6.2f 초", (time.time() - start))
|
print("time : %6.2f 초", (time.time() - start))
|
||||||
print ("done...")
|
print ("done...")
|
||||||
|
|||||||
@@ -228,12 +228,20 @@ if __name__ == "__main__":
|
|||||||
stockFileName = os.path.join(RESOURCE_PATH, 'stock.db')
|
stockFileName = os.path.join(RESOURCE_PATH, 'stock.db')
|
||||||
|
|
||||||
stockPriceDirectionAnalyzer = StockPriceDirectionAnalyzer(stockFileName)
|
stockPriceDirectionAnalyzer = StockPriceDirectionAnalyzer(stockFileName)
|
||||||
|
|
||||||
|
"""
|
||||||
corr_scores = stockPriceDirectionAnalyzer.analyze(master_code='122630')
|
corr_scores = stockPriceDirectionAnalyzer.analyze(master_code='122630')
|
||||||
corr_scores_list = sorted(corr_scores.items(), key=lambda item: item[1], reverse=True)
|
corr_scores_list = sorted(corr_scores.items(), key=lambda item: item[1], reverse=True)
|
||||||
|
for item in corr_scores_list:
|
||||||
|
if item[1] > 0.8:
|
||||||
|
print("%s %4.3f" % (item[0], item[1]))
|
||||||
|
"""
|
||||||
|
|
||||||
|
corr_scores = stockPriceDirectionAnalyzer.analyze(master_code='252670')
|
||||||
|
corr_scores_list = sorted(corr_scores.items(), key=lambda item: item[1], reverse=True)
|
||||||
for item in corr_scores_list:
|
for item in corr_scores_list:
|
||||||
print("%s %4.3f" % (item[0], item[1]))
|
print("%s %4.3f" % (item[0], item[1]))
|
||||||
|
|
||||||
|
|
||||||
print('done...')
|
print('done...')
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user