Skip to content
sigc

Features

Everything in the box.

sigc is a compiler, a runtime, a cache, a backtester, and a daemon — one Rust workspace, six crates. Here is the whole surface.

Compiler

The .sig language

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.

Compile-time shape & calendar checks

Mismatched indices, wrong dtypes, and unresolved signal references fail at parse time — before a single row of data is read.

Composable signals

Reference signals by name and combine them with explicit arithmetic: 0.4 * momentum + 0.3 * value + 0.3 * quality. No hidden joins.

Language server (sig_lsp)

A dedicated LSP crate powers a VS Code extension with diagnostics, completion, and hover for .sig files.

Execution

The runtime

120+ vectorized operators

ret, lag, zscore, rank, winsor, rolling_mean, ema, rsi, macd, atr, vwap, neutralize and more — the surface area a factor researcher actually uses.

Polars / Arrow columnar engine

Signals lower to an operator graph evaluated lazily over Arrow columns, with Rayon parallelism.

SIMD kernels

AVX2 / AVX-512 kernels where the CPU supports them, for the hot numeric paths.

Custom signals

The operator set is not fixed: define your own named signal blocks and share factor libraries across teams.

Cache

Reproducibility

Content-addressed cache

IR and intermediate results are keyed by blake3 content hash and stored in a sled cache.

Byte-for-byte determinism

Identical .sig source, params, and inputs return identical outputs — down to the last basis point.

Microsecond warm hits

Rerunning an unchanged strategy hits the cache and returns in microseconds instead of recomputing.

Backtester

Backtesting

Portfolio constructors

rank(...).long_short(top, bottom, cap) for ranked books; scale_vol(signal, target_ann_vol, lookback) for vol-targeting.

Transaction-cost models

Compose costs: tc.bps(5) + slippage.model("square-root", coef=0.1) for commission plus square-root impact.

Rebalance cadence & benchmark

Explicit rebalance schedule, a date range, and an optional benchmark such as SPY for attribution.

Standard metrics

sigc run prints Total Return, Sharpe Ratio, Max Drawdown, and Turnover by default.

Deploy

Production

One binary, daemon mode

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.

Risk posture as config

sigc.yaml declares circuit breakers (max drawdown, max position, kill switch) and per-minute order rate limits.

Observability

Prometheus /metrics endpoint, structured JSON audit logs, and Slack alerts on anomalies.

Brokerless architecture

No Redis, no Kafka, no RabbitMQ — the daemon is the single cache owner; clients retry with exponential backoff.

Ecosystem

Integration

Rust embedding

Depend on the sigc crate, call Strategy::from_file, override params with with_param, and read weights/returns as Vec<f64>.

Python bindings (pysigc)

Stay in Jupyter but get the compiler’s guarantees on the underlying signal computation.

Data connectors

Load parquet, CSV, S3, GCS, or Postgres; Alpaca for paper and live trading per the README.

Six-crate workspace

sigc, sig_compiler, sig_runtime, sig_types, sig_cache, and sig_lsp — depend on exactly what you need.

See it end to end

The quickstart compiles and backtests a strategy in five minutes. The architecture page explains how the pieces fit.