Skip to content

Integrations

Connect sigc with external tools, languages, and services.

Overview

sigc integrates with:

Category Integrations
Languages Python
IDEs VSCode
Brokers Alpaca
Data Yahoo Finance
Streaming Real-time data

Python Integration

Use sigc from Python for:

  • Jupyter notebooks
  • Custom analysis
  • Integration with pandas/numpy
  • Machine learning pipelines
Python
import pysigc

# Run a strategy
results = pysigc.run("strategy.sig")
print(f"Sharpe: {results.sharpe_ratio:.2f}")

# Access weights
weights = results.weights  # pandas DataFrame

Learn more →

VSCode Extension

Full IDE support:

  • Syntax highlighting
  • Code completion
  • Error diagnostics
  • Hover documentation
Bash
# Install extension
code --install-extension skelf-Research.sigc-vscode

Learn more →

Alpaca Trading

Execute trades through Alpaca:

YAML
output:
  type: alpaca
  alpaca:
    api_key: ${ALPACA_API_KEY}
    api_secret: ${ALPACA_API_SECRET}
    paper: true  # Paper trading

Learn more →

Yahoo Finance

Free market data:

Text Only
data:
  source = "yahoo"
  symbols = ["AAPL", "MSFT", "GOOGL"]
  start = "2020-01-01"

Learn more →

Real-Time Streaming

Stream live data:

YAML
data:
  type: streaming
  provider: polygon
  symbols: ["AAPL", "MSFT"]

Learn more →

Integration Architecture

Text Only
┌─────────────────────────────────────────────────────────────┐
│                         sigc Core                           │
│                                                             │
│  ┌─────────────┐    ┌─────────────┐    ┌─────────────┐    │
│  │   Parser    │    │   Runtime   │    │   Output    │    │
│  │   (DSL)     │    │  (Compute)  │    │  (Execute)  │    │
│  └─────────────┘    └─────────────┘    └─────────────┘    │
│         │                  │                  │            │
└─────────┼──────────────────┼──────────────────┼────────────┘
          │                  │                  │
    ┌─────▼─────┐      ┌─────▼─────┐      ┌─────▼─────┐
    │  VSCode   │      │  Python   │      │  Alpaca   │
    │ Extension │      │ (pysigc)  │      │  Broker   │
    └───────────┘      └───────────┘      └───────────┘

Adding Custom Integrations

Data Provider

Rust
// Implement DataProvider trait
impl DataProvider for MyProvider {
    fn fetch(&self, symbols: &[String], range: DateRange) -> DataFrame;
}

Execution Provider

Rust
// Implement ExecutionProvider trait
impl ExecutionProvider for MyBroker {
    fn submit_order(&self, order: Order) -> OrderResult;
    fn get_positions(&self) -> Vec<Position>;
}

Best Practices

1. Use Paper Trading First

YAML
output:
  type: alpaca
  alpaca:
    paper: true  # Always start with paper

2. Handle Rate Limits

YAML
data:
  provider: yahoo
  rate_limit:
    requests_per_minute: 30

3. Cache External Data

YAML
data:
  cache:
    enabled: true
    ttl_hours: 24

4. Error Handling

Python
try:
    results = pysigc.run("strategy.sig")
except pysigc.DataError as e:
    print(f"Data issue: {e}")
except pysigc.ExecutionError as e:
    print(f"Execution issue: {e}")

Next Steps