A Smart Trader for Portfolio Management based on Normalizing Flows

Mengyuan Yang, Xiaolin Zheng, Qianqiao Liang, Bing Han, Mengying ZhuIJCAI 2022 · OpenReview

Abstract

In this paper, we study a new kind of portfolio problem, named trading point aware portfolio optimization (TPPO), which aims to obtain excess intraday profit by deciding the portfolio weights and their trading points simultaneously based on microscopic information. However, a strategy for the TPPO problem faces two challenging problems, i.e., modeling the ever-changing and irregular microscopic stock price time series and deciding the scattering candidate trading points. To address these problems, we propose a novel TPPO strategy named STrader based on normalizing flows. STrader is not only promising in reversibly transforming the geometric Brownian motion process to the unobservable and complicated stochastic process of the microscopic stock price time series for modeling such series, but also has the ability to earn excess intraday profit by capturing the appropriate trading points of the portfolio. Extensive experiments conducted on three public datasets demonstrate STrader's superiority over the state-of-the-art portfolio strategies.

1. Introduction

Traditional automated portfolio management systems typically operate at a "macroscopic" level, utilizing daily opening and closing prices to determine asset allocations. However, this approach overlooks significant intraday price fluctuations. A stock may conclude a trading day with a net gain, yet it likely experienced multiple "dips" that presented superior buying opportunities.

This research introduces the Trading Point Aware Portfolio Optimization (TPPO) problem, which requires a strategy to navigate two primary challenges:

  1. Modeling Microscopic Dynamics (CH1): Intraday price data is inherently noisy and irregular, governed by complex, unobservable distributions that change constantly.
  2. Identifying Scattered Opportunities (CH2): Optimal trading moments are often fleeting and scattered throughout the day. A robust system must identify a ranked list of candidate trading minutes to account for real-world execution constraints like liquidity or network latency.
Figure 2: Visualization of target actions and identified near-optimal trading points (TPs) for stock pairs across different trading days.

2. Methodology: The STrader Framework

To address the TPPO problem, the researchers developed STrader, a reinforcement learning (RL) framework centered on a novel architecture called Stochastic Process Flows (SPF).

2.1 Stochastic Process Flows (SPF)

The SPF module handles the modeling of microscopic price series through a Micro-Encoder and Micro-Decoder. Instead of direct price prediction, the Micro-Encoder uses Normalizing Flows to map messy, real-world price data into a well-behaved Geometric Brownian Motion (GBM) process. This reversible transformation allows the model to capture underlying dynamics while smoothing out noise. The Micro-Decoder then reverses this flow to extrapolate continuous-time price series for the upcoming day, identifying potential intraday highs and lows.

2.2 Portfolio Decision Making (PDM)

The PDM component consists of two specialized networks:

  • Weight Generating Network (WGN): Employs a Graph Attention Network (GAT) to analyze stock correlations via a covariance matrix, determining the overall portfolio composition.
  • Trading Points Generating Network (TPGN): Ranks every minute of the trading day based on its potential as an optimal trading point. By selecting the top K candidates, STrader ensures strategy robustness even if specific trades fail to execute.
Figure 4: Comprehensive overview of STrader's performance, showing (a) identified selling/buying points for specific stocks and (b) the modeled price distributions over time.

3. Experimental Evaluation

STrader was evaluated against six state-of-the-art baselines (including EIIE and PPN) using three diverse datasets: DJIA (US Market), SSE (China Market), and COIN (Cryptocurrency).

3.1 Key Results

  • Profitability: STrader consistently achieved the highest Cumulative Wealth (CW) and Annualized Percentage Yield (APY). It demonstrated a 7.5% improvement in CW and a 72.5% improvement in APY over the best-performing baselines.
  • Risk Management: The strategy maintained competitive Maximum Drawdown (MD) levels, indicating that its high returns are a result of smarter trading rather than excessive risk-taking.
  • Ablation Studies: Removing either the SPF architecture or the Trading Point (TP) awareness led to significant performance degradation, confirming the necessity of both microscopic modeling and timing-aware logic.

4. Discussion and Conclusion

A key innovation of STrader is the application of Normalizing Flows to finance, treating the market as a continuous stochastic process that can be "warped" into a simpler form for calculation. Furthermore, the "near-optimal" ranking mechanism provides a practical solution for real-world execution.

Despite its success, the authors note that incorporating "macroscopic" signals (e.g., news sentiment) and better modeling of "overnight gaps"—the price jumps between market close and open—remain important areas for future research.

Summary updated

Abstract

In this paper, we study a new kind of portfolio problem, named trading point aware portfolio optimization (TPPO), which aims to obtain excess intraday profit by deciding the portfolio weights and their trading points simultaneously based on microscopic information. However, a strategy for the TPPO problem faces two challenging problems, i.e., modeling the ever-changing and irregular microscopic stock price time series and deciding the scattering candidate trading points. To address these problems, we propose a novel TPPO strategy named STrader based on normalizing flows. STrader is not only promising in reversibly transforming the geometric Brownian motion process to the unobservable and complicated stochastic process of the microscopic stock price time series for modeling such series, but also has the ability to earn excess intraday profit by capturing the appropriate trading points of the portfolio. Extensive experiments conducted on three public datasets demonstrate STrader's superiority over the state-of-the-art portfolio strategies.
BibTeX
@inproceedings{yang2022smart,
  author = {Mengyuan Yang and Xiaolin Zheng and Qianqiao Liang and Bing Han and Mengying Zhu},
  title = {{A Smart Trader for Portfolio Management based on Normalizing Flows}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2022},
  url = {https://openreview.net/forum?id=5G8QGNgWq7},
}
Figure