AllocFlow: End-to-End Portfolio Trading Action Generation from Raw Market Data
Organizations: Nanyang Technological University · Independent Researcher · Stanford University · Massachusetts Institute of Technology
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 to and its Calmar ratio from to , surpassing the teacher strategy on every metric, and AllocFlow reaches a Calmar ratio of on six further months of unseen 2026 data without retraining.
Figures & tables
| Policy | Return | MDD | Sharpe | Calmar | TO |
|---|---|---|---|---|---|
| AlphaGen [ 55 ] | 35.42 | 20.60 | 1.242 | 1.720 | 0.248 |
| AlphaSAGE [ 6 ] | 31.30 | 23.36 | 1.396 | 1.340 | 1.255 |
| R&D-Agent-Quant [ 25 ] | 20.69 | 18.53 | 0.967 | 1.117 | 0.397 |
| AlphaAgent [ 51 ] | 29.12 | 26.93 | 1.048 | 1.081 | 0.651 |
| AllocFlow (IL) | 27.79 | 29.10 | 0.954 | 0.955 | 1.143 |
| AllocFlow (RL) | 51.38 2.04 | 12.81 1.51 | 2.192 0.086 | 4.043 0.379 | 1.976 0.047 |
| After IL | After RL | |||||
| Head | Return (%) | Sharpe | Calmar | Return (%) | Sharpe | Calmar |
| Flow Transformer | 27.79 | 0.954 | 0.955 | 51.38 | 2.192 | 4.043 |
| MLP | 27.31 | 0.935 | 0.912 | 20.12 | 0.856 | 1.307 |
| One-pass Transformer | 27.78 | 0.949 | 0.878 | 20.85 | 0.786 | 0.960 |
| Autoregressive | NT | |||||
| Training reward | Return | MDD | Sharpe | Calmar | TO |
|---|---|---|---|---|---|
| IL initialization | 27.79 | 29.10 | 0.954 | 0.955 | 1.143 |
| Sharpe | 51.38 | 12.81 | 2.192 | 4.043 | 1.976 |
| Cumulative return | 60.62 | 16.79 | 2.150 | 3.611 | 1.658 |
| Mean return | 58.36 | 17.19 | 2.051 | 3.395 | 1.613 |
| Risk-adjusted return | 28.60 | 2.070 |
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
| Source | Alpha expression | Weight |
|---|---|---|
| AlphaGen | Ref(Greater($vwap,-2.0),1d) | |
| AlphaGen | WMA(Greater(Div(-5.0,Std(Greater($low,-0.5),48d)),-0.01),12d) | |
| AlphaGen | Log($vwap) | |
| AlphaGen | Less(2.0,Greater(Less(Greater(vwap,-2.0)),1.0),$open)) | |
| AlphaGen | Sub(volume),0.01),1d)) | |
| AlphaSAGE | Div(Pow(Less(high),$volume) |
| Policy | Return | MDD | Sharpe | Calmar |
|---|---|---|---|---|
| AgenticAlpha (teacher) | 33.92 | 19.57 | 1.472 | 1.733 |
| AllocFlow after IL | 27.79 | 29.10 | 0.954 | 0.955 |
| AllocFlow after IL + Flow-GRPO | 51.38 2.04 | 12.81 1.51 | 2.192 0.086 | 4.043 0.379 |
| Training objective | MDD | Sharpe | Calmar | TO |
|---|---|---|---|---|
| AllocFlow (gross-normalized Sharpe) | 12.81 | 2.192 | 4.043 | 1.976 |
| Sharpe scaled by gross exposure | 18.1 | 1.76 | 2.76 | 2.07 |
| Sharpe after fees | 26.0 | 1.37 | 1.98 | 1.30 |
| Closed loop with holdings input | 11.9 | 2.15 | 4.59 | 1.38 |
| Component | Recorded setting |
|---|---|
| Market cadence / universe | Hourly; dynamic top 20; weekly reconstitution |
| Backbone | Frozen Kronos-base with its base tokenizer |
| Main flow head | 32 layers; 32 attention heads; head dimension 48; about 1.03B parameters |
| IL dropout / time sampling | 0.2; , ; 1,000 time buckets |
| Action scale / execution grid | ; grid 0.1 allocation units for notional 10 |
| IL auxiliary coefficients | Score 1.0; weight 0.5; ranking 0.05; gross 0.1 |
| Out-of-sample period | Return | MDD | Sharpe | Calmar |
|---|---|---|---|---|
| Nov 2024–Dec 2025 (Table 1 ) | 51.38 2.04 | 12.81 1.51 | 2.192 0.086 | 4.043 0.379 |
| Jan–Jun 2026 (new) | 62.53 | 12.77 | 2.06 | 4.90 |
| Venue | Type | Taker | Maker |
|---|---|---|---|
| Binance USD-M | CEX | 5.0 | 2.0 |
| OKX | CEX | 5.0 | 2.0 |
| Hyperliquid | DEX | 4.5 | 1.5 |
| Coinbase International | CEX | 4.0 | 2.0 |
| Method | Return | MDD | Sharpe |
|---|---|---|---|
| MARS [ 7 ] | 25.9 | 52.3 | 0.50 |
| DeepAries [ 22 ] | 89.1 | ||
| ReCAP [ 39 ] | 409.5 | ||
| DDPG [ 26 ] | 83.9 | ||
| PPO [ 44 ] | 106.3 | ||
| A2C [ 34 ] | 129.2 |
| Setting | Learning rate | Reward weight | Anchor weight | Calmar | Sharpe | TO |
|---|---|---|---|---|---|---|
| IL start | – | – | – | 0.955 | 0.954 | 1.143 |
| DRaFT 1 | 0.1 | 1.0 | 1.14 | 1.07 | 1.17 | |
| DRaFT 2 | 1.0 | 1.0 | 1.04 | 0.87 | 3.59 | |
| DRaFT 3 | 0.1 | 1.0 | 1.74 | 1.41 | 1.19 | |
| DRaFT 4 | 1.0 | 0.1 | 0.95 | 0.80 | 4.50 | |
| Flow-GRPO (ours) | – | – | – | 4.043 | 2.192 | 1.976 |
| Term | Definition |
|---|---|
| Bar | Market data aggregated over one fixed time interval; AllocFlow uses 1-hour bars. |
| OHLCV | The open, high, low, and close prices and the traded volume within a bar. |
| Kronos | A financial foundation model [ 46 ] pretrained to predict the next bar from tokenized OHLCV sequences; AllocFlow keeps it frozen and uses its hidden states as features. |
| Perpetual future | A futures contract without expiry that can be held long or short; holders of long and short positions exchange periodic funding payments. |
| Long-short target book | The signed weights over the eligible assets that the policy outputs every hour; positive weights are long positions and negative weights are short positions. |
| Gross exposure | The sum of absolute weights, . |