Core Concepts¶
Understanding sigc's core concepts will help you build better trading strategies.
Overview¶
sigc is built around four fundamental concepts:
- Signals - Numerical scores that rank assets
- Portfolios - Weight allocations based on signals
- Backtests - Historical simulations of portfolio performance
- Type System - Compile-time checking of operations
graph LR
A[Data] --> B[Signal]
B --> C[Portfolio]
C --> D[Backtest]
D --> E[Metrics]
Quick Concept Map¶
| Concept | What It Is | Example |
|---|---|---|
| Signal | Score per asset | Momentum, value, quality |
| Portfolio | Weight allocation | Long/short, long-only |
| Backtest | Historical simulation | 2020-2024 test |
| Type System | Safety checking | Shape, dtype inference |
The sigc Workflow¶
1. Load Data¶
Data flows into the system as time-series matrices (dates × assets).
2. Define Signals¶
Signals transform data into scores that rank assets at each point in time.
3. Construct Portfolios¶
Portfolio construction converts scores into tradeable weights.
4. Run Backtests¶
Backtesting simulates the strategy over historical data.
5. Analyze Results¶
Metrics quantify strategy performance.
Key Principles¶
Reproducibility¶
sigc guarantees deterministic results:
- Same inputs → same outputs, always
- Content-addressed caching with blake3 hashes
- No hidden randomness or state
Type Safety¶
The type system catches errors at compile time:
Text Only
signal bad:
x = ret(prices, 20) // Returns: time-series
y = zscore(x) // Error: zscore expects cross-sectional
Learn more in Type System.
Composability¶
Build complex strategies from simple components:
Text Only
fn vol_adj(x, lookback):
x / rolling_std(ret(x, 1), lookback)
macro momentum_signal(px: expr, lookback: number = 20):
let r = ret(px, lookback)
emit zscore(vol_adj(r, 60))
signal combo:
mom = momentum_signal(prices)
rev = -zscore(ret(prices, 5))
emit 0.7 * mom + 0.3 * rev
Section Overview¶
| Page | Description |
|---|---|
| Signals | What signals are and how to build them |
| Portfolio Construction | Converting signals to weights |
| Backtesting | Simulation methodology |
| Type System | Shape-aware type checking |
| Architecture | System components and design |
Next Steps¶
Start with What Are Signals? to understand the foundation of sigc strategies.