AllocFlow: End-to-End Portfolio Trading Action Generation from Raw Market Data
Annan Wang, Yuchen Xie, Yu Cen, Leon Liangyu Chen, Qianyu Julie Zhu, Xin Li, et al.
arXiv:2611.19937v1If you think about what a trading system really has to do, this paper is aimed at a very practical gap: turning noisy market history into a coordinated portfolio decision, not just a prediction. In real portfolio management, the hard part is often not finding one more accurate forecast. It is deciding how to allocate capital across many assets at once, under shared risk, transaction costs, and the fact that every position interacts with every other position. A good signal can still lead to a bad trade if the sizing is wrong, if exposures overlap, or if the overall book becomes too risky. And in markets like crypto perpetual futures, where long and short positions are both available and trading is continuous, those joint allocation decisions matter even more. That is the problem AllocFlow is trying to solve. The authors argue that a lot of modern trading research still breaks the workflow into separate pieces: forecast first, then convert that forecast into positions with some optimizer or hand-designed rule. That separation can create a mismatch between what the model learns and what the portfolio actually needs. So instead of predicting alpha and then handing it off to a portfolio constructor, AllocFlow learns to map raw market histories directly into executable target weights for the whole portfolio. To understand why this is interesting, it helps to place it in the broader landscape. Financial machine learning has made real progress in representation learning, forecasting, and alpha discovery. We now have models that can compress price history into reusable embeddings, and agents that search for predictive signals. Reinforcement learning has also been used in trading for a long time because, in principle, it can optimize the thing we care about directly: realized portfolio performance after costs. But RL in finance is notoriously difficult. The reward is noisy, the action space is continuous and high-dimensional, and the policy has to learn not just direction but also coordination across assets. Pure exploration from scratch is usually unstable, especially when the action is a full portfolio rather than a single buy-or-sell decision. AllocFlow’s core idea is to treat portfolio construction as a generative action problem. The model takes in raw hourly OHLCV histories for all eligible assets at a given time, compresses those histories with a frozen financial foundation model, and then uses a cross-asset flow Transformer to generate the entire vector of signed position weights jointly. Positive weights mean long positions, negative weights mean short positions, and the book is designed as a whole rather than asset by asset. That joint generation is important because a portfolio is not just a set of independent bets; the value of each position depends on the others, on neutrality, and on the total exposure of the book. The architecture is built around a frozen encoder, Kronos, which was originally pretrained for next-bar prediction from tokenized OHLCV sequences. AllocFlow does not use Kronos as a forecaster. It uses Kronos only as a market representation engine. For each asset, it extracts temporal features from the recent history, mean-pools the last few steps, and produces tokens that summarize the asset context. These asset tokens are then interleaved and combined with a shared market token before being passed into a flow-matching action head. The flow head is what generates the portfolio weights. In other words, the encoder understands the market, while the action module learns how to translate that understanding into a coordinated allocation. The choice of flow matching is also deliberate. A portfolio is a continuous vector of weights, and the policy should be able to sample complete books, not just perturb one coordinate at a time. The authors argue that this helps in three ways. First, the action is naturally a joint distribution over a whole book. Second, reinforcement learning refinement works better when it can compare coherent candidate portfolios. Third, the flow formulation gives a stochastic generative policy that can be optimized with group-relative reinforcement learning. Inference uses only a few Euler steps, so the model is still practical as a trading policy. A key design choice is the two-stage training recipe. The authors say that if you try to learn the whole portfolio policy directly from financial rewards, the search problem is too hard. So they start with imitation learning. The action head is first trained to imitate a teacher strategy called AgenticAlpha, which aggregates signals mined from earlier alpha discovery systems. This is not treated as a perfect oracle or a hindsight-optimal portfolio. It is simply a source of plausible trading structure: direction, relative preference, and rough sizing. That gives the policy a coherent starting point in action space. Then comes the reinforcement learning stage. Here the policy is refined using portfolio-level financial rewards, but with a frozen reference policy to stabilize the updates. The paper describes this as group-relative RL: candidate portfolios are compared under the same market conditions, and the policy is pushed toward better realized outcomes. The point is not to imitate the teacher forever, but to use imitation to build a useful distribution of candidate books and then let reward optimization improve on it. This is an important distinction, because the teacher’s standalone performance is not the final target. The final target is the trading account’s realized return and risk profile. The experiments focus on hourly cryptocurrency perpetual futures, which is a sensible testbed for this kind of system. Crypto perpetuals are liquid, trade around the clock, and allow both long and short positions with the same fee structure. The universe is also weekly rotating, which makes the allocation problem dynamic rather than static. The main evaluation covers 14 months, and the paper also reports performance on six additional months of unseen 2026 data without retraining. The headline result is that the two-stage training matters a lot. After imitation learning alone, the policy already has a usable portfolio behavior. But after RL refinement, annualized net return rises from 27.79% to 51.38%, Sharpe ratio rises from 0.954 to 2.192, and Calmar ratio rises from 0.955 to 4.043. Those are substantial improvements, especially the Calmar ratio, which is a useful way to think about return relative to maximum drawdown. In plain terms, the refined policy is not just making more money on average; it is doing so with much better drawdown control. The paper also says that the refined AllocFlow surpasses its teacher on every metric. The out-of-sample result is also notable: on six further months of 2026 data, without any retraining, AllocFlow reaches a Calmar ratio of 4.90. That suggests the learned allocation behavior is not just overfit to the original training window. It is still performing well on later unseen data. The ablations are especially informative because they show what actually matters. Under the same RL objective, a parameter-matched Gaussian policy performs much worse, reaching a Calmar of at most 1.92. Direct differentiable optimization of the same reward does even worse, at most 1.74. And RL from a randomly initialized head loses about 75% per year. That tells us the gains are not simply from having more parameters or a better optimizer. They come from the specific combination of a structured flow-based action generator, imitation-based initialization, and reward refinement with a frozen reference. The paper also reports that replacing the action head, encoder, teacher, or reward, or removing imitation, each lowers Calmar. So the design appears to be complementary rather than redundant. What should we take away from that? First, the paper supports a broader point in trading research: representation learning alone is not enough, and forecasting alone is not enough. The value is in how the model translates information into an executable book. Second, continuous generative policies are a promising fit for portfolio construction because they can model entire allocation vectors rather than isolated actions. Third, in noisy financial settings, some form of structured initialization seems crucial. Imitation does not need to be the final objective, but it can make reinforcement learning much more effective by giving it a sensible region of the action space to search. There are also some limitations and cautions. The paper is focused on cryptocurrency perpetual futures, so we should be careful about generalizing directly to equities, futures with different cost structures, or less liquid markets. The encoder is frozen, which is useful for stability and efficiency, but it also means the system depends on the quality and relevance of that pretrained representation. The action policy is evaluated in a fixed-notional ledger with dollar neutrality imposed, but the paper notes that dollar neutrality alone does not guarantee beta neutrality or bounded risk. So even though the Calmar results are strong, real deployment would still need careful attention to execution, slippage, leverage, and market impact. And as with any RL trading system, the possibility of regime dependence remains: a policy that works well over one period may not behave identically in a different market structure. Still, the main contribution is clear. AllocFlow is not trying to forecast a single next move. It is trying to generate the whole portfolio action directly from market history, then improve that action with reward feedback. For researchers in quant trading, that makes it a useful example of how generative modeling and portfolio RL can be combined in a way that is closer to the real decision problem faced by a trading desk.
Other candidates that day
Previous AI trading papers