Timing is important: Risk-aware Fund Allocation based on Time-Series Forecasting

Fuyuan Lyu, Linfeng Du, Yunpeng Weng, Qiufang Ying, Zhiyan Xu, Wen Zou, Haolun Wu, Xiuqiang He, Xing Tang · DOI

Abstract

Fund allocation has been an increasingly important problem in the financial domain. In reality, we aim to allocate the funds to buy certain assets within a certain future period. Naive solutions such as prediction-only or Predict-then-Optimize approaches suffer from goal mismatch. Additionally, the introduction of the SOTA time series forecasting model inevitably introduces additional uncertainty in the predicted result. To solve both problems mentioned above, we introduce a Risk-aware Time-Series Predict-and-Allocate (RTS-PnO) framework, which holds no prior assumption on the forecasting models. Such a framework contains three features: (i) end-to-end training with objective alignment measurement, (ii) adaptive forecasting uncertainty calibration, and (iii) agnostic towards forecasting models. The evaluation of RTS-PnO is conducted over both online and offline experiments. For offline experiments, eight datasets from three categories of financial applications are used: Currency, Stock, and Cryptos. RTS-PnO consistently outperforms other competitive baselines. The online experiment is conducted on the Cross-Border Payment business at FiT, Tencent, and an 8.4% decrease in regret is witnessed when compared with the product-line approach.

Introduction

In the financial world, "timing is everything." For instance, when a platform needs to acquire foreign currency for international payments over a 24-hour window, the objective is to execute trades when prices are lowest. Traditional approaches typically follow a two-step "Predict-then-Optimize" (PtO) pipeline: a model predicts future prices, and a solver subsequently determines the optimal allocation.

However, this decoupled approach introduces two significant challenges. First, there is a Goal Mismatch: forecasting models are traditionally trained to minimize Mean Squared Error (MSE), which may not correlate with the financial objective of minimizing total cost. An error at a price peak might be less costly than the same error at a price floor. Second, there is Uncertainty Blindness: state-of-the-art models often provide point predictions without quantifying confidence, potentially leading optimizers to over-allocate funds to volatile, high-error time slots.

RTS-PnO framework application in cross-border payment scenarios

Methodology: The RTS-PnO Framework

The proposed Risk-aware Time-Series Predict-and-Optimize (RTS-PnO) framework addresses these limitations through three core pillars:

1. End-to-End Training (PnO)

Instead of training the forecaster in isolation, RTS-PnO utilizes the SPO+ loss function. This allows the model to receive feedback from the optimization stage during training, effectively learning to prioritize accuracy at time steps that are most impactful for final decision-making.

2. Adaptive Uncertainty Calibration

The framework leverages Conformal Prediction to estimate "positional uncertainty." It generates a risk vector identifying future time slots most susceptible to high prediction errors. Crucially, as the model improves during training, these uncertainty estimates are updated dynamically.

Evolution of forecasting uncertainty across different datasets during training

3. Risk-Aware Constraints

These uncertainty estimates are integrated into the optimization solver as adaptive constraints. If a time slot is deemed too risky, the system limits the fund allocation for that period. This prevents the "lowest point trap," where naive models chase volatile price floors.

Experimental Evaluation

The researchers evaluated RTS-PnO across eight offline datasets (Forex, Stocks, and Cryptocurrency) and a high-stakes online environment at Tencent.

Key Insights

  • MSE vs. Regret: The study confirms that lower MSE does not always translate to better financial outcomes. Models trained with decision-aware objectives can outperform more "accurate" models in terms of cost reduction.
  • Dynamic Risk Management: Unlike static risk models, RTS-PnO updates its constraints every epoch. As shown in the uncertainty analysis, the L1-norm generally decreases as training progresses, allowing the optimizer to become less conservative over time.

Results

  • Offline Performance: RTS-PnO consistently achieved the best average rank across all datasets. Notably, it improved relative regret by 12.79% on the USD2CNY dataset.
  • Online Impact: In a live deployment for Tencent’s cross-border payment business (WeChat Pay), the framework reduced average regret by 8.4% compared to the existing production approach.

Conclusion and Future Work

RTS-PnO demonstrates that aligning forecasting objectives with decision-making and incorporating adaptive uncertainty can significantly improve fund allocation efficiency. While the framework is model-agnostic, it does introduce higher inference latency due to the requirement of solving optimization problems at runtime. Future research will focus on extending the framework to multivariate time series and improving solver efficiency for lower-latency applications.

Summary updated

BibTeX
@inproceedings{lyu2025timing,
  author = {Fuyuan Lyu and Linfeng Du and Yunpeng Weng and Qiufang Ying and Zhiyan Xu and Wen Zou and Haolun Wu and Xiuqiang He and Xing Tang},
  title = {{Timing is important: Risk-aware Fund Allocation based on Time-Series Forecasting}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2025},
  doi = {10.1145/3711896.3737268},
}
Figure