AlpacaJev
A paper-trading bot built to measure how good a typed-judgment model is
Typeexperiment
Statusin-progress
Updated2026-09-18
Commits37
SourcePrivate
What it is
AlpacaJev is an autonomous Alpaca paper-trading bot whose real purpose is to score TypeSafe's Jev model. Python detects mechanical price setups, and Jev only judges whether each setup is real, returning calibrated probabilities. Every detected setup is scored against what happened next whether or not it was traded, so one day yields statistically meaningful evidence (Brier skill, log loss, AUC, calibration) instead of a handful of noisy trades.
The problem
A day of trading gives too few trades to tell a good strategy or model from a lucky one.
How it works
- Detection is pure Python over closed bars; the model is never consulted to find setups, which keeps the sample reproducible.
- Several strategies run concurrently on one account, each with its own risk slice, position slots and calibration curve, and each exposes a yes/no proposition resolved later by a stored rule.
- SQLite stores every setup and its resolution; a metrics module computes Brier and skill score, log loss, AUC, ECE, expectancy in R, capture ratio and an exit breakdown.
- A FastAPI dashboard on localhost:8787, a replay and simulation mode, and a bake-off module compare different information diets.
Stack
Python 3.11alpaca-pyTypeSafe Jev SDKFastAPISQLiteRichpytestuv
Disciplines
For your business
Evaluation harnesses that measure whether an AI model's judgments actually beat a baseline before it is trusted in a client workflow.