Logo de Backtest Audit Trail For Regulatory Review

Backtest Audit Trail For Regulatory Review

Comunidade
HimanshuJ16
backtest-audit-trail-for-regulatory-review

Use quando um resultado de backtest precisar de um registro duradouro e exato do que o produziu: SHA do commit do git, checksums dos dados de cada arquivo, manifesto de hiperparâmetros e ambiente, assinados com HMAC para garantir a integridade contra terceiros.

Visão geral

Publicado porHimanshuJ16
RepositórioAlgo-Trading-Skills
Nome da habilidadebacktest-audit-trail-for-regulatory-review
Estrelas
50
Forks
7
Arquivos incluídos
5
LicençaApache-2.0
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    As habilidades de IA são escritas em Markdown simples, não em código específico de um provedor. Por isso, funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Arquivos incluídos: 5

    Scripts, templates e referências que o modelo pode ler enquanto trabalha. Os arquivos são somente para leitura e nunca são executados.

  • Código aberto

    Publicada por HimanshuJ16 no GitHub. Leia os arquivos da habilidade antes de instalá-la.

Instalação

Instale a habilidade de IA Backtest Audit Trail For Regulatory Review no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL abaixo, que aponta para a pasta da habilidade, e confirme.
    https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/backtest-audit-trail-for-regulatory-review
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Adicionar habilidade → Via URL do GitHub. Depois, cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

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/backtest-audit-trail-for-regulatory-review .claude/skills/backtest-audit-trail-for-regulatory-review
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Backtest Audit Trail For Regulatory Review em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Backtest Audit Trail For Regulatory Review automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Backtest Audit Trail For Regulatory Review não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

When to Use

Invoke this skill when performing strategy validation prior to live deployment or institutional client presentation, and you need a durable record of exactly what code, data, and parameters produced a set of backtested numbers. It captures git commit SHA, per-file input data checksums, hyperparameters, performance metrics, and execution environment, then authenticates the record with HMAC-SHA256 so later modification by anyone without the signing key is detectable.

When NOT to Use

  • As proof to a regulator that your firm did not alter its own results. HMAC is symmetric: whoever can sign can also forge. This gives integrity against outsiders, not non-repudiation against the issuer. See the trust-boundary note below.
  • As a substitute for compliant recordkeeping storage. Under 17 CFR 240.17a-4(f) the durability obligation is met by the storage system (WORM or the audit-trail alternative), not by a hash embedded in a file.
  • For live order/trade event capture. Order and execution event reporting is a different obligation with different systems — see the CAT and RTS 25 notes in references/standards.md.
  • When you have not yet eliminated lookahead bias. An impeccably signed manifest for a biased backtest is a precisely documented wrong answer.

Trust Boundary — read before relying on this

An unkeyed hash over a manifest is not tamper-evidence. Anyone can edit the file, recompute the hash, and every check passes. Earlier versions of this skill made exactly that mistake. This version emits two separate values:

ValueWhat it provesWhat it does not prove
content_digest_sha256The bytes were not corrupted in transit or at rest. Anyone can recompute it.Nothing about authenticity.
manifest_hmac_sha256The record was produced by a holder of the signing key and has not been altered since.Nothing against the key holder themselves.

For assurance against the issuing firm, anchor trust outside it: asymmetric signatures with the private key held independently, an RFC 3161 timestamp authority, or third-party-administered write-once storage.

Prerequisites

  • Git repository with clean working tree — a commit SHA taken against uncommitted changes documents code that never existed.
  • Input data files accessible for checksumming.
  • Strategy parameter configuration (all tunable hyperparameters).
  • A signing key of ≥32 random bytes from a secrets manager or environment variable — never committed to the repository and never stored alongside the manifests it authenticates.
  • Standard library only: hashlib, hmac, json, platform.

Workflow

  1. Capture Lineage Metadata: Record git commit SHA (git rev-parse HEAD), UTC timestamp as integer nanoseconds, OS/architecture, and Python version. Confirm the working tree is clean first — if git status --porcelain is non-empty, stop; the SHA does not describe the code that ran.
  2. Compute Per-File Data Checksums: Stream each input file to compute SHA256 individually. Never hash a concatenation of files: a single aggregate digest tells you something changed but not which file, which is exactly what an auditor asks.
  3. Assemble Manifest: Organization, strategy ID, git SHA, per-file checksum map, all hyperparameters, performance metrics, execution metadata, data sources, notes. Any field left out of the signed payload is a field an attacker can change undetected — including the key ID.
  4. Digest and Authenticate: Serialize as canonical JSON (sorted keys, no whitespace, allow_nan=False), then compute both the unkeyed digest and the keyed HMAC. Reject non-finite metrics rather than serializing them — Python writes bare NaN, which is invalid JSON and unparseable by strict verifiers in other languages.
  5. Verify on Load: Check the HMAC, not just the digest. A manifest whose digest matches but whose HMAC does not has been re-digested by someone without the key — treat it as forged, not as corrupted.
  6. Store & Archive: Write to storage whose retention controls match your regulatory status. If you are a registered broker-dealer, 17 CFR 240.17a-4(f) requires either WORM or an audit-trail system that can recreate a modified or deleted record. Determine the applicable retention tier from the record's classification under 17a-3 — do not assume six years applies (see references/standards.md).

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

