Four-block strategy files
Every strategy is a data, params, one-or-more signal, and portfolio file. The structure is the type system: the compiler knows exactly what each block must produce.
Features
sigc is a compiler, a runtime, a cache, a backtester, and a daemon — one Rust workspace, six crates. Here is the whole surface.
Every strategy is a data, params, one-or-more signal, and portfolio file. The structure is the type system: the compiler knows exactly what each block must produce.
Mismatched indices, wrong dtypes, and unresolved signal references fail at parse time — before a single row of data is read.
Reference signals by name and combine them with explicit arithmetic: 0.4 * momentum + 0.3 * value + 0.3 * quality. No hidden joins.
A dedicated LSP crate powers a VS Code extension with diagnostics, completion, and hover for .sig files.
ret, lag, zscore, rank, winsor, rolling_mean, ema, rsi, macd, atr, vwap, neutralize and more — the surface area a factor researcher actually uses.
Signals lower to an operator graph evaluated lazily over Arrow columns, with Rayon parallelism.
AVX2 / AVX-512 kernels where the CPU supports them, for the hot numeric paths.
The operator set is not fixed: define your own named signal blocks and share factor libraries across teams.
IR and intermediate results are keyed by blake3 content hash and stored in a sled cache.
Identical .sig source, params, and inputs return identical outputs — down to the last basis point.
Rerunning an unchanged strategy hits the cache and returns in microseconds instead of recomputing.
rank(...).long_short(top, bottom, cap) for ranked books; scale_vol(signal, target_ann_vol, lookback) for vol-targeting.
Compose costs: tc.bps(5) + slippage.model("square-root", coef=0.1) for commission plus square-root impact.
Explicit rebalance schedule, a date range, and an optional benchmark such as SPY for attribution.
sigc run prints Total Return, Sharpe Ratio, Max Drawdown, and Turnover by default.
sigc daemon is a long-running process that owns the cache and serves clients over nng REQ/REP on tcp://127.0.0.1:7240.
sigc.yaml declares circuit breakers (max drawdown, max position, kill switch) and per-minute order rate limits.
Prometheus /metrics endpoint, structured JSON audit logs, and Slack alerts on anomalies.
No Redis, no Kafka, no RabbitMQ — the daemon is the single cache owner; clients retry with exponential backoff.
Depend on the sigc crate, call Strategy::from_file, override params with with_param, and read weights/returns as Vec<f64>.
Stay in Jupyter but get the compiler’s guarantees on the underlying signal computation.
Load parquet, CSV, S3, GCS, or Postgres; Alpaca for paper and live trading per the README.
sigc, sig_compiler, sig_runtime, sig_types, sig_cache, and sig_lsp — depend on exactly what you need.
The quickstart compiles and backtests a strategy in five minutes. The architecture page explains how the pieces fit.