Rust Finance
A high-performance, ultra low-latency trading terminal and AI-infused daemon built completely in Rust.
Install / Use
npx skills add Ashutosh0x/rust-financeInstalls into whichever agent you are using.
README
RustFinance Terminal (rust-finance)
<div align="center"> <img src="https://img.shields.io/badge/Rust-000000?style=for-the-badge&logo=rust&logoColor=white" alt="Rust" /> <img src="https://img.shields.io/badge/Tokio-1A2421?style=for-the-badge&logo=Rust&logoColor=white" alt="Tokio" /> <img src="https://img.shields.io/badge/Ratatui-0A0C0F?style=for-the-badge&logo=Linux&logoColor=white" alt="Ratatui" /> <img src="https://img.shields.io/badge/Anthropic-FF7F50?style=for-the-badge&logo=Anthropic&logoColor=white" alt="Anthropic" /> <img src="https://img.shields.io/badge/WebSocket-010101?style=for-the-badge&logo=socket.io&logoColor=white" alt="WebSocket" /> <br /> <img src="https://img.shields.io/badge/Rayon-FF4500?style=for-the-badge&logo=rust&logoColor=white" alt="Rayon" /> <img src="https://img.shields.io/badge/Serde-2C2D72?style=for-the-badge&logo=rust&logoColor=white" alt="Serde" /> <img src="https://img.shields.io/badge/Petgraph-228B22?style=for-the-badge&logo=rust&logoColor=white" alt="Petgraph" /> <img src="https://img.shields.io/badge/Criterion-FF6B35?style=for-the-badge&logo=rust&logoColor=white" alt="Criterion" /> <img src="https://img.shields.io/badge/Postcard-4B0082?style=for-the-badge&logo=rust&logoColor=white" alt="Postcard" /> <br /> <img src="https://img.shields.io/badge/PostgreSQL-4169E1?style=for-the-badge&logo=postgresql&logoColor=white" alt="PostgreSQL" /> <img src="https://img.shields.io/badge/Redis-DC382D?style=for-the-badge&logo=redis&logoColor=white" alt="Redis" /> <img src="https://img.shields.io/badge/Docker-2496ED?style=for-the-badge&logo=docker&logoColor=white" alt="Docker" /> <img src="https://img.shields.io/badge/GitHub_Actions-2088FF?style=for-the-badge&logo=githubactions&logoColor=white" alt="GitHub Actions" /> <img src="https://img.shields.io/badge/LaTeX-008080?style=for-the-badge&logo=latex&logoColor=white" alt="LaTeX" /> <br /> <a href="https://github.com/Ashutosh0x/rust-finance/stargazers"><img src="https://img.shields.io/github/stars/Ashutosh0x/rust-finance?style=for-the-badge&logo=github&color=gold" alt="GitHub stars" /></a> <a href="https://github.com/Ashutosh0x/rust-finance/network/members"><img src="https://img.shields.io/github/forks/Ashutosh0x/rust-finance?style=for-the-badge&logo=github&color=silver" alt="GitHub forks" /></a> <a href="https://buymeacoffee.com/Ashutosh0x"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-FFDD00?style=for-the-badge&logo=buymeacoffee&logoColor=black" alt="Buy Me a Coffee" /></a> <br /> <img src="https://img.shields.io/badge/Alpaca-FACC15?style=for-the-badge&logo=alpaca&logoColor=black" alt="Alpaca" /> <img src="https://img.shields.io/badge/Binance-FCD535?style=for-the-badge&logo=binance&logoColor=black" alt="Binance" /> <img src="https://img.shields.io/badge/Finnhub-000000?style=for-the-badge&logo=graphql&logoColor=white" alt="Finnhub" /> <img src="https://img.shields.io/badge/Polymarket-000000?style=for-the-badge&logo=Polymarket&logoColor=white" alt="Polymarket" /> <br /> <img src="https://img.shields.io/badge/NASDAQ-0090F7?style=for-the-badge&logo=nasdaq&logoColor=white" alt="NASDAQ" /> <img src="https://img.shields.io/badge/NYSE-092140?style=for-the-badge&logo=new-york-stock-exchange&logoColor=white" alt="NYSE" /> <img src="https://img.shields.io/badge/CME-003366?style=for-the-badge" alt="CME" /> <img src="https://img.shields.io/badge/LSE-000000?style=for-the-badge" alt="LSE" /> <img src="https://img.shields.io/badge/NSE-004481?style=for-the-badge" alt="NSE" /> <img src="https://img.shields.io/badge/BSE-004C8F?style=for-the-badge" alt="BSE" /> <img src="https://img.shields.io/badge/CRYPTO-F7931A?style=for-the-badge" alt="CRYPTO" /> <br /> <img src="https://img.shields.io/badge/Windows-0078D6?style=for-the-badge&logo=windows&logoColor=white" alt="Windows" /> <img src="https://img.shields.io/badge/macOS-000000?style=for-the-badge&logo=apple&logoColor=white" alt="macOS" /> <img src="https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black" alt="Linux" /> <br /> <a href="https://scorecard.dev/viewer/?uri=github.com/Ashutosh0x/rust-finance"><img src="https://img.shields.io/ossf-scorecard/github.com/Ashutosh0x/rust-finance?style=for-the-badge&label=OpenSSF%20Scorecard" alt="OpenSSF Scorecard" /></a> <a href="https://github.com/Ashutosh0x/rust-finance/actions/workflows/security.yml"><img src="https://img.shields.io/github/actions/workflow/status/Ashutosh0x/rust-finance/security.yml?style=for-the-badge&logo=githubactions&logoColor=white&label=Security%20%26%20Supply%20Chain" alt="Security & Supply Chain" /></a> <a href="https://github.com/Ashutosh0x/rust-finance/actions/workflows/test.yml"><img src="https://img.shields.io/github/actions/workflow/status/Ashutosh0x/rust-finance/test.yml?style=for-the-badge&logo=githubactions&logoColor=white&label=CI%20Tests" alt="CI Tests" /></a> <a href="https://deps.rs/repo/github/Ashutosh0x/rust-finance"><img src="https://img.shields.io/badge/dependencies-up%20to%20date-brightgreen?style=for-the-badge" alt="dependency status" /></a> <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow?style=for-the-badge" alt="License: MIT" /></a> </div>At a Glance
RustFinance Terminal, also called RustForge, is an open-source Rust trading terminal for market-data ingestion, execution research, quantitative risk controls, compliance checks, and terminal dashboards.
- Try it locally:
cargo run -p tui --release - Run the daemon:
USE_MOCK=1 cargo run -p daemon --release - Demo: https://github.com/user-attachments/assets/c769b2c2-cfa0-44bd-a261-99786ea653e1
- Community: Roadmap, Contributing, good first issues
- Research Paper: 📄 RustFinance Research Paper 2026 (PDF) — 1,400+ line LaTeX paper covering architecture, 18 research papers, quantitative models, and benchmarks
- Funding: GitHub Sponsors, Buy Me a Coffee, funding.json
- Recognition: Listed in awesome-rust Finance applications
Safety: this project is research and open-source infrastructure. It is not financial advice, not a broker, and not a guarantee of live-trading readiness. Use paper trading and independent review before connecting real capital.
Overview
https://github.com/user-attachments/assets/c769b2c2-cfa0-44bd-a261-99786ea653e1
RustForge is an institutional-grade AI trading terminal built in pure Rust. It combines real-time multi-exchange market data, Claude-powered AI analysis, quantitative risk management, prediction market trading, and a full TUI dashboard — all in a single binary with nanosecond-precision timestamps and sub-millisecond latency.
v0.4 — 2026 Quant Alpha Library: Multi-level Microprice (MLOFI), Adverse Selection Detection, Regime-Conditioned Quoting, Kelly+Bayesian Sizing, Alpha Health Monitor, IC-Weighted Composite Signals, Enhanced Avellaneda-Stoikov Quoting Engine, Almgren-Chriss Optimal Execution, Live Binance WebSocket Candlestick Feed, and WebSocket Gap Detection Engine. 82+ unit tests passing on Rust 1.95.0.
| Feature | Detail |
|:---|:---|
| Language | Pure Rust |
| Interface | Full TUI Dashboard (Ratatui, 6 screens) |
| AI Integration | Claude-powered Dexter Analyst |
| Execution Algorithms | TWAP, VWAP, Iceberg, POV, Almgren-Chriss Optimal Execution |
| Market Making | Enhanced Avellaneda-Stoikov with regime gating, VPIN toxicity, OFI skew |
| Microstructure | Multi-level MLOFI, OFI, Microprice, Kyle's Lambda, VPIN, Amihud, Lee-Ready |
| Smart Order Router | Multi-venue scoring (fill rate, latency, fees, impact) |
| Alpha Signals | Toxicity detection, regime classifier, IC-weighted composite, alpha health |
| Position Sizing | Quarter-Kelly with Bayesian shrinkage, conviction scaling |
| Live Data | Binance WebSocket candlestick feed with gap detection engine |
| Prediction Markets | Polymarket CLOB + cross-platform arbitrage engine |
| Agent Simulation | 100K-agent Rayon-parallel swarm |
| Knowledge Graph | petgraph-backed RAG engine |
| Risk Models | GARCH(1,1) + VaR + Kill Switch + SMP + Regime Detection + Toxicity Gating |
| Timestamp Precision | Nanosecond (UnixNanos) |
| Deterministic Replay | DeterministicClock + SequenceId ordering |
| Regulatory Compliance | SEBI 2026 Algo-ID + OPS threshold + pre-trade checks |
| Fill Simulation | Almgren-Chriss √-impact model + fixed slippage |
| Alpha Monitoring | Rolling IC, Sharpe, hit rate with auto-decay detection |
| FIX Protocol | Production FIX 4.4 parser with checksum validation |
| Market Sources | Alpaca, Binance, Finnhub, Polymarket, Mock |
| Execution | Alpaca REST, Polymarket CLOB, Paper Trading |
| License | MIT |

