شعار Benchmark Selection For Strategy Evaluation

Benchmark Selection For Strategy Evaluation

المجتمع
HimanshuJ16
benchmark-selection-for-strategy-evaluation

استخدمه لاختيار المؤشر الذي ستُقيّم الاستراتيجية مقارنةً به، قبل إجراء أي تحليل للإسناد؛ فهو يفحص المؤشرات المرجعية المحتملة وفق خطأ التتبع وبيتا وR-squared، حتى لا يبدو أداء محفظة تتركز في قطاع التقنية أفضل مما هو عليه عند مقارنتها بمؤشر عام أو بسعر فائدة نقدي.

Add to TypingMind

نظرة عامة

الناشرHimanshuJ16
المستودعAlgo-Trading-Skills
اسم المهارةbenchmark-selection-for-strategy-evaluation
النجوم
50
التفريعات
7
الملفات المرفقة
5
الترخيصApache-2.0
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 5

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها HimanshuJ16 على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Benchmark Selection For Strategy Evaluation في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/benchmark-selection-for-strategy-evaluation
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/HimanshuJ16/Algo-Trading-Skills.git /tmp/Algo-Trading-Skills
mkdir -p .claude/skills
cp -r /tmp/Algo-Trading-Skills/skills/benchmark-selection-for-strategy-evaluation .claude/skills/benchmark-selection-for-strategy-evaluation
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Benchmark Selection For Strategy Evaluation في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Benchmark Selection For Strategy Evaluation تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Benchmark Selection For Strategy Evaluation بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

Benchmark Selection for Strategy Evaluation

When to Use

Use this skill when evaluating a new strategy. Selecting the right benchmark is crucial; if you run a tech-heavy long-only strategy, benchmarking it against a risk-free rate or a generic broad index will make it look artificially good during tech bull markets.

BenchmarkSelector screens candidate benchmarks by how closely each one replicates the strategy's return stream, reporting tracking error, information ratio, beta, and R².

When NOT to Use

  • To compute alpha. This screen measures active return (strategy − benchmark) with no beta adjustment. A strategy with beta 1.5 to its benchmark will show active return that is mostly leveraged beta, not skill. For a beta-adjusted attribution use strategy-performance-attribution-vs-market-beta.
  • To pick a benchmark after seeing results. Ranking candidates post hoc and keeping the flattering one is benchmark selection bias. The screen is for confirming a pre-specified shortlist.
  • As a substitute for benchmark validity. Investability, unambiguity, measurability, and "specified in advance" are properties of the benchmark's construction that no return-series statistic can observe.
  • On a handful of observations. With two data points correlation is ±1 by construction. Short samples produce confident-looking numbers with no content.

Prerequisites

  • Time series of strategy returns (at least 2 observations; realistically far more).
  • Time series of candidate benchmark returns (e.g., SPY, QQQ, sector ETFs, risk-free rate), total return and date-aligned to the strategy.
  • The return frequency, so periods_per_year can be set correctly.

Workflow

  1. Fix the candidate list first. Write down the candidates and the selection rule before running anything — otherwise the screen becomes a search for the most flattering comparator.
  2. Confirm total-return series. A price-only index understates the benchmark by roughly its dividend yield per year, which the strategy then "outperforms" for free.
  3. Align the series. Equal length is enforced; a one-day shift is not detectable by the tool and silently contaminates every statistic. Align on an explicit date index upstream.
  4. Set the conventions. periods_per_year must match the data frequency — leaving a monthly series at the 252 default overstates tracking error by √21 ≈ 4.6x. ddof=1 (sample) is the default; use ddof=0 if your reporting standard requires the population convention.
  5. Run evaluate_benchmarks(strategy_returns). Results are sorted by ascending tracking error — the closest-replicating benchmark first.
  6. Read beta before accepting the top row. If the best-fitting candidate has beta far from 1.0, it has the right exposure at the wrong scale; if r_squared is low, no candidate explains the strategy and you may need a multi-factor or absolute-return comparator.
  7. Check for nan and ±inf before quoting anything. nan correlation means the benchmark has zero variance (a flat risk-free series) — correlation is undefined there, not zero. ±inf information ratio means zero active risk with non-zero active return.
  8. Confirm the qualitative properties, then freeze. Verify the winner is investable and unambiguous, record the benchmark with its periods_per_year/ddof conventions and date range, and do not change it mid-evaluation.

