This commit is contained in:
dsyoon
2022-12-31 01:55:30 +09:00
parent 31a32361b9
commit 472c4bd6b5

View File

@@ -279,8 +279,9 @@ class AnalyzerSqlite:
self.makeDir("daily_rsi_10이하")
self.makeDir("daily_이전에_없던_거래량")
self.makeDir("daily_이격도")
self.makeDir("daily_weekly_monthly_rsi_10_20_30이하")
self.makeDir("daily_낙폭과대")
return
@@ -563,7 +564,6 @@ class AnalyzerSqlite:
self.writeFile(type, CODE, NAME, top, stock_daily, status)
# 2년 중 최대 거래량인 경우
size = len(stock_daily['volume'])
c_index = 520
if len(stock_daily['volume']) < c_index:
c_index = len(stock_daily['volume'])
@@ -591,6 +591,18 @@ class AnalyzerSqlite:
final_status_count += 1
self.writeFile(type, CODE, NAME, top, stock_daily, status)
# daily_낙폭과대 (50% 이상 하락)
c_index = 520
if len(stock_daily['close']) < c_index:
c_index = len(stock_daily['close'])
location = stock_daily['close'][0] / max(stock_daily['close'][1:c_index])
if location < 0.5:
type = "daily_낙폭과대"
final_status += " " + type
final_status_count += 1
status = "{:.2f}".format(location) + "_" + status
self.writeFile(type, CODE, NAME, top, stock_daily, status)
if final_status_count >= 5:
type = "final"
self.writeFile(type, CODE, NAME, top, stock_daily, final_status, final_status_count)