Add futures depth matching and mod loader
This commit is contained in:
@@ -44,7 +44,7 @@ Parity gaps found by this pass and current closure state:
|
||||
|
||||
| Priority | Gap | RQAlpha capability | Current engine state | Next implementation |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| P0 | Futures intraday matching | Bar/tick matchers support futures orders through the same broker lifecycle, matching type, slippage, price limit, liquidity limit, volume limit, partial fill, and market-close rejection semantics. | Closed for daily/open/close and tick-price futures fills, including limit checks and partial quantity handling. Full multi-level order-book sweeping remains data-dependent and intentionally not faked from L1 data. | Add true depth sweeping only when production futures tick depth exists. |
|
||||
| P0 | Futures intraday matching | Bar/tick matchers support futures orders through the same broker lifecycle, matching type, slippage, price limit, liquidity limit, volume limit, partial fill, and market-close rejection semantics. | Closed for daily/open/close, tick-price futures fills, and true multi-level order-book sweeping when optional `order_book_depth` data exists. L1-only data still uses the existing L1 matcher and is not inflated into fake depth. | Extend depth fields only if production vendors expose more levels or exchange-specific fields. |
|
||||
| P0 | Futures open-order lifecycle | `SimulationBroker` keeps pending orders, supports `get_open_orders`, cancellation, before-trading activation, tick/bar rematching, and after-trading rejection. | Closed for futures pending limit orders, cross-day rematching, cancellation by id/symbol/all, and merged open-order runtime views. | Add more order status transitions only if UI requires RQAlpha's exact intermediate event names. |
|
||||
| P0 | Combined multi-account NAV | RQAlpha portfolio aggregates account values across stock/future accounts. | Closed. `DailyEquityPoint`, progress events, and metrics now use aggregate stock + futures initial cash and total equity. | None. |
|
||||
| P1 | Futures trading parameter data source | RQAlpha loads contract multiplier, margin ratios, commission type, open/close/close-today commission ratios, settlement/prev-settlement, tick size, listed/de-listed dates, and dominant contracts from data proxy. | Closed for engine-side trading-parameter ingestion/resolution via `futures_trading_parameters.csv` or component data. | Add more exchange metadata columns only when source data exposes them. |
|
||||
@@ -53,7 +53,7 @@ Parity gaps found by this pass and current closure state:
|
||||
| P1 | Frontend risk validators for futures | RQAlpha applies cash/margin, position closable, price-limit, trading-status, and self-trade validators before order submission. | Closed for zero quantity, invalid limit price, self-trade crossing risk, paused/no executable price, price-limit, margin, and close-position rejection diagnostics. | Add exchange-specific validators only as needed. |
|
||||
| P2 | RQData helper APIs | RQAlpha exposes `get_dividend`, `get_split`, `get_yield_curve`, `get_factor`, `get_margin_stocks`, `get_securities_margin`, `get_dominant_future`, and dominant futures price APIs. | Closed. These APIs are available through `DataSet` and `StrategyContext`; platform expressions also expose focused helpers such as `dividend_cash`, `factor_value`, `yield_curve`, `is_margin_stock`, `dominant_future`, and `dominant_future_price`. | Add more DSL aliases only when users need specific names. |
|
||||
| P2 | Analyzer/report parity | RQAlpha analyser can export richer trades, positions, benchmark, monthly returns, risk, and summary artifacts. | Closed for normalized trades, positions, monthly returns, risk summary, equity curve, benchmark series, metrics, and JSON report bundle via `BacktestResult::analyzer_report(_json)`. | UI/service download endpoints can serialize this report directly. |
|
||||
| P3 | Mod/config/plugin architecture | RQAlpha has pluggable mods, event bus extension points, and many config toggles. | Partially closed with a lightweight `BacktestProcessMod` interface on top of `ProcessEventBus`; this supports event-driven extensions without recreating RQAlpha's global mod loader. | Add concrete production mods/toggles as requirements appear. |
|
||||
| P3 | Mod/config/plugin architecture | RQAlpha has pluggable mods, event bus extension points, and many config toggles. | Closed for a lightweight engine-native model: `BacktestProcessMod`, `BacktestProcessModLoader`, enabled-name installation, and event-bus lifecycle hooks. It intentionally avoids RQAlpha's Python global mod loader. | Add concrete production mods/toggles as requirements appear. |
|
||||
|
||||
## Remaining Gaps
|
||||
|
||||
@@ -149,6 +149,7 @@ Parity gaps found by this pass and current closure state:
|
||||
- [x] futures trading-parameter data source and automatic cost/margin resolver
|
||||
- [x] futures settlement/prev-settlement data integration and settlement mode
|
||||
- [x] futures-aware submission validators and self-trade checks
|
||||
- [x] optional true multi-level futures order-book depth data and sweep matching
|
||||
|
||||
### Phase 10: Advanced data API parity
|
||||
|
||||
@@ -173,7 +174,9 @@ Parity gaps found by this pass and current closure state:
|
||||
|
||||
- [x] event-bus process listeners
|
||||
- [x] installable `BacktestProcessMod` extension hook
|
||||
- [ ] full RQAlpha-style global mod loader and plugin lifecycle
|
||||
- [x] `BacktestProcessModLoader` with enabled-name installation
|
||||
- [ ] Python RQAlpha-style global mod loader, intentionally out of scope unless
|
||||
we need Python plugin compatibility
|
||||
|
||||
## Execution Order
|
||||
|
||||
@@ -199,7 +202,7 @@ Parity gaps found by this pass and current closure state:
|
||||
## Current Step
|
||||
|
||||
Active implementation target: P0-P2 parity items are implemented in the engine
|
||||
core, and P3 now has a lightweight event-driven extension hook. Remaining
|
||||
core, and P3 now has a lightweight event-driven extension loader. Remaining
|
||||
future work should be driven by concrete production strategy or UI requirements,
|
||||
especially for data-dependent futures depth matching and exchange-specific
|
||||
validators.
|
||||
especially exchange-specific validators and optional vendor-specific depth
|
||||
fields.
|
||||
|
||||
Reference in New Issue
Block a user