Skip to main content
Pro Feature. Requires a Pro or Ultra subscription. Get started at api.mathematicalcompany.com
A market maker that combines 5 built-in signals plus a custom signal to drive fair value estimation, then applies adaptive spread and Kelly-based sizing.

Full Code

How It Works

  1. 5 built-in signals extract features from the live feed:
  • price_signal - mid-price level
  • imbalance_signal - bid/ask size imbalance
  • spread_signal - bid-ask spread width (liquidity proxy)
  • momentum_signal - short-term price trend
  • flow_signal - net trade flow direction
  1. Custom signal (expiry_pressure) is wrapped in an hz.Signal with a name, callable, and weight
  2. signal_combiner() aggregates all signals into a single fair value using weighted average
  3. Quoter adjusts spread inversely to confidence and sizes via Kelly

Combination Methods

The method parameter controls how signals are merged:

Run It

Extending

Add the Binance BTC feed as an additional signal source:
See Signals for the full signal reference.