/quant-skills:trader-memory-corefrom quant-skills
Tracks investment theses across their lifecycle — from screening idea to closed position with postmortem. Register theses from screener outputs, manage state transitions, attach position sizing, review due dates, and generate postmortem reports with P&L and MAE/MFE analysis.
Ships in quant-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.
Persistent state layer that bundles screening → analysis → position sizing → portfolio management outputs into a single "thesis object" per investment idea. Tracks what you thought, what happened, and what you learned — across conversations.
Phase 1 supports single-ticker theses: dividend_income, growth_momentum, mean_reversion, earnings_drift, pivot_breakout.
pyyaml (already in project dependencies)Read the screener's JSON output and convert to thesis using the appropriate adapter.
python3 skills/trader-memory-core/scripts/thesis_ingest.py \
--source kanchi-dividend-sop \
--input reports/kanchi_entry_signals_2026-03-14.json \
--state-dir state/theses/
Supported sources: kanchi-dividend-sop, earnings-trade-analyzer, vcp-screener, pead-screener, canslim-screener, edge-candidate-agent.
Each thesis starts in IDEA status.
python3 skills/trader-memory-core/scripts/thesis_store.py \
--state-dir state/theses/ list --ticker AAPL --status ACTIVE
Filter by --ticker, --status, or --type.
State transition (IDEA → ENTRY_READY only):
Use thesis_store.transition(state_dir, thesis_id, "ENTRY_READY", reason) from Python.
Open position (ENTRY_READY → ACTIVE):
Use thesis_store.open_position(state_dir, thesis_id, actual_price, actual_date) — the only path to ACTIVE. Accepts optional shares and event_date (for backfilling past trades).
Close or invalidate (→ CLOSED or INVALIDATED):
Use thesis_store.terminate(state_dir, thesis_id, terminal_status, exit_reason, actual_price, actual_date). For CLOSED, delegates to close() which computes P&L. For INVALIDATED, P&L is computed if entry/exit prices are available.
Record review (any non-terminal):
Use thesis_store.mark_reviewed(state_dir, thesis_id, review_date=..., outcome="OK"|"WARN"|"REVIEW") to advance next_review_date and record alerts.
Attach position-sizer output:
Use thesis_store.attach_position(state_dir, thesis_id, report_path) to link position sizing data. Validates that the report mode is "shares" (not budget).
Link related reports:
Use thesis_store.link_report(state_dir, thesis_id, skill, file, date) to cross-reference analysis documents.
python3 skills/trader-memory-core/scripts/thesis_review.py \
--state-dir state/theses/ review-due --as-of 2026-04-15
List theses with next_review_date <= as_of. Use with kanchi-dividend-review-monitor triggers (T1-T5) for systematic review.
python3 skills/trader-memory-core/scripts/thesis_review.py \
--state-dir state/theses/ postmortem th_aapl_div_20260314_a3f1
Generate a structured postmortem in state/journal/. If FMP API key is available, includes MAE/MFE (Maximum Adverse/Favorable Excursion) metrics.
Summary statistics:
python3 skills/trader-memory-core/scripts/thesis_review.py \
--state-dir state/theses/ summary
Shows win rate, average P&L%, and per-type breakdown across all closed theses.
Each thesis is a YAML file with:
Lightweight index for fast queries without loading full YAML files.
Postmortem markdown reports: pm_{thesis_id}.md.
origin.raw_provenancestate/ directory is committed, providing audit trailreferences/thesis_lifecycle.md — Status states and valid transitionsreferences/field_mapping.md — Source skill → canonical field mappingschemas/thesis.schema.json — JSON Schema for thesis validationREADME.md (opens in a new tab)assets/postmortem_template.md (opens in a new tab)references/field_mapping.md (opens in a new tab)references/thesis_lifecycle.md (opens in a new tab)schemas/thesis.schema.json (opens in a new tab)scripts/fmp_price_adapter.py (opens in a new tab)scripts/tests/conftest.py (opens in a new tab)scripts/tests/test_fmp_price_adapter.py (opens in a new tab)scripts/tests/test_thesis_ingest.py (opens in a new tab)scripts/tests/test_thesis_review.py (opens in a new tab)scripts/tests/test_thesis_store.py (opens in a new tab)scripts/thesis_ingest.py (opens in a new tab)scripts/thesis_review.py (opens in a new tab)scripts/thesis_store.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
64 skills in this plugin
/0dte-flow0DTE day-trading playbook for a small account — Ghost Alpha signals into Tradier XSP (Mini-SPX) same-day options with strict IFTTT entry/exit rules and hard risk guardrails. Use when Michael wants to run a 0DTE session, size a contract, decide whether a signal qualifies, or apply the exit cascade. This is a DECISION-SUPPORT playbook — it drafts the plan; Michael places every order./backtest-expertExpert guidance for systematic backtesting of trading strategies. Use when developing, testing, stress-testing, or validating quantitative trading strategies. Covers "beating ideas to death" methodology, parameter robustness testing, slippage modeling, bias prevention, and interpreting backtest results. Applicable when user asks about backtesting, strategy validation, robustness testing, avoiding overfitting, or systematic trading development./batch-scannernpx claudepluginhub mphinance/alpha-skills --plugin quant-skillsOther plugins' skills for the same job