Equity Trading
Horizon supports equities as a first-class asset class. The same engine, risk pipeline, feed system, and persistence layer work for stocks — the only differences areSide.Long instead of Side.Yes/Side.No, and price ranges that aren’t limited to 0-1.
Quick Start
What’s Different from Prediction Markets
| Prediction Markets | Equities | |
|---|---|---|
| Side | Side.Yes / Side.No | Side.Long |
| Price range | 0.01 - 0.99 | 0.01 - 100,000 |
| Risk preset | Risk() | Risk.equity() |
| Token IDs | Yes (Polymarket) | None |
| Exchanges | Polymarket, Kalshi, Limitless | Alpaca, IBKR |
| Discovery | discover_markets("polymarket", ...) | discover_markets("alpaca", ...) |
Side.Long
Equities don’t have Yes/No outcomes. TheSide.Long variant represents a directional position:
Side.Long the same way they handle Side.Yes — buy increases position, sell decreases it.
Risk Configuration
Risk.equity() provides defaults appropriate for stock trading:
Risk() is price_max. Prediction market prices are bounded 0-1; stock prices aren’t. The Rust risk pipeline uses price_min/price_max from the config, so the same validation code works for both.
Market Discovery
Find stocks via Alpaca or IBKR:CLI Discovery
Market Object
Equity markets use optional fields for asset class metadata:| Field | Used For | Example |
|---|---|---|
asset_class | Instrument type | "equity", "option", "crypto" |
underlying | Derivatives | "AAPL" for an AAPL option |
strike_price | Options | 150.0 |
option_type | Options | "call" or "put" |
multiplier | Contracts | 100.0 for US equity options |
None. Prediction markets ignore them.
Feeds
Alpaca provides real-time equity data via WebSocket:{feed_name}:{SYMBOL}:
CLI Tools
Theequity CLI group provides market data tools:
UNUSUAL_WHALES_API_KEY is set.
Multi-Asset Strategies
Combine prediction markets and equities in one strategy:market.exchange. The engine tracks positions and P&L across all exchanges in a single book.
What Works the Same
These features work identically for equities and prediction markets:- Pipeline composition: chain functions, automatic signature introspection
- Risk pipeline: all 8 checks (kill switch, price/size, position, notional, drawdown, rate limit, dedup)
- Order management: submit, cancel, amend, bracket orders, stop-loss, take-profit
- Position tracking: real-time P&L, exposure calculations
- Persistence: SQLite crash recovery, fill journal, position snapshots
- Monitoring: Prometheus metrics, alerts, TUI dashboard
- Backtesting:
hz.backtest()with the same pipeline - Autonomous fund: FundManager, strategy lifecycle, oversight loop