Allencake/mit-trader-skill
FinanceA Claude skill that turns MIT 18.S096 quant methods into backtest research, stop-loss sizing, and paper-account trade tickets.
This repo is an agent skill pack · 1 skillsSkill list and install →What it is
This repository packages methods from MIT OpenCourseWare's 18.S096 Topics in Mathematics with Applications in Finance as a Claude skill. It is meant for readers who want a structured, research-first workflow around systematic strategies without connecting a real brokerage account. The course itself is free on MIT OCW; the project is not an official MIT product.
The skill has three main commands: /mit-trader research tests the strategy library, /mit-trader today checks passed strategies for signals and produces trade tickets, and /mit-trader explain <concept> explains a metric in plain language and points to the corresponding lecture. It ships with a strategy library containing time-series momentum, mean reversion, channel breakout as a non-course control, and cointegration pairs.
Quick start
You need Python 3.10 or later and Claude Code. Clone the repository into the skills directory, create a virtual environment, install dependencies, and run the offline smoke test:
git clone https://github.com/Allencake/mit-trader-skill ~/.claude/skills/mit-trader
cd ~/.claude/skills/mit-trader
python3 -m venv .venv && .venv/bin/pip install -r requirements.txt
.venv/bin/python tests/test_smoke.py
A successful smoke test prints smoke tests passed. Claude Code then reads SKILL.md from the skill directory. To test the full pipeline without relying on live data, run the synthetic-market mode:
.venv/bin/python -m mit_trader research --planted
.venv/bin/python -m mit_trader today --planted
The synthetic market contains one planted momentum advantage and otherwise noise; the expected result is that only the planted series is found. Commands can also be run from the terminal instead of through Claude.
How a ticket is produced
Research applies three gates: walk-forward out-of-sample testing, a permutation-based luck test with Benjamini-Hochberg correction and a deflated Sharpe ratio, and a cost test that doubles costs. A strategy must pass all three to be approved. In today, the skill first checks stop-losses on existing paper positions, then looks for a signal. Stop distance is set from a GARCH(1,1) one-day volatility forecast, position size uses Monte Carlo simulation of 5-day holds and quarter-Kelly, and portfolio risk is checked with a one-day 99% VaR. Every ticket requires an explicit yes before it is recorded.
Constraints and limits
Only a paper ledger is supported; there is no real broker integration. The workflow is daily-bar based, uses closing prices for signals, and assumes simulated fills at a reference price plus slippage. Monte Carlo sizing samples from historical out-of-sample returns, so it can be misleading when market behavior changes. For pairs trading, the paper ledger does not automatically trigger pair stop-losses, and today warns about this. Market data comes from yfinance for stocks and ETFs and from ccxt public market data for crypto, defaulting to OKX. No API key is required, but the exchange can be changed in config.yaml if OKX is inaccessible. State is stored under ~/.mit-trader/, which can be overridden with MIT_TRADER_HOME.
HotRepo's take
The project appeared on the Python new-list snapshot for 2026-11-25 with 102 stars and 33 forks gained in its growth window, and no all-language daily rank was recorded. The repository contains a single root SKILL.md and Python code, with no root package manifest. The interesting design choice is the emphasis on rejection: the README states that all strategies being rejected is a common and acceptable outcome, and that thresholds should not be relaxed just to produce a ticket. That makes the skill more of a repeatable research checklist than a signal service, and the paper-only ledger keeps the workflow bounded while the strategy library and risk sizing are exercised.
Written by AI from the project's public information and HotRepo's records, updated . The project's own docs are the source of truth.
You might also like
- tradermonty/claude-trading-skillsClaude Skills toolkit that structures market review, trade planning, risk checks, and journaling for time-constrained retail investors.
- Jakeschincariol/day-trader-skillClaude skills that turn free public market data into a day-trading workflow, from chart scan to simulated odds.
- nautechsystems/nautilus_traderAn event-driven Rust trading engine that runs the same Python strategy code in backtest and live execution.
- kostemeloo413-ux/v7-investment-workbenchA-share research and simulated trading workbench that links news analysis, strategy rules, quant ranking, paper matching and an auditable ledger.
- waditu/czscA Python toolkit that automates Chan Theory market structure analysis and signal-based backtesting for stocks, futures, and crypto.