본문으로 건너뛰기
cccskills
무료GitHub에 공개

Strategy Skill

Generates and analyzes trading strategies from a structured config. Produces runnable JS + portfolio analysis.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md5.8 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Strategy Skill

Purpose

Take a structured strategy configuration — entry/exit conditions, TP/SL, drawdown limits, seed capital — and produce a runnable JavaScript strategy script that returns {trades, equity}. After the script is backtested, the same skill can analyze the results and suggest concrete improvements.

This skill is the counterpart to the Pattern Skill: instead of finding historical patterns, it trades them (or any other hypothesis).

When to use this skill

Vibe Trade should dispatch to the Strategy Skill when the user:

  • Wants to build a new strategy from scratch — activate chatbox.card.strategy_builder to show the structured form in the chat
  • Has submitted the Strategy Builder form — generate the JS from context.strategy_config
  • Asks to analyze backtest results — use context.analyze_results plus the strategy config to produce an assessment + suggestions
  • Wants to iterate on an existing strategy (tweak TP/SL, change the entry rule) — regenerate from the updated config

Instructions

  1. If no strategy_config is in context, show the structured form:

    • Emit chatbox.card.strategy_builder to inject the form into the chat
    • Respond with a brief prompt like "Fill in the fields and I'll generate a runnable strategy for you."
  2. If strategy_config is present and mode = "generate" (default):

    • Generate a JS strategy script that:
      • Defines every indicator helper it uses (don't assume sma() exists)
      • Handles edge cases (bounds check, initial lookback period)
      • Tracks maxAdverseExcursion / maxFavorableExcursion per trade
      • Pushes to the equity array on every bar (not just on trade events)
      • Respects the max drawdown limit
    • Emit script_editor.load with the full script
    • Emit bottom_panel.activate_tab → portfolio
  3. If mode = "analyze" (backtest results in context.analyze_results):

    • Produce a 2–3 sentence overall assessment (profitability + risk)
    • Call out specific strengths and weaknesses in the metrics
    • Return 3–5 concrete improvement suggestions as data.suggestions
    • Do NOT regenerate the script — only analysis in this mode
  4. Never touch the script generation without a config. Free-form strategy chat (without a structured config) should be handled as a general chat fallback, not by this skill.

Inputs

KeyTypeMeaning
context.mode"generate" | "analyze"Which operation to run (default: generate)
context.strategy_configobjectFull strategy config from the form
context.analyze_resultsobjectBacktest metrics (analyze mode only)

strategy_config shape:

{
  entryCondition: string,
  exitCondition: string,
  takeProfit: { type: "percentage" | "absolute", value: number },
  stopLoss: { type: "percentage" | "absolute", value: number },
  maxDrawdown: number,    // percent
  seedAmount: number,     // USD
  specialInstructions: string
}

Outputs

Generate mode:

  • reply — short confirmation ("Strategy script generated.")
  • script — JavaScript strategy returning {trades, equity}
  • script_type — "strategy"
  • data.config — echoes the config (for persistence)
  • tool_calls — load + activate portfolio tab

Analyze mode:

  • reply — 2–3 sentence assessment
  • data.suggestions — 3–5 improvement suggestions
  • tool_calls — none (analyze is read-only)

Tools used

ToolWhenPayload
chatbox.card.strategy_builderUser wants to build a strategy but no config yet—
script_editor.loadStrategy generatedThe JS source
script_editor.runUser asks to backtest immediately—
bottom_panel.activate_tabAfter generating"portfolio"
bottom_panel.set_dataPush analysis data into a tab{target, data}
chart.draw_markersVisualize entry/exit points on the chartMarker[]
notify.toastStatus updates ("Backtest complete: 42 trades"){level, message}

Examples

Generate Config: Entry = SMA(20) > SMA(50), Exit = SMA(20) < SMA(50), TP = 5%, SL = 2%, Max DD = 20%, Seed = $10,000.

→ Returns a strategy script with inline sma() helper, golden-cross entry logic, per-trade PnL + MAE/MFE tracking, equity-curve pushes on every bar. Loads into the editor; bottom panel switches to Portfolio.

Analyze Metrics: 42 trades, 38% win rate, 1.1 profit factor, -18% max drawdown.

→ "Marginal profitability, asymmetric losses are hurting overall returns." Suggestions: tighten stop to 1.5%, add an ATR volatility filter, require ADX > 25 for trend regime, etc.

Underlying implementation

Wired through core/agents/processors.py::_strategy_processor, which calls core/agents/strategy_agent.py::StrategyAgent.generate_from_config or .analyze_results depending on context.mode. The agent owns STRATEGY_GENERATE_PROMPT and STRATEGY_ANALYSIS_PROMPT.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Fetch historical OHLC chart data from yfinance (stocks) or ccxt (crypto) and load it onto the chart.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

spyderweb47/Vibe-Trade162026년 4월 22일 업데이트

Research historical news events that moved (or are moving) an asset's price and plot them as data points directly on the chart. Click a marker in the Historic News tab to zoom the chart to that event and read the article. Useful for identifying the fundamental drivers behind price action — earnings, regulation, product launches, macro shocks, geopolitical events.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

spyderweb47/Vibe-Trade162026년 4월 22일 업데이트

One-sentence description of what this skill does. Shown as a tooltip on the chip.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

spyderweb47/Vibe-Trade162026년 4월 22일 업데이트

Detects chart patterns in OHLC data from natural-language hypotheses or visual chart selections.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

spyderweb47/Vibe-Trade162026년 4월 22일 업데이트

Runs a team of 50 LLM personas through a 30-round structured debate to predict market direction. Uses the Canvas Agent Swarm Service — the same shared infrastructure other skills use for smaller agent teams. Output is an influence-weighted consensus direction + trade recommendation with a transparent record of every argument, research query, and cross-examination.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

spyderweb47/Vibe-Trade162026년 4월 22일 업데이트

spyderweb47의 스킬 모두 보기

이 스킬의 문제 신고