ClaudeMods
☰
KO
● 0 명 접속 중 · 조회 0 회
후원프로젝트 제출
GitHub 저장소 · 작성자 ruvnet

ruflo-market-data

시장 데이터 수집 — 피드 정규화, OHLCV 벡터화, HNSW 인덱스를 활용한 패턴 매칭.

ruvnet@ruvnet

ruvnet/ruflo/tree/main/plugins/ruflo-market-data

번역 완료

이 mod 소개

ruflo-market-data

시장 데이터 수집 — 피드 정규화, OHLCV 벡터화, HNSW 인덱스를 활용한 패턴 매칭.

개요

REST API와 WebSocket 피드에서 시장 데이터를 수집하고, 스케일링을 일관되게 적용한 OHLCV 벡터로 정규화한다. 캔들 패턴도 벡터화해 HNSW 유사도 검색에 사용한다. 신뢰도 점수를 매겨 단일 캔들(doji, hammer)과 여러 캔들(engulfing, morning star, head & shoulders) 형성을 감지한다.

설치

claude --plugin-dir plugins/ruflo-market-data

Agents

| Agent | Model | 역할 | |-------|-------|------| | data-engineer | sonnet | 시장 피드 수집, OHLCV 정규화, 캔들 패턴 벡터화, HNSW 인덱스 기반 패턴 매칭 |

Skills

| Skill | 사용법 | 설명 | |-------|--------|------| | market-ingest | /market-ingest <symbol> [--source api] | 시장 데이터를 수집하고 정규화해 HNSW 인덱스가 포함된 OHLCV 벡터로 만든다 | | market-pattern | /market-pattern <symbol> [--period 1D] | 수집된 데이터에서 캔들 패턴을 감지하고 분류한다 |

Commands (5 subcommands)

market ingest <symbol> [--period 1D]    # Ingest and normalize OHLCV data
market patterns <symbol>                 # Detect candlestick patterns
market search <pattern-name>             # Search historical pattern occurrences
market history <symbol>                  # Show ingestion history and data coverage
market compare <sym1> <sym2>             # Compare pattern profiles between symbols

OHLCV 정규화

| 필드 | 정규화 | |------|--------| | Open | 이전 종가 대비 상대값: (open - prev_close) / prev_close | | High | 시가 대비 상대값: (high - open) / open | | Low | 시가 대비 상대값: (low - open) / open | | Close | 시가 대비 상대값: (close - open) / open | | Volume | Z-score: (vol - mean_vol) / std_vol |

패턴 라이브러리

| 패턴 | 유형 | 캔들 수 | 신뢰도 | |------|------|----------|--------| | Doji | 반전 | 1 | 중간 | | Hammer | 반전 | 1 | 중간 이상 | | Engulfing | 반전 | 2 | 높음 | | Morning/Evening Star | 반전 | 3 | 높음 | | Three White Soldiers | 지속 | 3 | 높음 | | Head & Shoulders | 반전 | 5-7 | 매우 높음 | | Double Top/Bottom | 반전 | 가변 | 높음 |

각 패턴은 64차원 패딩 벡터로 인코딩되어 HNSW 인덱싱에 사용된다.

호환성

  • CLI: @claude-flow/cli v3.6 메이저+마이너 버전에 고정된다.
  • 검증: bash plugins/ruflo-market-data/scripts/smoke.sh가 계약이다.

네임스페이스 조정

이 플러그인은 2개의 AgentDB 네임스페이스를 소유한다(kebab-case를 사용하며 ruflo-agentdb ADR-0001의 「Namespace convention」 규칙을 따른다).

  • market-data — symbol+date별 정규화된 OHLCV 벡터
  • market-patterns — 신뢰도 점수가 포함된 감지된 캔들 패턴

두 네임스페이스 모두 네임스페이스로 라우팅되는 memory_*를 통해 접근한다. 예약된 네임스페이스(pattern, claude-memories, default)를 가려서는 안 된다.

**라우팅 참고:*이 스킬들의 이전 버전은 네임스페이스 인수를 받는 agentdb_hierarchical- 및 agentdb_pattern-*를 사용했다. 해당 도구군은 계층/ReasoningBank를 기준으로 라우팅하며 네임스페이스 문자열을 무시한다. ADR-0001에서 네임스페이스가 적용된 읽기/쓰기에 memory_*를 사용하도록 수정했다.

검증

bash plugins/ruflo-market-data/scripts/smoke.sh
# Expected: "11 passed, 0 failed"

아키텍처 결정

관련 플러그인

  • ruflo-agentdb — 네임스페이스 규칙의 소유자이며 ADR-0001이 위반을 수정할 때 적용하는 라우팅 규칙을 정의한다
  • ruflo-neural-trader -- 시장 패턴을 전략 신호로 사용한다
  • ruflo-ruvector -- 패턴 유사도 검색을 위한 HNSW 인덱싱 엔진
  • ruflo-observability -- 데이터 피드 상태와 수집 지연 대시보드

라이선스

MIT

Mod로 사용하기

이 플러그인은 함수 훅 mod(ADR-445, hooks/register.ts)를 제공한다. 네트워크를 호출하거나 프로세스를 생성하거나 모델을 호출하지 않는다.

  • Guard(강화만 허용되며 기본 활성화): 키 또는 token이 들어 있는 market* 네임스페이스(memory_store, agentdb_pattern-store, agentdb_hierarchical-store, ruvllm_hnsw_add)에 대한 쓰기를 거부한다. 쿼리 문자열에 자격 증명이 있거나 user:pass@host 형식의 자격 증명을 포함한 feed URL도 거부한다. 다른 네임스페이스에는 영향을 주지 않는다. 거부할 때 비밀을 다시 표시하지 않는다.
  • /market-mod: status, recent, tools(이 플러그인의 어떤 도구가 연결되었는지), scan <text>(Guard가 거부할지)를 제공한다. 결과는 로컬에서 처리한다.
  • 상태 파일: .claude-flow/market-mod/status.json({version: 1, updatedMs, guard, calls, total, blocked, recent}; 카운터만 기록하고 도구 입력은 저장하지 않음)을 세션 시작 시와 이 플러그인의 도구를 호출할 때마다 기록한다.

