event-driven
하는 일
이 스킬은 뉴스, 공시, 정책 발표를 매매에 쓸 수 있는 점수화된 이벤트 데이터로 바꾸도록 에이전트를 돕습니다. 이벤트에 반응하고 그 신호를 가격 신호와 결합하려는 트레이더를 위한 스킬입니다.
사용하는 경우
- ✓회사나 업종에 관한 최근 뉴스의 감성을 점수로 매기고 싶을 때.
- ✓공시와 정책 발표에서 나온 이벤트 신호를 전략에 더하고 싶을 때.
- ✓이벤트 데이터를 매매 로직과 분리해 간단한 표에 보관하고 싶은 경우.
스킬 링크
https://github.com/HKUDS/Vibe-Trading/blob/main/agent/src/skills/event-driven/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
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
- Data collection: use the
read_urltool to fetch the full text of news and announcements - LLM analysis: the LLM reads the news and scores it from
-1.0to1.0with a standardized prompt (extremely bearish to extremely bullish) - Generate the event CSV: write data in the
date,event_type,score,source,summaryschema - Signal aggregation:
signal_engine.pyreads 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.
댓글
- …
이 저장소의 다른 스킬
vibe-trading
37k에이전트에게 백테스트, 팩터 분석, 옵션 가격 결정, 여러 시장의 시장 데이터를 포함하는 완전한 금융 연구 도구 모음을 제공합니다.
adr-hshare
37k에이전트에게 미국 ADR과 홍콩 주식처럼 여러 시장에 상장된 중국 기업의 가격을 비교하는 방법을 보여 줍니다.
akshare
37k에이전트가 API 키 없이 중국과 해외 주식, 선물, 외환, 경제 지표의 무료 시장 데이터를 가져오도록 돕습니다.
alpha-zoo
37k에이전트가 만들어진 주식 팩터 라이브러리를 둘러보고, 선택한 시장에서 팩터 묶음이 수익률을 얼마나 잘 예측하는지 시험하도록 돕습니다.
비슷한 스킬
gitcrawl
394k에이전트가 저장된 GitHub 이슈와 풀 리퀘스트 보관본을 검색하고, 중복 항목을 묶고, GitHub에서 현재 상태를 확인하도록 돕습니다.
slacrawl
394k에이전트가 로컬 Slack 보관본에서 메시지를 검색하고 개수를 세며, 보관본이 얼마나 최신인지 확인하고 필요할 때 새로 고치도록 돕습니다.
goplaces
394k에이전트가 Google Places로 장소를 검색하고, 세부 정보와 리뷰를 가져오고, 장소 이름을 확인하며, 스크립트용 JSON을 출력하도록 돕습니다.