sigc¶
A Rust-based quantitative finance research platform
Build, test, and deploy trading strategies with a type-safe DSL, deterministic backtester, and production-ready infrastructure.
Why sigc?¶
Quant teams lose hours every week to ad hoc Python notebooks: mismatched calendars, fragile joins, non-deterministic backtests, and duplicated factor code. sigc is a composable, shape-aware DSL backed by a columnar runtime and deterministic backtester.
Type-Safe DSL¶
Write signals in a concise, readable language with compile-time type checking. Catch errors before running expensive backtests.
Deterministic Backtesting¶
Get reproducible results every time. Content-addressed caching ensures identical inputs produce identical outputs.
120+ Operators¶
Time-series, cross-sectional, technical indicators, and portfolio construction operators built-in. No external dependencies needed.
Production Ready¶
Circuit breakers, position limits, Slack alerts, audit logging, and Prometheus metrics. Deploy with confidence.
Single Binary¶
No services to manage. Compile, run, and deploy with one sigc binary. Daemon mode available for long-lived services.
IDE Support¶
VS Code extension with syntax highlighting, code completion, error diagnostics, and 25+ code snippets.
Quick Example¶
data:
prices: load parquet from "data/prices.parquet"
params:
lookback = 20
top_pct = 0.2
signal momentum:
returns = ret(prices, lookback)
score = zscore(returns)
emit winsor(score, p=0.01)
portfolio main:
weights = rank(momentum).long_short(top=top_pct, bottom=top_pct)
backtest from 2024-01-01 to 2024-12-31
$ sigc run strategy.sig
=== Backtest Results ===
Total Return: 15.23%
Annualized Return: 15.23%
Sharpe Ratio: 1.45
Max Drawdown: 8.12%
Turnover: 312.00%
Choose Your Path¶
For Quant Researchers¶
Learn to build and test trading strategies with sigc's DSL.
For Developers¶
Integrate sigc into your infrastructure and extend its capabilities.
Key Features¶
Signal Development¶
Write trading signals using a concise DSL with 120+ built-in operators:
Custom Functions and Macros¶
Create reusable components for your signal library:
// Custom function
fn volatility(x, window=20):
rolling_std(ret(x, 1), window)
// Reusable macro
macro vol_adj_momentum(px: expr, ret_window: number = 20, vol_window: number = 60):
let r = ret(px, ret_window)
let vol = rolling_std(r, vol_window)
emit zscore(r / vol)
signal my_signal:
emit vol_adj_momentum(prices, 30, 90)
Production Infrastructure¶
Deploy with enterprise-grade safety systems:
- Circuit Breakers - Automatic trading halts on anomalies
- Position Limits - Max weight, sector, and turnover constraints
- Kill Switches - Emergency stop for all trading
- Alerting - Slack, email, and console notifications
- Audit Logging - Full compliance trail
- Monitoring - Prometheus metrics and Grafana dashboards
Integrations¶
Connect to your existing infrastructure:
| Integration | Description |
|---|---|
| Python | pysigc bindings for Jupyter notebooks |
| VS Code | Syntax highlighting, LSP, and snippets |
| Alpaca | Paper and live trading via broker API |
| Yahoo Finance | Free historical and real-time data |
| PostgreSQL | Async connection pooling for databases |
| S3 | Cloud storage for data and results |
Project Status¶
sigc is feature-complete with all 8 development phases finished:
- Production Features (async DB, corporate actions, alerts)
- Performance & Scale (SIMD kernels, memory mapping)
- Integration & Polish (colored CLI, 330 tests)
- Documentation (11-chapter Quant Guide, 23 strategies)
- Advanced Analytics (factor models, regime detection)
- Safety & Deployment (circuit breakers, Docker)
- Language Enhancements (macros, type inference, LSP)
- External Integrations (Yahoo Finance, Alpaca)
See the Changelog for release history.
Getting Help¶
- Documentation: You're reading it!
- GitHub Issues: Report bugs or request features
- Discussions: Ask questions and share strategies