옵션(userConfig): guard(on).

테스트: claude plugin validate plugins/ruflo-market-data, claude plugin test plugins/ruflo-market-data, bash plugins/ruflo-market-data/scripts/smoke.sh.

설치

먼저 작성자의 README에서 marketplace와 플러그인 이름을 확인하세요. 저장소 구조에 따라 명령어가 달라질 수 있습니다.

claude plugin marketplace add ruvnet/ruflo
claude plugin install ruflo-market-data
원문 / README

ruflo-market-data

Market data ingestion -- feed normalization, OHLCV vectorization, and HNSW-indexed pattern matching.

Overview

Ingests market data from REST APIs and WebSocket feeds, normalizes to OHLCV vectors with consistent scaling, and vectorizes candlestick patterns for HNSW similarity search. Detects single-candle (doji, hammer) and multi-candle (engulfing, morning star, head & shoulders) formations with reliability scoring.

Installation

claude --plugin-dir plugins/ruflo-market-data

Agents

| Agent | Model | Role | |-------|-------|------| | data-engineer | sonnet | Ingest market feeds, normalize OHLCV, vectorize candlestick patterns, HNSW-indexed pattern matching |

Skills

| Skill | Usage | Description | |-------|-------|-------------| | market-ingest | /market-ingest <symbol> [--source api] | Ingest and normalize market data into OHLCV vectors with HNSW indexing | | market-pattern | /market-pattern <symbol> [--period 1D] | Detect and classify candlestick patterns from ingested data |

Commands (5 subcommands)

market ingest <symbol> [--period 1D]    # Ingest and normalize OHLCV data
market patterns <symbol>                 # Detect candlestick patterns
market search <pattern-name>             # Search historical pattern occurrences
market history <symbol>                  # Show ingestion history and data coverage
market compare <sym1> <sym2>             # Compare pattern profiles between symbols

OHLCV Normalization

| Field | Normalization | |-------|--------------| | Open | Relative to previous close: (open - prev_close) / prev_close | | High | Relative to open: (high - open) / open | | Low | Relative to open: (low - open) / open | | Close | Relative to open: (close - open) / open | | Volume | Z-score: (vol - mean_vol) / std_vol |

Pattern Library

| Pattern | Type | Candles | Reliability | |---------|------|---------|-------------| | Doji | Reversal | 1 | Medium | | Hammer | Reversal | 1 | Medium-High | | Engulfing | Reversal | 2 | High | | Morning/Evening Star | Reversal | 3 | High | | Three White Soldiers | Continuation | 3 | High | | Head & Shoulders | Reversal | 5-7 | Very High | | Double Top/Bottom | Reversal | Variable | High |

Each pattern is encoded as a 64-dimension padded vector for HNSW indexing.

Compatibility

  • CLI: pinned to @claude-flow/cli v3.6 major+minor.
  • Verification: bash plugins/ruflo-market-data/scripts/smoke.sh is the contract.

Namespace coordination

This plugin owns two AgentDB namespaces (kebab-case, follows the convention from ruflo-agentdb ADR-0001 §"Namespace convention"):

  • market-data — normalized OHLCV vectors per symbol+date
  • market-patterns — detected candlestick patterns with reliability scores

Both accessed via memory_* (namespace-routed). Reserved namespaces (pattern, claude-memories, default) MUST NOT be shadowed.

Routing note: Earlier versions of these skills used agentdb_hierarchical-* and agentdb_pattern-* with namespace arguments — those tool families route by tier/ReasoningBank and ignore namespace strings. ADR-0001 fixed the skills to use memory_* for namespaced reads/writes.

Verification

bash plugins/ruflo-market-data/scripts/smoke.sh
# Expected: "11 passed, 0 failed"

Architecture Decisions

Related Plugins

  • ruflo-agentdb — namespace convention owner; defines the routing rules ADR-0001 fixes violations of
  • ruflo-neural-trader -- Consumes market patterns as strategy signals
  • ruflo-ruvector -- HNSW indexing engine for pattern similarity search
  • ruflo-observability -- Data feed health and ingestion latency dashboards

License

MIT

As a mod

This plugin ships a function-hook mod (ADR-445, hooks/register.ts). It makes no network call, spawns no process and makes no model call.

  • Guard (tighten-only, on by default): Refuses writes to a market* namespace (memory_store, agentdb_pattern-store, agentdb_hierarchical-store, ruvllm_hnsw_add) that hold a key or token, or a feed URL with a credential in its query string or as user:pass@host. Other namespaces are untouched. A refusal never echoes the secret.
  • /market-mod: status, recent, tools (which of this plugin's tools are connected) and scan <text> (would the guard refuse it). Answered locally.
  • Status file: .claude-flow/market-mod/status.json ({version: 1, updatedMs, guard, calls, total, blocked, recent}, counters only, never tool input), written at session start and after every call to this plugin's tools.

Options (userConfig): guard (on).

Test it: claude plugin validate plugins/ruflo-market-data, claude plugin test plugins/ruflo-market-data, bash plugins/ruflo-market-data/scripts/smoke.sh.

비슷한 프로젝트