Full procedure: see references/workflows.md. Standards reference: see references/standards.md. Printable pre-flight checklist: see assets/checklist.md.

Common Pitfalls

  • Defaulting to SPY: Using SPY as a benchmark for everything (e.g., a bond strategy, a short-only strategy, a crypto strategy).
  • Ignoring Risk-Free Rate: For market-neutral absolute return strategies, the risk-free rate or a very low-volatility benchmark is appropriate. If the risk-free series wins the screen for a market-neutral strategy, that is the correct answer, not a defect.
  • Ranking by correlation: Correlation is scale-invariant, so a 3x-levered clone of the strategy scores a perfect 1.00 while producing roughly 12x the tracking error of a properly scaled benchmark. Rank by tracking error and use beta to detect scale mismatch.
  • Calling active return alpha: strategy − benchmark is active return. Alpha requires adjusting for beta; a high-beta strategy in a rising market shows large active return and zero skill.
  • Price-only benchmark series: Comparing a dividend-receiving strategy against a price index hands it the dividend yield as free outperformance every year.
  • Wrong annualisation factor: Tracking error and the information ratio both scale with √periods_per_year. A monthly series scored at 252 produces numbers that are wrong by a factor of 4.6 in opposite directions.
  • Treating a nan correlation as zero: A flat risk-free benchmark has no variance, so correlation is undefined. Reporting 0.0 there makes the benchmark look deliberately uncorrelated when nothing was measured at all.
  • Benchmark shopping: Re-running the screen after a bad quarter and switching to whichever benchmark now looks better violates "specified in advance" and invalidates the entire comparison.

Verification

  • Verify that Information Ratio correctly rewards excess return relative to tracking error.
  • Check that a benchmark matching the strategy in both shape and scale yields lower tracking error than one matching only in shape. High correlation alone does not imply low tracking error: confirm the tool does not recommend a 3x-levered clone of the strategy, which correlates at exactly 1.00 and is a terrible benchmark (test_leveraged_clone_is_not_recommended).
  • Confirm a flat risk-free benchmark yields nan correlation rather than 0.0.
  • Confirm tracking error matches an independently computed sample standard deviation of active returns, annualised.
  • Run python -m unittest discover -s skills/benchmark-selection-for-strategy-evaluation/scripts and confirm a 100% pass rate.

Related Skills

  • backtest-reporting-standardized-tearsheet
  • benchmark-relative-performance-attribution
  • strategy-performance-attribution-vs-market-beta
  • risk-adjusted-performance-attribution-per-strategy

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة ما دامت المهارة محمّلة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Benchmark Selection For Strategy Evaluation؟

استخدمه لاختيار المؤشر الذي ستُقيّم الاستراتيجية مقارنةً به، قبل إجراء أي تحليل للإسناد؛ فهو يفحص المؤشرات المرجعية المحتملة وفق خطأ التتبع وبيتا وR-squared، حتى لا يبدو أداء محفظة تتركز في قطاع التقنية أفضل مما هو عليه عند مقارنتها بمؤشر عام أو بسعر فائدة نقدي.

لماذا تستخدم Benchmark Selection For Strategy Evaluation على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Benchmark Selection For Strategy Evaluation عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Benchmark Selection For Strategy Evaluation في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/benchmark-selection-for-strategy-evaluation. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Benchmark Selection For Strategy Evaluation؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Benchmark Selection For Strategy Evaluation؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Benchmark Selection For Strategy Evaluation معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Benchmark Selection For Strategy Evaluation مجانية؟

نعم. نشرها HimanshuJ16 على GitHub بموجب ترخيص Apache-2.0. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