본문으로 건너뛰기
Skillpedia
분석 및 스프레드시트37k · #7517

event-driven

하는 일

이 스킬은 뉴스, 공시, 정책 발표를 매매에 쓸 수 있는 점수화된 이벤트 데이터로 바꾸도록 에이전트를 돕습니다. 이벤트에 반응하고 그 신호를 가격 신호와 결합하려는 트레이더를 위한 스킬입니다.

사용하는 경우

  • ✓회사나 업종에 관한 최근 뉴스의 감성을 점수로 매기고 싶을 때.
  • ✓공시와 정책 발표에서 나온 이벤트 신호를 전략에 더하고 싶을 때.
  • ✓이벤트 데이터를 매매 로직과 분리해 간단한 표에 보관하고 싶은 경우.

스킬 링크

https://github.com/HKUDS/Vibe-Trading/blob/main/agent/src/skills/event-driven/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/HKUDS/Vibe-Trading/blob/main/agent/src/skills/event-driven/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“이번 주 이 회사 관련 뉴스를 모아서 각 항목의 감성과 영향을 점수로 매기고, 우리 가격 신호와 결합해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 뉴스와 공시의 전문을 가져오고, AI가 각 항목을 매우 약세부터 매우 강세까지의 척도로 점수화하도록 한 뒤 표에 저장합니다. 신호 파일은 시간 감쇠를 적용하고 이벤트 점수를 기술적 신호와 섞습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Event-Driven Strategy

Purpose

Uses event information such as news, announcements, and macro policy updates. The LLM analyzes sentiment and impact magnitude to generate event-driven trading signals. Event data is managed in CSV format, and technical signals are combined with event signals through weighted aggregation to form the final trading decision.

Workflow

  1. Data collection: use the read_url tool to fetch the full text of news and announcements
  2. LLM analysis: the LLM reads the news and scores it from -1.0 to 1.0 with a standardized prompt (extremely bearish to extremely bullish)
  3. Generate the event CSV: write data in the date,event_type,score,source,summary schema
  4. Signal aggregation: signal_engine.py reads the event CSV, applies time decay, and combines it with the technical signal

Key principle: the event CSV is the data layer, and signal_engine.py is the logic layer. Keep them decoupled.

Event CSV Schema

date,event_type,score,source,summary
2024-01-15,earnings,0.8,read_url,Q4 revenue beat expectations by 30%
2024-01-20,macro,-0.5,read_url,Central bank raised rates by 25bp
2024-02-01,policy,0.3,read_url,New-energy subsidies extended
2024-02-10,sentiment,-0.7,read_url,Bearish sentiment surged on social media
2024-03-05,insider,0.4,read_url,CEO bought 5 million shares

Field descriptions:

Field Type Description
date str (YYYY-MM-DD) Date when the event became knowable (publication date, not occurrence date. If released after market close → use the next trading day)
event_type str earnings / macro / policy / sentiment / insider / technical_break
score float -1.0 ~ 1.0 (standardized LLM score)
source str Data-source tag (such as read_url)
summary str Event summary (one sentence, no commas)

Event Type Details

Type Meaning Typical Impact Duration
earnings Earnings release Short-term shock 1-5 days
macro Macro data / central-bank policy Medium-term impact 5-20 days
policy Industry policy / regulatory change Long-term impact 20-60 days
sentiment Market sentiment / public opinion Short-term shock 1-3 days
insider Insider trading / block trade Medium-term signal 5-10 days
technical_break Break of a key technical level Short-term catalyst 1-5 days

Signal Aggregation

Time Decay of Event Signals

Event impact decays exponentially over time:

import numpy as np
import pandas as pd


def compute_event_signal(event_df: pd.DataFrame, dates: pd.DatetimeIndex,
                         decay_lambda: float = 0.1,
                         min_score_threshold: float = 0.2,
                         event_lookback: int = 30) -> pd.Series:
    """Compute an event-driven signal with time decay.

    Args:
        event_df: DataFrame loaded from the event CSV, with date/event_type/score/source/summary columns.
        dates: Backtest date sequence (DatetimeIndex).
        decay_lambda: Decay coefficient. Higher values decay faster. Default 0.1 (decays to ~37% in about 10 days).
        min_score_threshold: Minimum score threshold. Events with |score| below this value are ignored.
        event_lookback: Event lookback window in days. Events older than this are excluded.

    Returns:
        Event signal Series aligned with dates, with value range [-1.0, 1.0].
    """
    event_df = event_df[event_df["score"].abs() >= min_score_threshold].copy()
    event_df["date"] = pd.to_datetime(event_df["date"])

    signal = pd.Series(0.0, index=dates)

    for trade_date in dates:
        # Only consider events published on or before trade_date (avoid look-ahead)
        mask = (event_df["date"] <= trade_date) & \
               (event_df["date"] >= trade_date - pd.Timedelta(days=event_lookback))
        relevant = event_df[mask]

        if relevant.empty:
            continue

        days_since = (trade_date - relevant["date"]).dt.days.values
        scores = relevant["score"].values
        # Exponential decay: score * exp(-lambda * days)
        decayed = scores * np.exp(-decay_lambda * days_since)
        # Sum multiple events and clip to [-1, 1]
        signal[trade_date] = np.clip(decayed.sum(), -1.0, 1.0)

    return signal

Weighted Combination of Technical and Event Signals

def combine_signals(tech_signal: pd.Series, event_signal: pd.Series,
    
자주 묻는 질문

점수 범위는 무엇을 뜻하나요?

마이너스 1은 매우 약세, 플러스 1은 매우 강세를 뜻합니다.

왜 이벤트 데이터를 별도 파일에 두나요?

데이터와 매매 로직을 분리하면 각각을 더 쉽게 검사하고 바꿀 수 있습니다.

오래된 뉴스도 반영되나요?

네. 다만 시간 감쇠를 거치면서 그 영향은 점점 줄어듭니다.

상세 정보

작성자의 원본 설명

Event-driven strategy based on sentiment-scored signals from news, announcements, and macro events. The LLM acts as the NLP engine, and event data follows a CSV schema.

repo: HKUDS/Vibe-Trading

인기도

GitHub 스타
37k
순위
#7517
라이선스
MIT
업데이트
2026. 11. 1.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