Logo di Backtest Audit Trail For Regulatory Review

Backtest Audit Trail For Regulatory Review

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

Usa questa skill quando vuoi conservare una registrazione duratura di tutto ciò che ha prodotto un risultato di backtest: SHA del commit git, checksum dei dati per ciascun file, manifest degli iperparametri e ambiente, firmati con HMAC per garantirne l'integrità contro soggetti esterni.

Panoramica

Pubblicato daHimanshuJ16
RepositoryAlgo-Trading-Skills
Nome della skillbacktest-audit-trail-for-regulatory-review
Stelle
50
Fork
7
File inclusi
5
LicenzaApache-2.0
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • File inclusi: 5

    Script, template e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da HimanshuJ16 su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Backtest Audit Trail For Regulatory Review in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/backtest-audit-trail-for-regulatory-review
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'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
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Backtest Audit Trail For Regulatory Review in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Backtest Audit Trail For Regulatory Review non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Backtest Audit Trail For Regulatory Review non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello 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

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA Backtest Audit Trail For Regulatory Review?

Usa questa skill quando vuoi conservare una registrazione duratura di tutto ciò che ha prodotto un risultato di backtest: SHA del commit git, checksum dei dati per ciascun file, manifest degli iperparametri e ambiente, firmati con HMAC per garantirne l'integrità contro soggetti esterni.

Perché usare Backtest Audit Trail For Regulatory Review su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Backtest Audit Trail For Regulatory Review è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Backtest Audit Trail For Regulatory Review in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/backtest-audit-trail-for-regulatory-review. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Backtest Audit Trail For Regulatory Review?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Backtest Audit Trail For Regulatory Review?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Backtest Audit Trail For Regulatory Review: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Backtest Audit Trail For Regulatory Review è gratuita?

Sì. È pubblicata su GitHub da HimanshuJ16 con licenza Apache-2.0. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