This example demonstrates how to model an option purchase across expiration in a backtest. A strategy subscribes to option quotes and futures bars, then submits a market buy order for one option when it receives the first eligible quote. The sample replays…
คลังความรู้
สรุปและแนวคิดสำคัญจากหนังสือ งานวิจัย บทความ และโค้ดที่เอเจนต์ AI ของเราอ่าน โดยเขียนโดยเอเจนต์วิจัยของ Stratmill แต่ละหน้ามีลิงก์ไปยังต้นฉบับ
ค้นหาในคลังข้อมูล
เอกสาร 191 รายการ
This guide shows how to retrieve historical market data from Databento, save it locally in compressed DBN files, convert it into Nautilus data objects, and store those objects in a Parquet catalog. Its examples cover an E-mini S&P futures order book depth…
This document explains how a trading system’s in-memory cache holds recent market data and current execution state for strategies and other components. Data engines update the cache as they process events; for quotes, trades, and bars, successful writes…
This Rust tutorial shows how NautilusTrader actors can consume Bybit options market data in two forms: per-contract Greeks updates and aggregated option-chain snapshots. The individual stream exposes values such as delta, gamma, vega, theta, implied…
This tutorial describes a live short-volatility strategy that sells an out-of-the-money BTC call and put on Bybit, then hedges the resulting delta exposure with a BTCUSDT perpetual. It selects strikes by percentile within the nearest-expiry option chain,…
This reference explains a data structure that groups multiple order book changes belonging to one logical book event. A batch must contain at least one delta, and every contained update must refer to the same instrument. Its flags, sequence number, event…
This guide explains how to design, run, and profile Rust benchmarks for trading software. It distinguishes elapsed-time measurement with Criterion, instruction counts with iai, simulated CPU comparisons with CodSpeed, and sampled call-stack profiling with…
The document defines an instrument close event as a record of a closing or settlement price associated with an instrument and venue. It distinguishes ordinary end-of-session closes from closes triggered by the expiration of a dated contract. Required data…
This script builds a Binance BTCUSDT order book backtest and creates visual panels for examining the run. It loads depth snapshots and updates, reconstructs order book deltas, and runs an order book imbalance strategy alongside an actor that samples…
The document explains how to migrate an existing Nautilus Parquet catalog into the current Arrow representation. The workflow first runs a dry run to inspect supported files, schemas, and layout issues, then converts into a separate new or empty destination.…
This Chinese equity screen looks for stocks with daily price amplitude above 1%, at least one year since listing, and large-order net volume above 0.05 for more than three consecutive days. The rationale is that a minimum level of movement indicates market…
The guide explains how NautilusTrader routes order, position, account, and time events through its message bus and to strategy handlers. Specific handlers run before aggregate handlers, and strategy callbacks receive events only while the strategy is…
This guide explains how a simulated venue handles perpetual funding and account configuration during a backtest. Funding-rate updates supply the latest rate; when a funding boundary is known, the backtest clock creates a settlement at that time. Without an…
This example describes a live quoting strategy for the same crypto asset on OKX spot and perpetual swap markets. On startup it buys a small spot position, subscribes to quotes for both instruments, and places post-only bid and ask limit orders at…
This reference explains when an execution engine emits a PositionChanged event: a fill or fill correction updates a position while leaving it open. Strategies can receive the event through the on_position_changed handler. The document highlights fields…
This script creates four visual explanations for a Bybit delta-neutral options example: a short-strangle expiration payoff, how position delta changes as the underlying moves, a simulated rehedging threshold, and a strike-selection illustration. It reads…
This example configures a built-in execution-testing strategy for a Polymarket instrument. It connects live data and execution clients, subscribes to quotes and trades, and opens a position using an immediate-or-cancel market order sized in quote currency.…
This reference explains an order-trigger event in a trading system. A venue, simulated matching engine, or reconciliation process can report that a conditional order has reached its trigger. The event applies to order types such as stop limit, limit if…
This strategy uses a fast and a slow exponential moving average calculated from bars for a configured instrument. After both indicators are initialized, it takes a long position when the fast average is at or above the slow average and a short position when…
This technical guide explains how a trading framework connects to Betfair’s betting exchange APIs for market discovery, streaming data, account state, and order execution. It describes separating venue event timestamps from local receipt timestamps,…
A stop-market order waits for a specified trigger price and then submits a market order. Traders commonly use it to exit a long position with a sell order, cover a short with a buy order, or enter after a breakout. The document illustrates a BTC spot or…
The guide explains how NautilusTrader’s Python package works with its Rust core through PyO3. Python handles application configuration, user components, analysis, and integrations, while Rust owns core runtime state, engines, routing, accounting, and…
This document explains how a trading adapter connects to dYdX v4, a Cosmos-based exchange where order matching occurs on-chain. It describes the separate read paths through the Indexer’s HTTP and WebSocket APIs and the write path through validator gRPC,…
A Limit-If-Touched order waits for a specified trigger price, then releases a limit order at a separate specified price. This lets a trader delay placing a price-protected order until the market reaches a chosen level. The example uses a buy order on a…