paper-loop

A command that runs one iteration of the MEICAgent’s parallel-shadow paper-trading loop. Paper trading simulates trades without using the live account.

In plain words
What is it for?
Use it to fetch market indicators, process open simulated option trades, apply exits and settlement rules, and evaluate new entries for each configured symbol and risk profile.
Why use it?
It lets you perform a single test or maintenance pass while keeping simulated records separate from live-trading data.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/joncovington/meicagent/paper-loop
Clone the repo
git clone --depth 1 https://github.com/joncovington/MEICAgent

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 608 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00608
Opus 5 $0.00000 $0.00304
Sonnet 5 $0.00000 $0.00122
Haiku 4.5 $0.00000 $0.00061

Measured 2d ago against content hash 8039d979545f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

paper-loop scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/paper-loop.md · 31 lines

How it starts

The opening of the file, as written. The whole thing — 31 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Run one iteration of the MEICAgent parallel-shadow paper-trading loop.

As of the standalone runner, the paper loop is implemented in code (src/paper_loop.py), not agent orchestration — this keeps a single source of truth for the iteration logic. Prefer the unattended daemon (/paper-start) for a full session; use this skill for a single manual iteration (e.g. a one-off force-close pass, or a quick check).

Run one iteration

python src/paper_loop.py --once

This runs, for every symbol in config.json's symbols, one full pass: fetch the live underlying price + IV rank, the shared VIX / VIX1D (→ ratio, → VIX-banded short delta), and GEX; build wing-width candidates from wing_widths_by_symbol; then hand the snapshot to paper.process_symbol, which marks/exits every open paper IC across all four profiles (per-side stops, the settlement-aware force-close cascade with the physically-settled early close + assignment/pin friction, and cash-settled left-to-expire settlement — no profit target) and evaluates new entries per profile. All writes go to data/paper_trades.db; the live account and data/meic_trades.db are never touched.

Report the per-symbol, per-profile outcomes from the JSON it prints (fills, skip reasons, or exits).

Unattended session

For a full session that runs on its own without per-iteration invocation, use /paper-start, which registers a Windows scheduled task running --once every 2 minutes (robust, self-healing, persists across sessions, time-gated to market hours). Manage it directly with:

python src/paper_loop.py --install-task    # register + fire the first run (recommended)
python src/paper_loop.py --status          # daemon/task status + open-position count
python src/paper_loop.py --uninstall-task  # stop the unattended session
python src/paper_loop.py --eod-report       # write logs/paper-eod-<date>.md now (--date to backfill)

The daemon also writes that deterministic end-of-day report automatically, once, at the 16:00 settlement pass — a per-profile metrics table (trades, win rate, net P&L, expectancy, profit factor, max drawdown), an exits-by-reason breakdown, and per-symbol P&L. It's code-generated (no agent), distinct from the agent-synthesized /paper-report.

Read the full file on GitHub · 31 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 31 lines · 0 tokens per session scan A 8039d979545f

Subscribe to this mod's changes

paper-loop is a command published in the GitHub repository joncovington/MEICAgent (4 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 608 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.