Common Pitfalls

  • Calling an Unkeyed Hash a Signature: A plain SHA256 embedded in the record it describes is a checksum. Recomputing it after editing takes three lines. Use a keyed MAC or an asymmetric signature.
  • Testing Tamper Detection Without Re-Signing: Mutating a field and asserting verification fails only proves the digest covers that field. The real adversary recomputes the digest. A tamper test that never re-signs tests nothing about forgery.
  • Storing the Signing Key With the Manifests: A key in the same bucket, repo, or backup set as the records it authenticates provides no protection against anyone who can reach the records.
  • Untracked Code Modifications: Running a backtest against a dirty working tree — the SHA is meaningless for audit.
  • Single Aggregate Checksum: Hashing concatenated data instead of per-file checksums masks which input changed.
  • Non-Canonical JSON Serialization: Unsorted keys, incidental whitespace, or NaN/Infinity values break verification across implementations.
  • Aliasing Caller State: Holding a reference to the caller's parameter dict rather than a copy means the "immutable" manifest silently changes after signing.
  • Float Formatting Across Languages: Metrics stored as JSON floats may re-serialize differently in another runtime and break byte-level canonical comparison. Where cross-toolchain verification matters, encode metrics as decimal strings.
  • Assuming a Retention Period: 17a-4 sets different tiers for different record classes and applies to registered broker-dealers. Asserting "six years" for a research artifact is unsupported.

Verification

  • Run python -m unittest discover -s skills/backtest-audit-trail-for-regulatory-review/scripts — 100% pass rate (32 tests).
  • Forgery test (the one that matters): modify a metric, recompute content_digest_sha256, then verify. The digest will match and verification must still fail on the HMAC.
  • Confirm a manifest signed with a different key, or a different signing_key_id, fails verification.
  • Confirm mutating the caller's parameter dict after build_manifest does not change the manifest.
  • Confirm non-finite metrics are rejected at build time rather than serialized.

Related Skills

  • backtest-determinism-and-reproducibility — ensures bit-identical runs; this skill records what was run
  • paper-to-live-promotion-checklist — final gate before live capital; requires a valid audit trail
  • lookahead-bias-elimination — must pass before an audit trail is meaningful
  • walk-forward-validation-setup — validation methodology whose results belong in the manifest
  • centralized-secrets-management-vault-integration — where the signing key should live
  • record-retention-periods-by-jurisdiction — determining the applicable retention tier

Arquivos incluídos

O modelo lê esses arquivos sob demanda enquanto a habilidade está carregada. Eles são disponibilizados para leitura e nunca são executados.

Perguntas frequentes

O que a habilidade de IA Backtest Audit Trail For Regulatory Review faz?

Use quando um resultado de backtest precisar de um registro duradouro e exato do que o produziu: SHA do commit do git, checksums dos dados de cada arquivo, manifesto de hiperparâmetros e ambiente, assinados com HMAC para garantir a integridade contra terceiros.

Por que usar Backtest Audit Trail For Regulatory Review no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. A habilidade Backtest Audit Trail For Regulatory Review é escrita em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. No TypingMind, você usa suas próprias chaves de API e paga diretamente aos provedores, em vez de pagar uma assinatura por licença de usuário. Suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Backtest Audit Trail For Regulatory Review no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/backtest-audit-trail-for-regulatory-review. O TypingMind lê o arquivo SKILL.md, reúne os arquivos da habilidade e a instala para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Backtest Audit Trail For Regulatory Review?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Backtest Audit Trail For Regulatory Review?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Backtest Audit Trail For Regulatory Review com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Backtest Audit Trail For Regulatory Review é gratuita?

Sim. A habilidade é publicada no GitHub por HimanshuJ16 sob a licença Apache-2.0. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, templates ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas que ele pode acionar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA dá ao modelo o conhecimento e as orientações de que ele precisa: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver lista completa

Crie seu próprio espaço de trabalho com IA agora

Inscreva-se na nossa newsletter para receber avisos sobre novos recursos e futuros sorteios 👇