AllocFlow

Portfolio trading · Flow matching · Reinforcement learning

AllocFlow

End-to-End Portfolio Trading Action Generation from Raw Market Data

One model reads the raw price history of every asset and writes the whole portfolio at once.

1Nanyang Technological University 2Independent Researcher 3Stanford University 4Massachusetts Institute of Technology
* Equal contribution  ·  † Corresponding author

AllocFlow in two minutes

Overview

AllocFlow overview: frozen Kronos tokens, DiT-style flow head, imitation learning and Flow-GRPO refinement
(a) frozen Kronos tokens → cross-asset flow head generates the whole book · (b) imitation of a causal strategy · (c) Flow-GRPO on a 24 h portfolio reward with a frozen reference.
01 · READ

Compress each market

Kronos-base · frozen2 tokens / assetno price forecast
02 · GENERATE

Write the whole book

flow matching4 Euler stepsΣ w = 0
03 · REFINE

Imitate, then compete

imitationFlow-GRPO · G = 824 h Sharpe reward

At a glance

The whole book, in one decision.

51.4%
annualized net return
after 5 bps fees · up from 27.8% after imitation
12.8%
max drawdown
down from 29.1% after imitation
4.04
Calmar ratio
return ÷ max drawdown · 2.3× its teacher
4.90
Calmar on 2026 data
Jan–Jun 2026 · never seen · no retraining

Nov 2, 2024 – Dec 31, 2025 test period, mean over five training seeds. Backtests; not investment advice.

Why flow matching

Learn the distribution, not the average.

Good books come in clusters. Average them and you get a bad book; flow matching learns the whole distribution.

τ = 1.00
Policy
Euler steps
Show
Training
KL anchor β0.80

Exact flow-matching field for a 2-D mixture of book clusters. AllocFlow learns the same kind of field over all assets.

01
Straight lines, curved flow
u(z,τ) = 𝔼[a − ε | zτ = z]
average of straight paths → trajectories bend, never cross
02
One step = the average book
u(z,0) = 𝔼[a] − z
1 Euler step regresses to the mean · AllocFlow uses 4
03
Noise you can score
πθ(book) = ∏k 𝒩(zk+1 | μθ, σk²)
stochastic sampler → closed-form likelihood → GRPO over 8 books
04
Reward reweights
p* ∝ pIL(a) · er(a)/β
RL shifts mass between books imitation can already make

Results

After fees. Out of sample.

Hover the chart
training period out-of-sample (Nov 2024 – Dec 2025) rolling 365-day Sharpe (lower band)

One training run (seed 42), cumulative PnL in % of starting capital after costs; digitized from Figure 1 of the paper.

Main results · Nov 2024 – Dec 2025 · after fees
PolicyReturn % ↑Max drawdown % ↓Sharpe ↑Calmar ↑Daily turnover
AlphaGen35.4220.601.2421.7200.248
AlphaSAGE31.3023.361.3961.3401.255
R&D-Agent-Quant20.6918.530.9671.1170.397
AlphaAgent29.1226.931.0481.0810.651
AgenticAlpha (teacher)33.9219.571.4721.733—
AllocFlow (IL only)27.7929.100.9540.9551.143
AllocFlow (IL + RL)51.38±2.0412.81±1.512.192±0.0864.043±0.3791.976±0.047

Calmar ratio · higher is better

AlphaAgentLLM-agent alphas
1.08
R&D-Agent-QuantLLM-agent alphas
1.12
AlphaSAGEmined alphas
1.34
AlphaGenRL-mined alphas
1.72
AgenticAlphathe teacher
1.73
AllocFlowours
4.04
Longer out-of-sample test · same policy, no retraining
PeriodReturn %MDD %SharpeCalmar
Nov 2024 – Dec 202551.3812.812.1924.043
Jan – Jun 2026 (new)62.5312.772.064.90

20 months out of sample in total · 2026 run settles exchange funding

Analysis

Every piece matters.

Action head · Calmar after RL

A flow head turns rewards into gains.

Imitation · annual return

Imitation first is essential.

Encoder · Calmar after RL

Good features need the right head.

Optimizer · Calmar

Policy gradients beat backprop.

Teacher · Calmar IL → RL

RL improves every teacher.

Reward · Calmar

Sharpe gives the best balance.

Inside two decisions

RL changes direction before the turn.

Price and position ribbons for AUCTION and 1000PEPE around two turning points
Dashed: price turns · dotted: RL flips direction · blue/red = short/long.

AUCTION · falling peak

RL turns short 11 h before the peak · next 24 h: +0.76% vs −1.78% (imitation)

1000PEPE · rebound

RL turns long 11 h before the bottom · next 24 h: +1.29% vs −0.07% (imitation)

Abstract+

Real-world portfolio management requires converting noisy market observations into coordinated, simultaneous allocations across multiple assets under shared capital constraints. Advances in forecasting models and alpha discovery help identify opportunities. However, traditional pipelines often decouple signal forecasting from portfolio construction, potentially misaligning learning with allocation and execution objectives. We present AllocFlow, an end-to-end flow-matching framework that directly generates joint portfolio allocations from raw multi-asset market histories. To capture dependencies among portfolio positions, AllocFlow employs a cross-asset flow Transformer conditioned on temporal market representations to generate continuous, signed position weights across all instruments jointly. To address the sample inefficiency and instability of learning continuous allocation policies from scratch, we establish a two-stage training scheme: strategy-supervised imitation shapes a structured distribution of candidate portfolios, followed by group-relative reinforcement learning (RL) that refines joint decisions using portfolio-level financial rewards and a frozen policy reference. On hourly cryptocurrency perpetual futures, RL refinement raises the annualized net return of the imitation policy from 27.79% to 51.38% and its Calmar ratio from 0.955 to 4.043, surpassing the teacher strategy on every metric, and AllocFlow reaches a Calmar ratio of 4.90 on six further months of unseen 2026 data without retraining.

Citation

BibTeX

@article{wang2026allocflow,
  title   = {AllocFlow: End-to-End Portfolio Trading Action
             Generation from Raw Market Data},
  author  = {Annan Wang and Yuchen Xie and Yu Cen and
             Leon Liangyu Chen and Qianyu Julie Zhu and
             Xin Li and Tianyi Wei and Weisi Lin},
  journal = {arXiv preprint arXiv:2611.19937},
  year    = {2026}
}