Skip to content

Getting Started

Welcome to sigc! This section will help you get up and running quickly.

Choose Your Path

Quick Start (5 minutes)

Already familiar with quant concepts? Jump straight in:

  1. Install sigc
  2. Run your first backtest

Guided Tutorial (30 minutes)

New to sigc or want a thorough introduction:

  1. Install sigc
  2. Build your first strategy
  3. Set up your IDE

What You'll Learn

By the end of this section, you'll be able to:

  • Install the sigc binary on your system
  • Write a basic trading signal in the sigc DSL
  • Run a backtest and interpret the results
  • Set up VS Code for sigc development
  • Load and work with sample data

Prerequisites

Before starting, ensure you have:

  • Operating System: Linux, macOS, or Windows (WSL2)
  • Rust Toolchain: Version 1.70 or later
  • Basic Knowledge: Familiarity with command-line tools

No Rust experience required

You don't need to know Rust to use sigc. The DSL is a separate language designed for quantitative research. Rust knowledge is only needed if you want to contribute to sigc itself or use the Rust API directly.

Section Overview

Page Description Time
Installation Install Rust and build sigc 10 min
Quickstart Run your first backtest 5 min
First Strategy Build a complete momentum strategy 15 min
IDE Setup Configure VS Code extension 5 min
Sample Data Work with included datasets 5 min

Quick Reference

Essential Commands

Bash
# Compile a signal (validate syntax)
sigc compile strategy.sig

# Run a backtest
sigc run strategy.sig

# Export results to JSON
sigc run strategy.sig --output results.json

# Compare two strategies
sigc diff strategy_a.sig strategy_b.sig

Basic Signal Structure

Text Only
data:
  prices: load csv from "data/prices.csv"

params:
  lookback = 20

signal momentum:
  returns = ret(prices, lookback)
  emit zscore(returns)

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

Next Steps

Ready to begin? Start with Installation.

If you prefer learning by example, check out the Strategy Library for 23 complete, documented strategies.