FlowHFT: Imitation Learning via Flow Matching Policy for Optimal High-Frequency Trading under Diverse Market Conditions

ArXiv ID: 2505.05784 “View on arXiv”

Authors: Yang Li, Zhi Chen, Steve Yang

Abstract

High-frequency trading (HFT) is an investing strategy that continuously monitors market states and places bid and ask orders at millisecond speeds. Traditional HFT approaches fit models with historical data and assume that future market states follow similar patterns. This limits the effectiveness of any single model to the specific conditions it was trained for. Additionally, these models achieve optimal solutions only under specific market conditions, such as assumptions about stock price’s stochastic process, stable order flow, and the absence of sudden volatility. Real-world markets, however, are dynamic, diverse, and frequently volatile. To address these challenges, we propose the FlowHFT, a novel imitation learning framework based on flow matching policy. FlowHFT simultaneously learns strategies from numerous expert models, each proficient in particular market scenarios. As a result, our framework can adaptively adjust investment decisions according to the prevailing market state. Furthermore, FlowHFT incorporates a grid-search fine-tuning mechanism. This allows it to refine strategies and achieve superior performance even in complex or extreme market scenarios where expert strategies may be suboptimal. We test FlowHFT in multiple market environments. We first show that flow matching policy is applicable in stochastic market environments, thus enabling FlowHFT to learn trading strategies under different market conditions. Notably, our single framework consistently achieves performance superior to the best expert for each market condition.

Keywords: High-Frequency Trading (HFT), Imitation Learning, Flow Matching Policy, Stochastic Market Environments, Grid-Search Fine-tuning, Equities / Algorithmic Trading

Complexity vs Empirical Score

  • Math Complexity: 8.5/10
  • Empirical Rigor: 4.0/10
  • Quadrant: Lab Rats
  • Why: The paper relies heavily on advanced stochastic calculus, control theory, and flow matching neural networks with complex LaTeX equations, indicating high mathematical density. However, it lacks actual backtested results, code, or statistical metrics, describing only a theoretical framework with synthetic simulations rather than real-world implementation data.
  flowchart TD
    A["Research Goal: Develop robust HFT agent<br>adaptable to diverse market conditions"] --> B["Methodology: FlowHFT<br>Imitation Learning via Flow Matching"]
    B --> C{"Input Data"}
    C --> D["Historical Market Data<br>Simulated Stochastic Environments"]
    C --> E["Expert Trajectories<br>(Specialized strategies for specific conditions)"]
    B --> F["Flow Matching Policy<br>Learns continuous trajectory<br>distribution from experts"]
    F --> G["Grid-Search Fine-tuning<br>Refines strategy for extreme/volatile scenarios"]
    F & G --> H["Outcome: Adaptive HFT Framework"]
    H --> I["Performance: Single agent<br>outperforms best expert<br>across all tested conditions"]