Логотип Benchmark Selection For Strategy Evaluation

Benchmark Selection For Strategy Evaluation

Спільнота
HimanshuJ16
benchmark-selection-for-strategy-evaluation

Використовуйте, щоб вибрати індекс для оцінювання стратегії перед запуском будь-якого аналізу атрибуції. Порівнює кандидатні базові індекси за похибкою відстеження, бетою та R-квадратом, щоб портфель із переважанням технологічних акцій не отримав завищену оцінку порівняно із широким індексом або безризиковою ставкою.

Add to TypingMind

Огляд

ВидавецьHimanshuJ16
РепозиторійAlgo-Trading-Skills
Назва навичкиbenchmark-selection-for-strategy-evaluation
Зірки
50
Форки
7
Файли в пакеті
5
ЛіцензіяApache-2.0
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Файлів у комплекті: 5

    Скрипти, шаблони й довідкові матеріали, які модель може читати під час роботи. Файли доступні лише для читання й ніколи не виконуються.

  • Відкритий вихідний код

    Видавець на GitHub: HimanshuJ16. Перед установленням перегляньте вихідні файли навички.

Встановлення

Установіть навичку ШІ Benchmark Selection For Strategy Evaluation у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки на GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до розділу «Плагіни» → «Навички».
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/benchmark-selection-for-strategy-evaluation
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Додати навичку → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
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-квадратом, щоб портфель із переважанням технологічних акцій не отримав завищену оцінку порівняно із широким індексом або безризиковою ставкою.

Навіщо використовувати 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?

Зі скількома забажаєте. У TypingMind ви можете використовувати Benchmark Selection For Strategy Evaluation із будь-якою моделлю, яка підтримує навички, зокрема з GPT, Claude, Gemini, Grok, DeepSeek, Mistral чи Llama. Для цього ви використовуєте власні ключі API.

Чи безкоштовна навичка ШІ Benchmark Selection For Strategy Evaluation?

Так. На GitHub цю навичку публікує HimanshuJ16 за ліцензією Apache-2.0. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це набір інструкцій для повторного використання, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти, які вона може викликати, — код, який десь виконується й повертає результат. Натомість навичка ШІ дає моделі знання й пояснює порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі
Логотип openclaw

Apple Reminders

openclaw
ОрганізаціяПопулярне

Переглядайте, додавайте, редагуйте, позначайте як виконані або видаляйте нагадування Apple Reminders і списки нагадувань за допомогою remindctl.

82.2K
391K
Інструкції
Відкрити
Логотип openclaw

Clawhub

openclaw
ОрганізаціяПопулярне

Шукайте навички на ClawHub, якщо потрібної функції ще немає; встановлюйте, перевіряйте, оновлюйте, видаляйте, публікуйте або синхронізуйте навички.

82.2K
391K
Інструкції
Відкрити
Логотип obra

Diagnosing Superpowers

obra
СпільнотаПопулярне

Використовуйте, якщо сесія superpowers пішла не так і ваш партнер-людина хоче знати причину: повторення роботи, ігнорування планів, помилки, незадовільні результати, навичка, яка не спрацювала, «це зайняло забагато часу», «чому це так…»

26.3K
293.5K
Файлів: 19
Відкрити
Логотип obra

Brainstorming

obra
СпільнотаПопулярне

Ви МАЄТЕ використовувати це перед будь-якою творчою роботою — створенням функцій, компонентів, додаванням функціональності чи зміною поведінки. Перед реалізацією допомагає з’ясувати наміри користувача, вимоги та дизайн.

25.8K
288.1K
Файлів: 7
Відкрити

Створіть власний робочий простір зі ШІ вже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