Skip to main content
Ultra Feature. Requires an Ultra subscription. Get started at api.mathematicalcompany.com

Synthetic Index

There is no S&P 500 for prediction markets. Horizon’s index module lets you build one. Combine multiple markets into a weighted index, track rebalancing drift, and detect arbitrage between the index level and its components. All math is in Rust.

Overview

Index Construction

hz.compute_index_level() computes a weighted index from component prices.

Weighting Methods

Equal, inverse-vol, liquidity, or custom weight schemes.

Rebalancing

hz.rebalance_weights() calculates drift and rebalance actions.

Index Arbitrage

hz.index_arb_signal() detects deviations between index and components.

Core Functions

hz.compute_index_level

Compute a weighted index level from component prices.

hz.compute_weights_equal / inverse_vol / liquidity

hz.rebalance_weights

Calculate delta between current and target weights.

hz.index_tracking_error

Tracking error between a portfolio and an index.

hz.index_arb_signal

Detect deviation between the index level and its fair value from components.

Pipeline Functions

hz.index

Compute and track a synthetic index level each cycle.

hz.track_index

Track index weights and signal when rebalancing is needed.

hz.index_arb

Detect arbitrage opportunities between the index and its components.

Examples

Custom Prediction Market Index

Index Arbitrage Strategy