Skip to content

Tutorials

Hands-on guides to building strategies with sigc.

Strategy Tutorials

Tutorial Level Description
Momentum Strategy Beginner Classic cross-sectional momentum
Mean Reversion Beginner Short-term price reversion
Multi-Factor Intermediate Combining multiple signals
Volatility Strategy Intermediate Volatility-based trading

Technical Tutorials

Tutorial Level Description
Custom Functions Intermediate Creating reusable functions
Walk-Forward Optimization Advanced Proper validation
Production Deployment Advanced Going live
Python Workflow Intermediate Integration with Python

Learning Path

Beginner Path

  1. First Strategy - Your first backtest
  2. Momentum Strategy - Classic momentum
  3. Mean Reversion - Price reversion
  4. Quickstart - Core concepts

Intermediate Path

  1. Multi-Factor - Combining signals
  2. Volatility Strategy - Vol-based trading
  3. Custom Functions - Code reuse
  4. Python Workflow - Python integration

Advanced Path

  1. Walk-Forward Optimization - Proper validation
  2. Factor Models - Factor construction
  3. Risk Models - Risk management
  4. Production Deployment - Going live

Quick Examples

Momentum

Text Only
signal momentum:
  emit zscore(ret(prices, 60))

portfolio main:
  weights = rank(momentum).long_short(top=0.2, bottom=0.2)
  backtest from 2020-01-01 to 2024-12-31

Full tutorial →

Mean Reversion

Text Only
signal reversion:
  z = (prices - rolling_mean(prices, 20)) / rolling_std(prices, 20)
  emit -zscore(z)  // Fade extremes

portfolio main:
  weights = rank(reversion).long_short(top=0.2, bottom=0.2)
  backtest rebal=5 from 2020-01-01 to 2024-12-31

Full tutorial →

Multi-Factor

Text Only
signal momentum:
  emit zscore(ret(prices, 60))

signal value:
  emit zscore(book_to_market)

signal combined:
  emit 0.5 * momentum + 0.5 * value

portfolio main:
  weights = rank(combined).long_short(top=0.2, bottom=0.2)
  backtest from 2020-01-01 to 2024-12-31

Full tutorial →

Prerequisites

Before starting tutorials:

  1. Install sigc (Installation)
  2. Set up your IDE (IDE Setup)
  3. Get sample data (Sample Data)

Getting Help

Next Steps

Start with the Momentum Strategy tutorial.