geostock-analyzer-docs

LAYER2 — 매크로 변수 + anomaly + LLM correction queue

역할

LAYER1 양자관계 + 실시간 시장 데이터 → 정량 변수 44개 + cross-rule anomaly + LLM correction 큐

변수 분포 (40/44 실 데이터, 90.9%)

분류 로직

thresholds.json 임계값 — normal | caution | alert 3단계 분류 + momentum_flag (5d 변동률) + direction_flip (금리 방향 전환) + inverted (낮을수록 악화 지표)

Cross-rule Anomaly

변수 간 충돌·동시 발생 패턴 검출. 예시:

출력

@dataclass
class Layer2Output:
    asof: str
    layer1_context: dict           # L1 raw 전달 (해석 X)
    slow_variables: list[VariableState]
    fast_variables: list[VariableState]
    anomalies: list[CrossRuleHit]
    llm_correction_queue: list[dict]
    news_events: list[dict]        # 뉴스 raw 전달

2026-05-03 변경