मुख्य सामग्री पर जाएँ
Skillpedia
एनालिसिस और स्प्रेडशीट37k · #7558

strategy-generate

यह क्या करती है

यह स्किल एक सादे ट्रेडिंग विचार को काम करने वाली रणनीति में बदलती है और बीते डेटा पर टेस्ट करती है। यह उन ट्रेडरों के लिए है जो पूरा बैकटेस्ट इंजन लिखे बिना विचार आज़माना चाहते हैं।

कब इस्तेमाल करें

  • ✓जब आप एक ट्रेडिंग विचार का विवरण दें और उसे टेस्ट करने योग्य रणनीति में बदलवाना चाहें।
  • ✓जब आप मौजूदा रणनीति बदलना और देखना चाहें कि नतीजे कैसे बदलते हैं।
  • ✓जब आप साफ़ मेट्रिक्स वाला बैकटेस्ट और नतीजे की ईमानदार समीक्षा चाहें।

Skill का लिंक

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

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/HKUDS/Vibe-Trading/blob/main/agent/src/skills/strategy-generate/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“ऐसी रणनीति बनाइए जो 20-दिन के औसत के 60-दिन के औसत से ऊपर जाने पर खरीदे, और उसे Apple पर बैकटेस्ट कीजिए।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

यह एक कॉन्फ़िग फ़ाइल और सिग्नल स्क्रिप्ट लिखती है, कोड में गलतियाँ जाँचती है, और अंतर्निहित बैकटेस्ट चलाती है। फिर वह मेट्रिक्स की समीक्षा करती है और नतीजे सीधे बताती है, खराब नतीजे भी।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Workflow

  1. Requirements parsing: parse user intent, extract instrument codes, time range, and strategy logic, then write config.json
  2. Strategy design: think through the 5 questions of data / signal / position sizing / backtest / validation
  3. Strategy coding: write code/signal_engine.py (following the SignalEngine contract)
  4. Syntax check: bash("python -c \"import ast; ast.parse(open('code/signal_engine.py').read()); print('OK')\"")
  5. Run backtest: call the backtest tool (built into the engine; no need to write run_backtest.py)
  6. Evaluate results: use the backtest tool's structured metrics, validation and artifact summary. Read artifacts/metrics.csv or targeted rows with read_run_artifact only when the requested evidence is missing from that summary. Judge by the review criteria and report failures honestly.
  7. Fix implementation errors: repair code/contract errors and rerun to verify. Poor returns in a correctly implemented strategy are a valid result: report them and stop. Change the strategy or test additional candidates only when the user requested optimization or comparison, within their specified scope. Deeper attribution and robustness research are performed when requested, not added to every backtest.

You only need to write signal_engine.py and config.json. The backtest tool automatically handles data loading and backtest execution.

Adapting a registered strategy

  1. Read get_strategy_evidence(strategy_id="sdm:...") for the parent's description and computed regime definitions. A stale, disabled, decayed or inadequately evidenced parent cannot be adapted.
  2. Call adapt_strategy(strategy_id=..., name=..., universe=..., config=...) with explicit codes and date window. Only name, universe and optional position sizing may change. Signal definition, entry and exit rules remain the parent's. Missing inputs require a question, never a fabricated metric or threshold.
  3. Use the returned assigned run_dir and seeded config.json. Generate the child's code/signal_engine.py from its description using the contract below; never copy a parent run's metrics. Preserve the bound codes, dates and strategy_adaptation metadata. Record model provenance through the normal write tool.
  4. Call backtest(run_dir=...), inspect its artifacts, then refresh_strategy_evidence(runs=[{"strategy_id": "sdm:<child>", "run_dir": "<assigned>"}], scope="strategies"). This updates only successful named strategies and preserves the parent's evidence. Refresh refuses a different run or changed config/code/results against the run card.
  5. Read the child's evidence and report its actual quality, cost and decay warnings. A successful backtest is not adequate regime evidence or independent approval. An unchanged mathematical signal can legitimately generate identical code for another universe; hashes establish provenance, not semantic correctness of generated Python.

Requirements Parsing

Extract the following from the user's description:

  • Instrument codes: process them according to the normalization rules below
  • Time range: if the user does not specify dates, default to 10 years back from today (for example, if today is 2026-03-18, then start_date=2016-03-18, end_date=2026-03-18)
  • Indicator warm-up: a long lookback (MA200, a 252-day z-score) needs bars from before the requested period. Move start_date back to load them and declare the boundary with warmup_bars — the requested period is what gets graded, and undeclared warm-up bars are graded too. Silently backdating start_date by a year turns a 10-year backtest into an 11-year one that still calls itself 10 years: the extra year's trades, CAGR and benchmark all enter the report, the run succeeds, and the numbers look internally consistent
  • Strategy logic: entry / exit conditions and indicator parameters

If critical information is missing, you must ask the user instead of guessing:

  • Instrument not specified → ask which instrument they want to backtest (offer several popular suggestions)
  • Strategy description is vague (for example, "help me build a strategy") → provide 2-3 strategy directions for the user to choose from
  • Mixed markets but not clearly specified → confirm the data source

Write config.json first, then write code. config.json must be placed in the root of run_dir.

Strategy Design

Before writing code, think through these 5 questions:

  1. **Data
अक्सर पूछे जाने वाले सवाल

क्या मुझे बैकटेस्ट कोड लिखना होगा?

नहीं। स्किल सिर्फ़ सिग्नल का तर्क और कॉन्फ़िग लिखती है, बाकी काम बैकटेस्ट टूल करता है।

अगर रणनीति घाटा दे तो?

स्किल इसे ईमानदारी से बताती है, क्योंकि सही तरह बनी रणनीति का खराब रिटर्न भी एक वैध नतीजा है।

क्या यह मेरी रणनीति को ऑप्टिमाइज़ कर सकती है?

हाँ, पर सिर्फ़ तब जब आप ऑप्टिमाइज़ेशन या तुलना माँगें, और आपके तय दायरे में।

जानकारी

लेखक का मूल विवरण

Create, modify, and optimize quantitative trading strategies, then backtest and evaluate them.

repo: HKUDS/Vibe-Trading

लोकप्रियता

GitHub स्टार
37k
रैंकिंग में स्थान
#7558
लाइसेंस
MIT
अपडेट की गई
1/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

vibe-trading

37k

यह आपके एजेंट को वित्त शोध का पूरा टूलकिट देती है, जिसमें बैकटेस्ट, फ़ैक्टर एनालिसिस, ऑप्शन प्राइसिंग और कई बाज़ारों का डेटा शामिल है।

डेटाएनालिसिस और स्प्रेडशीट

adr-hshare

37k

यह आपके एजेंट को दिखाती है कि कई बाज़ारों में लिस्टेड एक चीनी कंपनी के भाव की तुलना कैसे करें, जैसे अमेरिकी ADR और हॉन्गकॉन्ग शेयर।

डेटाएनालिसिस और स्प्रेडशीट

akshare

37k

यह आपके एजेंट को चीनी और वैश्विक शेयरों, फ़्यूचर्स, फ़ॉरेक्स और आर्थिक संकेतकों का मुफ़्त बाज़ार डेटा लेने देती है, बिना API key के।

डेटाएनालिसिस और स्प्रेडशीट

alpha-zoo

37k

यह आपके एजेंट को बने-बनाए स्टॉक फ़ैक्टरों की लाइब्रेरी देखने और चुने हुए बाज़ार पर उनके पूरे समूह के रिटर्न की भविष्यवाणी की क्षमता जाँचने देती है।

डेटाएनालिसिस और स्प्रेडशीट

मिलती-जुलती skills