/algo-trading-skills:demo-account-realism-gap-assessmentfrom algo-trading-skills
Quantifies the gap between demo/paper trading execution quality and live fills, measuring latency, slippage, queue depth, and partial-fill divergence to derive a Sharpe ratio haircut before deploying strategies to live capital.
Ships in algo-trading-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Invoke this skill prior to deploying a paper-tested trading strategy into live capital. Broker paper/demo accounts systematically inflate performance metrics by granting instant fills, ignoring limit order queue depth, suppressing market impact, and under-reporting slippage. This skill records matched execution logs from demo and live trades to quantify the execution realism gap and apply Sharpe ratio haircut factors.
is_sample_sufficient=False below min_samples and you should not size capital on a flagged result.warnings rather than silently scoring.references/standards.md.LIVE.Record and Validate Execution Logs:
filled_qty outside [0, requested_qty], and a fill_time preceding submission_time all raise ValueError. Each of these previously produced a higher realism score from worse data, which is the dangerous direction for a control that gates capital.Compute Latency & Slippage Discrepancy:
Calculate Realism Score ($R \in [0, 1]$):
references/standards.md.Apply the Sharpe Discount (heuristic):
unadjusted_demo_sharpe is a required argument. There is no defensible default: a fabricated input yields a fabricated allocation recommendation.Full procedure: see
references/workflows.md. Standards reference: seereferences/standards.md. Printable pre-flight checklist: seeassets/checklist.md.
NaN fill silently produced the best possible sub-score in a naive implementation. Reject degenerate records; never let missing data read as realism.is_sample_sufficient before acting on the number.environment label on each record is validated against the list it is supplied in.fill_price better than arrival_price) lowers $R$ rather than raising it.unadjusted_demo_sharpe is returned unchanged, with a warning.ValueError.python -m unittest discover -s skills/demo-account-realism-gap-assessment/scripts and confirm 100% pass rate.sandbox-vs-production-endpoint-driftpaper-to-live-promotion-checklistexecution-realistic-simulationWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub himanshuj16/algo-trading-skills --plugin algo-trading-broker-integration36 skills in this plugin
/alpaca-paper-live-key-separationUse when a bot connects to the Alpaca Trading API and must never cross paper keys with the live endpoint; pins the base URL per environment, checks the key prefix, probes /v2/account and requires an explicit ALLOW_LIVE_TRADING flag./api-key-least-privilege-audit-toolUse before deploying a live bot, to audit existing broker API keys for scopes they do not need. Flags withdrawal, transfer and admin rights that turn a leaked execution key into theft./broker-account-margin-call-handlingUse when a bot trades a Reg T, portfolio or futures margin account and must act before the broker liquidates: tiered maintenance-margin warnings cross-checked against broker excess liquidity, initial-margin order gating and liquidity-aware de-leveraging.Other plugins' skills for the same job