Table of Contents
- Overview
- Architecture
- Quick Start
- Roadmap
- Contributing
- Features
- TUI Hotkeys
- Performance
- Configuration
- Strategy Development
- API Reference
- Troubleshooting
- License and Disclaimer
Architecture
34 modular crates, 250+ source files, strict dependency boundaries.
graph TD;
subgraph "External Feeds"
ALP(Alpaca WS) --> Ingest
BIN(Binance WS) --> Ingest
FH(Finnhub WS) --> Ingest
PM(Polymarket WS) --> Ingest
LLM(Anthropic Claude) <--> AI
end
subgraph "RustForge Engine"
Ingest(Ingestion / Source Multiplexer
Related Skills
clawhub
385.5kSearch ClawHub for skills when a requested capability is not already available; install, verify, update, uninstall, publish, or sync skills.
coding-agent
385.5kDelegate coding work to Codex, Claude Code, or OpenCode as background workers; not simple edits or read-only code lookup.
taskflow
385.5kCoordinate multi-step detached tasks as one durable TaskFlow job with owner context, state, waits, and child tasks.
agent-tui
106.4kMain Agents: Do NOT use this skill directly. If you need to test the TUI, invoke the `tui_tester` subagent. Drive terminal UI (TUI) applications programmatically for testing, automation, and inspection
