This commit is contained in:
dsyoon
2025-08-06 23:18:56 +09:00
parent 7d5a8eafcb
commit 7135bf71f0
3 changed files with 213 additions and 3 deletions

View File

@@ -110,6 +110,10 @@ def calculate_technical_indicators(data):
data['MA720'] = data['Close'].rolling(window=720).mean()
data['MA1440'] = data['Close'].rolling(window=1440).mean()
# --- 이격도(Deviation) 계산 ---
data['Deviation20'] = (data['Close'] / data['MA20']) * 100
data['Deviation40'] = (data['Close'] / data['MA40']) * 100
# 매수 타이밍을 이동평균선으로 결정
# 골든크로스: 단기 이동평균선이 장기 이동평균선을 상향 돌파할 때 매수
data['golden_cross'] = (data['MA5'] > data['MA20']) & (data['MA5'].shift(1) <= data['MA20'].shift(1))