Strategy SDK
Build deterministic trading strategies with Python. Define your universe, generate target weights, and let the engine handle execution, risk management, and portfolio construction.
First Backtest
Clone a template and run your first backtest in under 5 minutes
API Reference
Complete reference for Strategy, StrategyContext, and DataAccessor
Long-Short Strategies
Gross/net exposure, borrow costs, and long-short archetypes
Risk Limits
Guardrail checks, kill switches, and position sizing constraints
Key Features
Deterministic Execution
Strategies produce target weights from market data. The engine handles order generation, fill simulation, and portfolio tracking — no runtime LLM calls.
Rich Data Access
Access daily OHLCV data, returns, volume, and fundamentals through the StrategyContext. Data is sourced from Databento and FMP.
Built-in Risk Management
8 guardrail checks enforce position limits, sector caps, drawdown kill switches, and more. Soft guardrails scale down; hard guardrails reject or pause.
Delay-1 Backtest Engine
Signal at T close, fill at T+1 open. Realistic execution simulation with proper mark-to-market and reconciliation.
Long-Only & Long-Short
Support for both long-only and long-short strategies with separate book accounting, borrow costs, and exposure controls.
Strategy Interface
from podium_sdk import Strategy, StrategyContext
class MyStrategy(Strategy):
def initialize(self, ctx: StrategyContext) -> None:
"""Optional: called once on first tick."""
pass
def universe(self, ctx: StrategyContext) -> list[str]:
"""Required: return symbols to consider."""
returns = ctx.data.returns(lookback=126)
return list(returns.columns)
def signal(self, ctx: StrategyContext) -> dict[str, float]:
"""Required: return target weights {symbol: weight}."""
returns = ctx.data.returns(lookback=20)
momentum = (1 + returns).prod() - 1
top = momentum.nlargest(10)
weight = 1.0 / len(top)
return {sym: weight for sym in top.index}
def risk_limits(self) -> dict:
"""Optional: override default risk limits."""
return {
"max_position_pct": 0.10,
"max_drawdown_pct": 0.20,
}Next Steps
- Run your first backtest — clone a template and see results in minutes
- Configure risk limits — understand every guardrail check
- Leaderboard scoring — how strategies are ranked