尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗A live exchange in your browser: real order book, real market data, structured trading games. Open-source, built at Oxford, free for any student, society, or classroom.
alphabook.uk — sign up and trade in under a minute.
The skills trading firms actually test — market making, probability calibration, pricing under pressure — are taught almost nowhere outside the firms themselves. AlphaBook makes them trainable: a real price-time-priority matching engine, live market data, and games modelled on trading-floor exercises, all with virtual balances and zero real-money risk.
We use it to run live trading bootcamps and competitions for the Oxford student quant community, including the Oxford Alpha Fund: an instructor creates a game, scripts the news flow, and a room of students competes on a shared order book with a real-time P&L leaderboard.
Every mode has a live leaderboard. Works solo too — the market-maker bot is always on the other side.
We are seeking grant funding to turn the simulator into an adaptive teaching platform:
Xue (Snow) Yan (project lead) · Siyu (Sylvia) Li · Nick Wang · Fiona (Yiran) Zhang · Xinyun Jiang · Yiluan (Eylan) Zeng
| Layer | Technology |
|---|---|
| Backend | Python 3.11 / FastAPI / Uvicorn |
| Frontend | Jinja2 + vanilla JavaScript |
| Data & auth | Cloud Firestore (async) + Firebase Auth |
| Real-time | WebSockets (book snapshot broadcast on every trade) |
| Market data | Stooq quotes + synthetic tick engine |
| Deploy | Docker → Cloud Run + Firebase Hosting |
Key modules in app/: order_book.py (matching engine: price-time priority, partial fills), market_maker.py (two-sided quoting with realistic depth and delayed sweeps), market_data.py (real quotes blended with synthetic ticks), fiveos.py / headline.py / poker_auction.py / mental_math.py (game engines), admin.py (games, news, leaderboard, users). Tests live in tests/; CI runs ruff + pytest on every push.
Market Simulation Coding (algo_engine.py + market_sim_py.py + world.py) is client-side: players run their bot on their own machine and reach the market only through an authenticated, rate-limited order gateway (algo_ratelimit.py caps it at ~10 orders/sec). No player code runs on the server, so there is nothing to sandbox — the engine only validates and matches orders on arrival. The same is true of the world layer (world.py), where an empire action is validated JSON just like an order; it holds the map, the buildings, the units and the combat, and is kept pure and seeded so the whole ruleset is testable without standing up a market. A player's trading P&L is their build budget, which is the only coupling between the two halves. Both keep their own books and fictional items, separate from the live stock market. Full write-up — architecture, the API, and a strategy-writing guide with worked examples — in docs/market_sim_py.md.
Prerequisites: Python 3.11+, a free Firebase project (Auth + Firestore).
git clone https://github.com/snowy615/alphaBook.git
cd alphaBook
python3 -m venv venv && source venv/bin/activate
pip install -r requirements.txt
cp .env.example .env # fill in Firebase config — see SETUP.md
python -m uvicorn app.main:app --reload
Open http://localhost:8000. Full Firebase setup and Cloud Run deployment: SETUP.md.
PRs welcome — see CONTRIBUTING.md. MIT licensed (LICENSE).