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¶
- First Strategy - Your first backtest
- Momentum Strategy - Classic momentum
- Mean Reversion - Price reversion
- Quickstart - Core concepts
Intermediate Path¶
- Multi-Factor - Combining signals
- Volatility Strategy - Vol-based trading
- Custom Functions - Code reuse
- Python Workflow - Python integration
Advanced Path¶
- Walk-Forward Optimization - Proper validation
- Factor Models - Factor construction
- Risk Models - Risk management
- 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
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
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
Prerequisites¶
Before starting tutorials:
- Install sigc (Installation)
- Set up your IDE (IDE Setup)
- Get sample data (Sample Data)
Getting Help¶
- Check Concepts for foundational knowledge
- See Operators for function reference
- Browse Strategy Library for more examples
Next Steps¶
Start with the Momentum Strategy tutorial.