Documentation
Skip to content

Book Guide

Explore strategy deployment, broker integration, and risk controls in the companion notebooks for Machine Learning for Trading, Third Edition. The examples below either use Live directly or explain related methods, with links to the corresponding library guides.

The Alpaca and IB notebooks use experimental feeds. Their broker adapters have a separate stable paper contract.

Run and control a Live strategy

The crypto funding loop trains on Binance-derived perpetual data, observes OKX funding and bars, and maps a subset to Alpaca USD spot crypto for paper execution. The venues and instruments differ; its paper orders do not reproduce a perpetual-futures backtest. The notebook needs its case-study artifacts and outbound data access, and paper submission needs credentials and explicit operator opt-in. The synthetic shadow quickstart is the local first run.

Learn the methods before deployment

The case-study files use research data, model artifacts, and their own simulation assumptions. LiveEngine needs a feed, venue capability check, broker account state, and explicit LiveRiskConfig. Do not treat a research result as a qualified paper or live run.

Find the public interface

  • Run lifecycle callbacks with LiveEngine and ThreadSafeBrokerWrapper: Backtest to Live.
  • Limit and audit orders with LiveRiskConfig, SafeBroker, RiskState, and VirtualPortfolio: Risk Controls.
  • Connect IBBroker or AlpacaBroker: Brokers.
  • Choose OKXFundingFeed, BarAggregator, or an experimental provider feed: Data Feeds.
  • Inspect or restart with LiveEngine.runtime_status and SafeBroker.reconciliation_report: Operator Guide.

See the API Reference for functions, classes, and options.