3.9 KiB
3.9 KiB
RQAlpha Gap Roadmap
This document tracks the remaining RQAlpha backtest capabilities that are not
yet fully aligned in fidc-backtest-engine, and the implementation order we
are following.
Scope
This roadmap focuses on the China A-share stock backtest path first. Multi-asset coverage such as futures/options is tracked separately and is not part of the current alignment pass.
Remaining Gaps
Phase 1: Strategy API parity
order_to/ target-shares style explicit order primitiveorder_target_portfolio(_smart)style public API surface- richer explicit order styles exposed to platform scripts
Phase 2: Scheduling and execution surface
- minute-level
time_rulesemantics likemarket_open,market_close,physical_time - finer
1m/tickstrategy execution entrypoints beyondopen_auctionandon_day - scheduled actions evaluated against explicit intraday times
Phase 3: Universe and subscription model
update_universesubscribeunsubscribe- tick-frequency subscription guards exposed at strategy API level
Phase 4: Algo order parity
VWAPOrderfirst-class explicit action parity (order.vwap_value/percent)TWAPOrderfirst-class explicit action parity (order.twap_value/percent)order_target_portfolio_smart(..., order_prices=AlgoOrder, valuation_prices=...)
Phase 5: Position accounting parity
trading_pnlposition_pnldividend_receivable- richer position lifecycle fields exposed to strategy runtime
- RQAlpha-style stock position aliases (
order_book_id,avg_price,sellable,closable,equity,position_prev_close)
Phase 6: Strategy data API parity
history_barsnumeric helper for daily, intraday, and tick fieldscurrent_snapshotinstrument/instruments/all_instrumentsget_trading_dates/get_previous_trading_date/get_next_trading_date- phase-aware minute/tick history cursor semantics matching the active bar or tick callback
Phase 7: Remaining stock data-source API parity
is_suspendedis_st_stockget_pricestyle date-range tabular APIactive_instrumentsinstruments_history
Phase 8: Order object API parity
- open-order status and unfilled quantity exposed to strategy runtime
- final order object lookup by order id
- order average fill price and transaction cost aggregation
Phase 9: Account / portfolio API parity
- stock-account runtime view (
ctx.account()/ctx.portfolio_view()) cash,available_cash,frozen_cash,market_value,total_valueexposed to strategy runtime and DSLunit_net_value,static_unit_net_value,daily_pnl,daily_returns,total_returns,transaction_cost,trading_pnl, andposition_pnlexposed to strategy runtime and DSL- explicit deposit / withdraw API
- financing liability / repay API
- management-fee rate and callback parity
- stock account map/accessor surface (
accounts,stock_account,account_by_type("STOCK")) - full futures account, margin, and short-position execution model
Execution Order
- Close the explicit order API gap with target-shares /
order_toparity. - Add public batch target-portfolio semantics.
- Expand scheduler to intraday time rules.
- Add dynamic universe APIs.
- Add algo-order styles.
- Finish position accounting parity.
- Continue stock data-source API parity.
- Continue order object API parity.
- Continue account / portfolio API parity.
Current Step
Active implementation target: continue account parity after exposing the stock account runtime view, core Portfolio fields, deposit/withdraw, financing liability APIs, management-fee callbacks, and stock account accessors; next gap is the full futures account, margin, and short-position execution model.