1 Introduction

Since Markowitz’s seminal paper (Markowitz, 1952), we have known that people choose portfolios and make investment decisions based on the information they are given. Conversely, by observing others’ investment decisions, we should be able to gather the information implied by these decisions. Particularly, if we can extract information from professional traders, such as fund managers and other institutional investors, who often have access to more information compared to the general public, we should be able to make more accurate predictions regarding stock movements and, hence, trade better.

The idea of a relationship between professional investments and stock movements is not new in the literature. People have long observed that a certain degree of relationship exists between mutual fund flows and stock prices (Warther, 1995; Wermers, 1999; Goetzmann & Massa, 2002), implying that the operations of funds, more or less, influence stock prices (Alexakis et al., 2013; Barber & Odean, 2013; Edelen & Warner, 2001). Specifically, Barber & Odean (2013) stated that institutional investors can earn 1% in average after-tax returns, while individual investors typically encounter a loss of 3.5% on average each year. This indicates that institutional investors provide some amount of information to individual investors; at the minimum, they present more profitable investment decisions to the public. For validation of this idea using advanced techniques, please see Chen et al. (2019) and Li et al. (2020).

The idea can also be preliminarily validated through empirical data. Intuitively, if the portfolio weight of a particular stock changes rapidly in the fund manager’s portfolio, then they are likely to have more information on this stock, enabling them to update the weight more frequently. For any stock in the Taiwan Stock Exchange (TWSE) included in some Taiwanese mutual fund portfolios, we compute its average variation of shareholding ratio (AVSR) across all Taiwanese funds and compute the correlation between AVSR and future stock price movement; see Sect. 4.1 for the data description and Sect. 4.2 for the definition of AVSR. The results show that the average absolute correlation is 0.4013, indicating that updating the operations in the portfolio provides a certain degree of information on stock movement prediction. Combined with the aforementioned supporting findings in existing literature, it is reasonable to believe that there exists information with predictive power worth extracting from the fund managers’ investment decisions.

There are, however, two problems we encounter. First, how do we actually extract this type of information? Note that this is not the traditional type of data, as we seek to consider professional traders’ decisions such as the updating of portfolio weights. Second, even if we manage to extract this information, we must determine how much improvement we can gain in addition to the classical approach using technical data, such as historical price information.

Fortunately, recent developments in machine learning provide us with a way to handle such unconventional data for the first problem. While much research has aimed to extract effective patterns and valuable information from historical market prices (Lin et al., 2017; Zhang et al., 2017; Zhao et al., 2018), others have explored the possibility of obtaining information from unconventional sources. For example, Hu et al. (2018), Xu & Cohen (2018), Li et al. (2019), and Wang et al. (2020) employed sentiment analysis-based natural language processing methods to predict stock trend movements by extracting latent representations from company-related online news, events, and social media posts.

In particular, recent studies have incorporated such information using graph or hypergraph structures. Deng et al. (2019) and Liu et al. (2019) extracted inter-stock relations from online news to construct a knowledge graph, employing graph embedding methods to model these relationships. Li et al. (2020) developed a stock correlation graph based on price movement information, while Matsunaga et al. (2019) and Sawhney et al. (2021) utilized graphs to capture company-to-company relationships found in literature, such as suppliers, customers, and shared industries or suppliers. They applied graph convolution networks (GCNs) to model these inter-stock relations. The most recent work, Sawhney et al. (2021), leveraged hypergraph structures to model higher-order relations based on domain knowledge.

Inspired by these studies and aiming to address the initial problem, we propose a framework using a hypergraph structure to leverage the relationships between expert investment behaviors and stock prices within machine learning models. Specifically, we model inter-stock relationships based on mutual fund manager activities through the hypergraph structure. Here, each stock is treated as a hypernode, and the investments made by each fund in stocks are represented as hyperedges. Notably, these hyperedges connect stocks managed by the same funds. The resulting representation of stock nodes serves as additional input to the classification output layer. Moreover, portfolio weights and their changes are integrated into this hypergraph representation.

We tested our proposed framework using data from TWSE. The results demonstrate that integrating the hypergraph structure enhances predictability of stock price movements. This confirms that mutual fund managers’ investment decisions offer valuable insights beyond classical technical data, addressing our second objective. Moreover, we discovered asymmetry in the information provided by managers’ decisions under different market conditions. This finding aligns with findings in existing literature (Wermers, 1999; Alexakis et al., 2013; Wu, 2011) using traditional methods. Our results underscore that despite the nonlinear nature of mutual fund-stock relationships, asymmetrical outcomes observed in prior studies persist.

In summary, this paper contributes to the literature in three main aspects: (a) introducing an innovative machine learning framework that integrates expert trading behavior into stock price prediction models via hypergraphs; (b) validating the information relationship between expert trading behavior and stock prices using this framework; and (c) highlighting the asymmetric nature of information provided by mutual fund managers’ trading behavior across different market conditions.

The remainder of this work is organized as follows: we first review the related literature in Sect. 2, while Sect. 3 presents the proposed hypergraph framework. Section 4 tests this framework and discusses its asymmetric results. Section 5 further proposes generalizations, variations, and applications of our framework, including methods to incorporate additional professional knowledge from institutional investors. Finally, Sect. 6 outlines our conclusions and discusses potential applications.

2 Literature Review

Before presenting our proposed machine learning framework, we briefly survey the existing literature on stock price predictions. First, Sect. 2.1 provides an overview of stock price prediction methodologies, ranging from classical time series approaches to more contemporary techniques. Section 2.2 then examines the literature concerning the correlation between mutual funds and the stock market. Lastly, Sect. 2.3 reviews the application of hypergraph representation in machine learning, which serves as the inspiration for the framework proposed in Sect. 3.

2.1 Time Series Prediction in Stock Market

Predicting stock prices in time series involves forecasting future trends or values of specific stocks to optimize profit-maximizing strategies. However, this task is challenging due to high volatility, inherent uncertainty, and non-stationary environments. Approaches to financial time series analysis generally encompass traditional time series methods, machine learning-based models, deep learning-based models, and hybrid models.

Traditional approaches primarily utilized linear forecasting models and signal processing techniques for predicting financial time series. One of the classical methods is the Autoregressive (AR) model, which is suitable for linear time-series data (Hyndman and Athanasopoulos, 2018; Li et al., 2016). With the advancement of machine learning, various models have been applied to predict stock trends. These include Support Vector Machine (SVM) (Nair et al., 2010; Lin et al., 2013; Fenghua et al., 2014), random forest (Patel et al., 2015), and neural networks. Additionally, Pai and Lin (2005) employed the autoregressive integrated moving average (ARIMA) model to handle linear components and SVM for nonlinear aspects. Moreover, Huang and Wang (2006) integrated wavelet-based feature extraction with SVM for predicting stock indices. They utilized wavelet transformation to decompose stock data and subsequently applied SVM for forecasting.

Deep learning models, leveraging their capability to handle nonlinearity, have demonstrated superiority over traditional statistical methods and conventional machine learning models in stock price prediction. For instance, Zhang et al. (2017) introduced a State Frequency Memory (SFM) recurrent network designed to capture multi-frequency patterns in historical time-series data, leveraging concepts from Discrete Fourier Transform (DFT). In addition to recurrent networks, convolutional neural networks (CNNs) are also employed in time series forecasting. Wang et al. (2019) developed a ConvLSTM-based Seq2Seq framework, where ConvLSTM refers to Convolutional Long Short-Term Memory models, and Seq2Seq is a family of machine learning methods commonly used in language processing.

Given the stochastic nature and temporal evolution of historical stock prices, Feng et al. (2019) utilized adversarial training techniques to enhance the robustness and generalization of their stock prediction model. Furthermore, Wang et al. (2021) proposed the copula-based predictive (Co-CPC) method to mitigate data uncertainty issues. This approach involved modeling the dependence between specific stock sectors and relevant macroeconomic variables and learning stock representations in a self-supervised manner, which could be applied to downstream tasks.

The stock market is influenced by a multitude of factors sourced from various channels, including social media and financial news. Therefore, besides price features, text data from social media can also offer valuable insights. For instance, Deng et al. (2019) integrated price signals with event embeddings extracted from financial news to predict stock trends. Other studies have similarly utilized text data to enhance stock prediction by focusing on sentiment analysis, extracting sentiment vectors that indicate positive, neutral, or negative opinions regarding future stock price directions. For example, Xu and Cohen (2018) proposed a deep generative approach that jointly considers social media data and price signals, demonstrating superior performance compared to traditional benchmarks. Moreover, Wang et al. (2020) introduced a stance prediction model aimed at learning representations from stock investment reviews, effectively leveraging expert-based opinion signals for prediction purposes.

Some existing studies have focused solely on sentiment scores, neglecting the broader context of stock correlations. To address this limitation, Liu et al. (2019) integrated various types of stock relationships by incorporating enterprise information and news articles. By leveraging company knowledge graph embeddings, they achieved significant improvements in stock prediction accuracy compared to traditional methods. In a similar effort to incorporate relational data into stock market predictions, Kim et al. (2019) proposed a Hierarchical Attention Network for Stocks (HATS). This model automatically selects relevant information from different types of relationships to construct representations for individual stocks.

Furthermore, Matsunaga et al. (2019) integrated company knowledge graphs into their stock prediction model, considering diverse relationships such as suppliers, partners, customers, and shareholders. They utilized graph neural networks (GNNs) to extract and utilize this information, thereby addressing issues related to data sparsity. Additionally, Sawhney et al. (2020) introduced a framework capable of integrating heterogeneous data sources, including social media and inter-stock relations, within a hierarchical structure. This approach facilitates a comprehensive analysis that captures both internal and external influences on stock performance.

One can further appreciate the complexity of real-world company relationships by constructing frameworks that extend beyond pairwise interactions. For instance, Sawhney et al. (2021) utilized a hypergraph architecture, which can effectively model these intricate relationships, leading to notable enhancements in stock ranking prediction tasks.

2.2 Impact of Fund Portfolio on the Financial Market

Chen et al. (2019) argued that human investors play a dominant role in the stock market due to their understanding of a stock’s intrinsic value, which is valuable for stock forecasting. They emphasized that the collective investment behavior of the mutual fund industry reflects professional beliefs about stock intrinsic value. To enhance stock ranking predictions, they extracted latent representations of each stock from mutual fund portfolio data. Similarly, Li et al. (2019) noted that stocks with different characteristics perform differently under the same technical indicator, suggesting the inadequacy of using a single technical indicator for all stocks. They proposed optimizing technical indicators by rescaling them based on latent representations extracted from a fund-stock bipartite graph. Their experiments demonstrated that these optimized indicators improve prediction accuracy by capturing diverse stock characteristics. Both studies underscored the effectiveness of extracting stock representations from mutual fund portfolios for real-world stock market prediction tasks.

Several financial studies have explored the stock selection strategies of portfolio managers (Falkenstein, 1996; Chan et al., 2002; Chandra, 2017). These studies reveal that managers consider not only past price trends but also intrinsic properties of stocks. In addition to these findings, there is substantial literature documenting the influence of mutual fund flows on stock prices. For instance, Warther (1995) found a significant association between stock returns and contemporaneous aggregate flows into mutual funds. Wermers (1999) examined mutual fund herding behavior and its impact on stock prices, revealing that fund activities are inherently linked to the prices of their invested stocks. Their empirical findings supported two hypotheses: the price pressures hypothesis, which suggests mutual fund flows influence market returns, and the feedback-trader hypothesis, which posits that fund flows reflect market information impacting returns.

Further analysis by Edelen & Warner (2001) explored the relationship between daily market returns and aggregate mutual fund flows in the U.S. equity fund industry, highlighting a positive correlation between fund flows and contemporaneous market returns. Additionally, Goetzmann & Massa (2002) demonstrated how mutual fund flows affect stock price formation. These studies collectively underscore the complex interplay between mutual fund activities and stock market dynamics.

2.3 Hypergraph Representation Learning

Simple graphs and hypergraphs are both structural frameworks that employ nodes to represent entities (such as stocks or mutual funds) and use edges to denote relationships between them by linking the respective nodes. The key distinction between them lies in how edges are defined: in a simple graph, an edge connects precisely two nodes, whereas in a hypergraph, an edge can connect multiple nodes simultaneously. Please refer to Fig. 1 for a visual representation. As a consequence of this difference, a simple graph can only model pairwise relationships, while a hypergraph has the capacity to represent more complex relationships that involve multiple entities simultaneously. Therefore, hypergraphs are particularly adept at capturing intricate and multifaceted relationships that occur in real-world scenarios.

Fig. 1
figure 1

Illustration for a simple graph versus a hypergraph by Zhou et al. (2006)

Zhou et al. (2006) pioneered the concept of hypergraph learning by introducing algorithms for hypergraph and transductive classifications, leveraging a spectral hypergraph clustering approach. Building on this foundation, Feng et al. (2019) introduced a general hypergraph neural network (HGNN) based on spectral graph convolution techniques. This framework was designed to effectively learn hidden representations from high-order data structures, demonstrating advancements in the field of hypergraph-based machine learning models.

The application of hypergraphs spans various domains and has shown versatility in addressing complex relationships. For instance, Sun et al. (2021) enhanced Hypergraph Neural Networks (HGNNs) with multi-level hyperedge distillation strategies in social networks to improve link prediction accuracy. In the realm of recommendation systems, Zheng et al. (2018) proposed a hybrid approach that leverages hypergraph structures to depict the interconnections within social networks, aiming to enhance recommendation accuracy. In another application area, Zhao et al. (2018) utilized multi-modal hypergraphs based on personality correlations for personalized emotion recognition, demonstrating how hypergraphs can integrate diverse data modalities to enhance understanding and prediction.

Recently, in financial research, Sawhney et al. (2021) advanced hypergraph learning techniques to model intricate relationships between stocks, achieving notable improvements in stock ranking prediction tasks. This underscores the utility of hypergraphs in capturing and leveraging complex relationships in real-world scenarios.

3 Proposed Framework

Several notations must be defined before we introduce our framework. Throughout the paper, we will use bold lowercase letters (e.g., \(\textbf{x}\)) to denote vectors, and bold capital letters (e.g., \({\textbf{X}}\)) to denote matrices. Regular lowercase letters (e.g., x) and Greek letters (e.g., \(\theta \)) will refer to scalars and hyperparameters, respectively.

The framework is aimed to incorporate fund managers’ decision information into the stock trend prediction, which we formalize as a price movement classification problem. More precisely, given \(\tau > 0\) as a threshold for trend direction judgment, for any stock s at time t, we would like to predict whether the price will “rise,” “drop” or stay “flat” in the sense of

$$\begin{aligned} {{\widehat{y}}}_{t+1}^{s} = \left\{ \begin{matrix} ``rise", &{} \text {if }PC^{s}\left( t+1 \right) \ge \tau , \\ ``drop", &{} \text {if }PC^{s}\left( t+1 \right) < \ -\tau , \\ ``flat", &{} otherwise, \\ \end{matrix} \right. \ \end{aligned}$$
(1)

where

$$\begin{aligned} PC^{s}\left( t+1 \right) := \frac{X_{c_{t+1}}^{s}-X_{c_{t}}^{s}}{X_{c_{t}}^{s}}, \end{aligned}$$

with \(X_{C_{t+1}}^{s}\) and \(X_{C_{t}}^{s}\) denoting the close price of stock s at time \(t+1\) and t, respectively. This implies that we will need to propose a machine learning framework that can learn a mapping function \({{\widehat{y}}}_{t+1}^{s} = f({\textbf{X}}_{t}^{s},\Theta )\) projecting the input data \({\textbf{X}}_{t}^{s} = [x_{t-k}^{s},\ x_{t-k+1}^{s},\ldots ,x_{t}^{s}]\) of stock s to the target \({{\widehat{y}}}_{t+1}^{s}\), in which f is the nonlinear mapping function and \(\Theta \) are the parameters to be learned.

We, therefore, propose a machine learning framework to achieve this, as illustrated in Fig. 2. The framework consists of four parts:

Fig. 2
figure 2

Overview of our proposed framework

  1. (1)

    A hypergraph convolution to incorporate fund managers’ decision data;

  2. (2)

    A time series encoder to incorporate historical stock price data;

  3. (3)

    A feature fusion module to aggregate the information from the previous two parts;

  4. (4)

    A final stock trend predictor formed through an objective function.

Since it incorporates expert information from fund managers, we will call this framework the F-Net. However, as there are other major institutional traders in Taiwan, it is natural to consider a model that incorporates institutional traders alone, as well as a model that incorporates both fund managers and institutional traders. The corresponding models will be named I-Net and FI-Net, respectively. To focus our discussion, we will only detail the build-up of F-Net here and will present its results in Sect. 4. The frameworks and results for the other two models will be deferred to Sect. 5.

3.1 Hypergraph Convolution

We model the inter-stock relations constructed by professional fund managers using the hypergraph structure, where each hyperedge represents specific fund operations on stocks, as illustrated in Fig. 3. More precisely, for each time step, we construct a hypergraph \(G = (V, E,{\textbf{W}})\) as follows:

Fig. 3
figure 3

Illustration of the hypergraph construction in Sect. 3.1

  • V is the set of nodes, where each node \( v \in V \) represents a stock \( s \in S \).

  • E is the set of hyperedges, where each hyperedge \( e \in E \) is a set of nodes corresponding to the stocks that are operated by a specific fund \( f \in F \).

  • W is a diagonal matrix that stores weights of the hyperedges. In our experiment, we set equal weights for all hyperedges; therefore, \( {\textbf{W}} = {\textbf{I}} \), the identity matrix.

The hypergraph described above can be represented by an incidence matrix \(\textbf{H} \in {\mathbb {R}}^{|V| \times |E|}\), where each entry h(ve) is defined as:

$$\begin{aligned} h(v,e) = {\left\{ \begin{array}{ll} 1, &{} \text {if } v \in e; \\ 0, &{} \text {if } v \notin e. \end{array}\right. } \end{aligned}$$

The degree of each vertex v and of each hyperedge e can then be computed as:

$$\begin{aligned} \deg (v)&= \sum _{e \in E} h(v,e), \\ \deg (e)&= \sum _{v \in V} h(v,e). \end{aligned}$$

We further store the degrees of all vertices into a diagonal matrix \(\textbf{D}_v \in {\mathbb {R}}^{|V| \times |V|}\). More precisely, if we label all vertices by \(v_1, v_2, \ldots \), then the i-th entry in the diagonal of \(\textbf{D}_v\) is \(\deg (v_{i})\). Similarly, we store the degrees of all edges into a diagonal matrix \(\textbf{D}_e \in {\mathbb {R}}^{|E| \times |E|}\), where the degree of the i-th edge is placed in the i-th entry of the diagonal of \(\textbf{D}_e\). The definitions of \(\textbf{D}_v\) and \(\textbf{D}_e\) serve to simplify the formula for the convolution layer, which we will discuss further when presenting the formula.

To distinguish the influence of funds on different stocks, we redefine the weight of each hyperedge associated with a stock based on the change in the proportion of shareholdings. Formally, we replace \(\textbf{H}\) with \(\textbf{H}^{oper}\) to learn the representations of stocks (hypernodes). Each entry of \(\textbf{H}^{oper}\) is defined as:

$$\begin{aligned} \begin{matrix} h^{\text {oper}}(v,e) = \left\{ \begin{matrix} \Delta pct, &{} \text { if }v \in e, \\ 0, &{} \text { if }v \notin e, \\ \end{matrix} \right. \ \\ \end{matrix} \end{aligned}$$

where \(\Delta pct\) denotes the change in the proportion of the shareholdings.

After constructing the hypergraph, we proceed with hypergraph convolution to explore high-order relations among all stocks. Given a hypergraph \( G \), hypergraph convolution based on spectral-based theory is used to facilitate information exchange between related nodes (Gilmer et al., 2017). The initial input \( {\textbf{X}}_\ell \in {\mathbb {R}}^{|V| \times \text {dim}(\ell )} \) to the first hypergraph convolution layer is generated from historical market data of each stock, where \( \text {dim}(\ell ) \) is the feature dimension. Specifically, for a fixed time window size \( k \), at each time \( t \), we gather stock-related data \( {\textbf{X}}_t = [x_{t-k}, x_{t-k+1}, \ldots , x_t] \) over the time window \( [t-k, t] \); refer to Sect. 4.1 for details on the specific data collection process. We then flatten \( {\textbf{X}}_t \) to initialize hypernode representations \( {\textbf{X}}_\ell \).

The hypergraph convolution (HCONV) updates the initial features \( {\textbf{X}}_\ell \in {\mathbb {R}}^{|V| \times \text {dim}(\ell )} \) to new features \( {\textbf{X}}_{\ell +1} \in {\mathbb {R}}^{|V| \times \text {dim}(\ell +1)} \) using stock-related data and interactions preserved in the hypergraph structure. Following the Hypergraph Neural Network (HGNN) approach as described in Feng et al. (2019), the hypergraph convolutional layer can be defined as:

$$\begin{aligned} X^{\ell +1} = \sigma \left( \textbf{D}_{v}^{- 1/2}{} \textbf{H}^{oper} \textbf{W}D_{e}^{- 1} \left( \textbf{H}^{oper}\right) ^{T} \textbf{D}_{v}^{-1/2}X^{\ell }\Theta ^{l} \right) , \end{aligned}$$

where \(\sigma \) denotes the nonlinear activation function and \(\Theta ^\ell \in {\mathbb {R}}^{\text {dim}(\ell ) \times \text {dim}(\ell +1)}\) is a learnable filter matrix used to extract \(\text {dim}(\ell +1)\)-dimensional features. The HGNN layer extracts high-order relations in the hypergraph through node-edge-node transformations (Feng et al., 2019). Specifically, for a one-layer HGNN, the initial hypernode feature \(X^{(0)}\) is processed by a learnable matrix \(\Theta ^{(0)}\) to extract \(\text {dim}(1)\)-dimensional features. The extracted node features are then aggregated according to hyperedges to generate hyperedge features. Finally, the output hypernode representation is obtained by aggregating all related hyperedge features.

There is, however, one final gap between the above framework and actual implementation. Notice that our hypergraph at each time step is constructed through considering the relationship of a stock being operated by a fund at that time step, which is a relatively limited relationship. By such, our hypergraph would be sparse, so sparse that the information would be hard to propagate through the hypergraph when we do the layer updating. To address this issue, we introduce a "virtual stock node" that is artificially created and connected to all stocks in the hypergraph. This virtual node has its feature set initialized to zero. Specifically, we create this node and assign it membership in all hyperedges in the hypergraph, with all associated values set to zero. This approach enhances information flow in the hypergraph by ensuring sufficient pathways for efficient propagation. The final representation of stock node s at time step t is denoted as \(f_{t}^{s}\).

3.2 Time Series Encoder

In the stock trend prediction problem, it is quite intuitive to consider the historical information as it is the most influential factor in predicting future prices. Therefore, we use daily price-related data \( {\textbf{X}}_{t-k:t}^{s} \) as an input of the deep learning sequential model to obtain dynamic stock representation \( z_{t}^{s} \) as

$$\begin{aligned} z_{t}^{s} = \varphi ({\textbf{X}}_{t-k:t}^{s}), \end{aligned}$$

where \( \varphi \) can be any deep learning model capable of dealing with time series input.

Since the incorporation of historical price information is not the main focus of this paper, we will simply try three of the popular encoders in the literature:

  • Long Short-Term Memory (LSTM) as in Hochreiter & Schmidhuber (1997), for which we use two LSTM layers and a fully connected prediction layer;

  • Adaptive LSTM (ALSTM) as in Bahdanau et al. (2015);

  • Transformer (Vaswani et al., 2017).

We will use F-LSTM to denote the F-Net using LSTM as its encoder. Similarly, we will also define F-ALSTM and F-Transformer.

3.3 Feature Fusion

Since mutual fund portfolios are updated on a monthly basis but price-related data is updated daily, the framework would overlook the incompatibility between the monthly information and daily price information if we straightforwardly concatenate these two features. To resolve this issue, we propose to leverage the fund information representation \( f_{t}^{s} \) more dynamically. After mapping the fund information \( f_{t}^{s} \) extracted from the hypergraph and dynamic stock representation \( z_{t}^{s} \) into the same dimension, we perform feature fusion of the fund information representation \( f_{t}^{s} \) and dynamic stock representation \( z_{t}^{s} \) by calculating the element-wise product of the two given vectors as

$$\begin{aligned} c_{t}^{s} = f_{t}^{s} \circ z_{t}^{s}. \end{aligned}$$

here \( c_{t}^{s} \) can be viewed as dynamic stock representation extracted from mutual fund trading behavior. Then, we concatenate the dynamic stock representation \( c_{t}^{s} \) and dynamic price representation \( z_{t}^{s} \) to form a latent representation of stock \( s \). Finally, we apply a fully connected layer to generate the probability of each category

$$\begin{aligned} {\widehat{y}}_{t+1}^{s} = W_{o}^{T}\left[ c_{t}^{s}, z_{t}^{s} \right] + b_{o}, \end{aligned}$$

where \( W_{o} \) is a learnable parameter and \( \left[ c_{t}^{s}, z_{t}^{s} \right] \) represents a concatenation of the dynamic stock representation \( c_{t}^{s} \) and dynamic price representation \( z_{t}^{s} \) at time \( t \).

3.4 Stock Trend Predictor

Finally, we use a cross-entropy loss to train the stock trend classifier. Note that after considering transaction costs, the stock market often remains flat, which results in a class imbalance problem. To tackle this, we utilize weighted cross-entropy loss by assigning weight to each of the classes. This approach can handle the problem since when calculating the loss, the minority classes will be assigned higher weights relative to the majority class. Mathematically speaking, the above is equivalent to the following loss function:

$$\begin{aligned} \text {loss}({\widehat{y}}_{t+1}^{s}, \text {class}) = \text {weight}[\text {class}] \left( -{\widehat{y}}_{t+1}^{s}[\text {class}] + \log \left( \sum _{j} \exp ({\widehat{y}}_{t+1}^{s}[j]) \right) \right) , \end{aligned}$$

where the weight for each class is calculated as

$$\begin{aligned} \text {weight}[\text {class}] = \frac{\log (N[\text {class}])}{N[\text {class}]}, \end{aligned}$$

and \(N[\text {class}]\) is the number of training samples with class as the ground truth. The model is therefore trained through minimizing the total loss function \(\sum _{s} \text {loss}({\widehat{y}}_{t+1}^{s}, \text {class})\) across all stocks.

4 Empirical Results

We now put the proposed framework to the test through empirical data. Section 4.1 presents the dataset and related pre-processing. Section 4.2 presents preliminary examination through the AVSR mentioned in the introduction. Section 4.3 discusses some details in implementing the framework, while Sect. 4.4 outlines the results. Finally, Sect. 4.5 examines the asymmetric effects observed in our results. For results of I-Net, FI-Net and other variations, see Sect. 5.

4.1 Dataset and Pre-processing

We put our framework to the test using five years of Taiwanese security data collected from the Taiwan Economic Journal Database (TEJ+), which includes the following datasets:

  • Stock price: We collect the daily trading records of the top 111 companies on TWSE by market capitalization from 2015/01/05 to 2020/12/31. The open price, highest price, lowest price, close price, and trading volume of each day are amassed.

  • Equity mutual fund portfolio: Regulated by the government, equity mutual funds in Taiwan must release their investment portfolios every month, which are documented by TEJ+ as illustrated in Table 1. We gather Taiwan’s monthly domestic equity mutual fund portfolio reports from 2014/12 to 2020/12. We only keep the 125 equity mutual funds that are available throughout the examination period. The portfolios of these 125 funds contain only stocks from the top 111 companies collected above.

Table 1 Example of the mutual fund data on TEJ

Following the existing studies, we chronologically split the time series data into three periods for training, validation, and testing, respectively. To avoid results depending on a specific time period, we use three groups of training, validation, and testing periods to analyze our models:

 

Training

Validation

Testing

Group 1

2015/01/01–2017/06/30

2017/07/01–2017/12/31

2018/01/01–2018/12/31

Group 2

2015/01/01–2018/06/30

2018/07/01–2018/12/31

2019/01/01–2019/12/31

Group 3

2015/01/01–2019/06/30

2019/07/01–2019/12/31

2020/01/01–2020/12/31

Note that the time frame of both Groups 1 and 2 is completely prior to the COVID-19 pandemic, while for Group 3, the training and validation periods are prior to the COVID-19 pandemic but the testing period is within the COVID-19 pandemic period. Given the dramatic differences between pre- and post-COVID eras, it is reasonable to expect that the performance in Group 3 will be worse than the other two groups, as its testing period basically has a different structure compared to the training period. Nevertheless, even in this extreme case, our later studies show that our framework is still capable of extracting information from managers’ decisions to a certain degree; see Sect. 4.4 for details.

Observation has revealed that different stocks have different price ranges; in such scenarios, researchers have found that normalizing the time series aids in improving the prediction (Nayak et al., 2014). Therefore, in our experiments, we normalize the stock price sequence using sliding window z-normalization of length \( k \) for each corresponding company at each time step, namely,

$$\begin{aligned} \widehat{{\textbf{X}}}_{t}^{s} = \frac{{\textbf{X}}_{t-k:t}^{s} - \mu ({\textbf{X}}_{t-k:t}^{s})}{\sigma ({\textbf{X}}_{t-k:t}^{s})} \end{aligned}$$

where \( \mu ({\textbf{X}}_{t-k:t}^{s}) \) and \( \sigma ({\textbf{X}}_{t-k:t}^{s}) \) are the mean and standard deviation of stock \( s \) over time window \( k \), respectively.

After standardizing the data, we use the portfolio information of all funds in the data to construct a single hypergraph structure, as mentioned in Sect. 3. In other words, we use one single hypergraph with 111 nodes (each representing a stock) and 125 hyperedges (each representing the portfolio of a fund). The consecutive trainings are also conducted on this single hypergraph.

Finally, for the threshold \(\tau \) required for determining the class of stock price movement \({{\widehat{y}}}_{t+1}^{s}\), we set a reasonable split point to \(0.5\%\), which is the most common transaction cost when buying or selling a stock. In other words, when the price change is less than \(0.5\%\), there is no profit in the transaction. Consequently, we define price changes within \(\pm 0.5\%\) as belonging to the "flat" class. For each stock price series, the label for each day’s rise, drop, or flat movement is determined according to the following rule:

$$\begin{aligned} {{\widehat{y}}}_{t+1}^{s} = {\left\{ \begin{array}{ll} \text {``rise''}, &{} \text {if } PC^{s}(t+1) \ge 0.5\%, \\ \text {``drop''}, &{} \text {if } PC^{s}(t+1) \le -0.5\%, \\ \text {``flat''}, &{} \text {otherwise.} \end{array}\right. } \end{aligned}$$

The class distribution of the three classes is depicted in Fig. 4.

Fig. 4
figure 4

Annually data distribution of our data based on the classification in (1) with \(\tau = 0.5\%\)

4.2 Preliminary Examination Through AVSR

As discussed in the introduction, existing financial literature encourages us to explore the correlation between changes in mutual fund portfolios and stock prices. The underlying premise is that stocks experiencing more frequent adjustments in portfolio weights by mutual funds suggest that fund managers possess greater informational insights into those stocks, facilitating timely and frequent updates. Consequently, we anticipate observing a discernible relationship between portfolio changes and subsequent movements in stock prices. Let’s proceed with a preliminary analysis to demonstrate the existence of this phenomenon in our dataset.

To do so, we first calculate the Normalized Shareholding Ratio for stock \( s \) in fund \( f \) at time \( t \)

$$\begin{aligned} NSR^{f,s} = \frac{PC_{t}^{f,s}}{\frac{1}{12}\sum _{u = t - 12}^{t - 1}{PC_{u}^{f,s}}}, \end{aligned}$$

where \( PC_t^{f,s} \) denotes the shareholding ratio for stock \( s \) in fund \( f \) at time \( t \). The denominator represents the average shareholding ratio within the last \( 12 \) months. Note that a large \( NSR^{f,s} \) indicates that the shareholding ratio of the stock increases significantly in contrast with the annual average.

During the time period \( [13,T] \), the Variation of Shareholding Ratio for stock \( s \) in fund \( f \) can then be calculated by

$$\begin{aligned} VSR_{T}^{f,s} = \frac{1}{12}\sum _{t = 13}^{T}\left( NSR_{t}^{f,s} - {{\overline{NSR}}}_{t}^{f,s} \right) ^{2} \end{aligned}$$

The variation of the shareholding ratio \( VSR_{T}^{f,s} \) can be regarded as an indicator to measure how often the fund manager \( f \) operates the stock \( s \); a large value of this variation suggests that the fund manager adjusts the portfolio weight of this stock frequently and significantly. To consider the operation over all mutual fund managers for a stock, we obtain the Average Variation of Shareholding Ratios (AVSR) among fund managers who have operated stock \( s \) at each time step, namely,

$$\begin{aligned} AVSR_{T}^{f,s} = \frac{\sum _{f:VSR_{T}^{f,s}> 0}^{}{VSR_{T}^{f,s}}}{\sum _{f:VSR_{T}^{f,s} > 0}^{}1}. \end{aligned}$$

Now, we would like to evaluate whether there is generally a relationship between AVSR and the stock price. Since both positive and negative correlations correspond to some degree of relation, we use the average of absolute correlation,

$$\begin{aligned} AC = \frac{1}{m}\sum _{s = 1}^{m}{\left| \text {Corr}\left( AVSR_{T}^{s},P_{T + 1}^{s} \right) \right| } \end{aligned}$$

as an indicator of the relationship between the current portfolio updating and future stock price \( P_{T + 1}^{s} \), where \( m \) is the total number of stocks. The resulting \( AC \) is 0.4013, which indicates a medium correlation. We, therefore, conclude that there exists some degree of stock predictive information embedded in the mutual fund managers’ portfolio decisions, as mentioned in the introduction.

4.3 Implementation Details

We train our model for 100 epochs with a batch size of 128. For the hypergraph representation learning, the output hidden size of each hypernode is set to be 128. In the time series encoder for extracting price-related features, we use a hidden size of 128 for the dynamic price representation. We employ Adam (Kingma & Ba, 2014) as the optimizer with a learning rate of \(10^{-3}\) and weight decay of \(10^{-4}\); specifically, we use the AMSGrad variant (Chen et al., 2019) of this algorithm. The scheduler reduces the learning rate by a factor of 0.1 every 20 epochs. During training, mini-batch observations are randomly sampled from the training set for each iteration.

We then use the following metrics to evaluate the model:

  • Accuracy, Precision, and Recall:

    $$\begin{aligned} Accuracy&= \frac{TP + TN}{TP + TN + FP + FN}, \\ Precision&= \frac{TP}{TP + FP}, \\ Recall&= \frac{TP}{TP + FN}, \end{aligned}$$

    where TP/TN is the number of true positive/negative, and FP/FN are the number of false positive/negative, respectively. These quantities are computed across all stocks and all time periods in the time window. For example, true positives TP are defined as:

    $$\begin{aligned} TP = \sum _{s} \sum _{t} 1\left\{ {{\widehat{y}}}_{t}^{s}\text { correctly predicts the class} \right\} . \end{aligned}$$
  • F1-Score and Profit-Score:

    $$\begin{aligned} F1\text {-}Score&= 2 \times \frac{Precision \times Recall}{Precision + Recall}, \\ Profit\text {-}Score&= \frac{F1\text {-}Score(\text {Rise}) + F1\text {-}Score(\text {Drop})}{2}. \end{aligned}$$

    In a three-class stock trend prediction problem, where the goal is to predict whether the future stock trend is drop, flat, or rise, the key to a profitable model is accurately predicting the rise and drop classes. Accurately predicting flat does not contribute to the profit. Li et al. (2020) proposed a metric, profit-score, that reflects the profitability of a model by considering the average of the macro F1-score of the drop and rise classes, excluding the flat class.

  • Matthews Correlation Coefficient (MCC):

    $$\begin{aligned} MCC = \frac{\sum _{k,\ell ,m} (C_{kk}C_{m\ell } - C_{\ell k}C_{km})}{\sqrt{\sum _{k} [(\sum _{\ell } C_{\ell k})(\sum _{i \ne k,j} C_{ji})] \cdot \sum _{k} [(\sum _{\ell } C_{k\ell })(\sum _{i \ne k,j} C_{ij})]}} \end{aligned}$$

    where \(C_{ij}\) is the (ij)-th entry of the confusion matrix C, and N is the number of samples. MCC is a reliable evaluation metric to measure the performance of classification results for an imbalanced dataset (Jurman et al., 2012).

4.4 Results

The results of our framework under three different testing period scenarios (as presented in Sect. 4.3) are summarized in Table 2. Our objective is to investigate whether incorporating fund managers’ portfolio decisions through hypergraph convolution can provide predictive information in addition to conventional price-related data. We compare the performance of the F-Net models with different time series encoders to their corresponding encoder-only counterparts. For instance, we compare F-LSTM, where F-Net uses LSTM as the time series encoder, to LSTM, which uses LSTM alone without the hypergraph convolution. Similarly, we compare F-ALSTM and ALSTM, as well as F-Transformer and Transformer.

Table 2 Comparison with F-Net and backbone model

In addition, as mentioned in Sect. 4.1, the three groups of time frames we examined have distinct characteristics. The first two groups are entirely prior to the COVID-19 pandemic, while the third group represents an extreme case where the testing period falls within the COVID-19 pandemic, significantly differing from the pre-COVID testing and validation periods. We will first focus on evaluating our framework’s performance in the first two groups of "normal" time frames to assess its general effectiveness. Subsequently, we will examine the last group of "extreme" time frame to evaluate whether our framework remains effective even under such challenging conditions.

Let’s begin by examining the results for the testing periods in 2018 and 2019, specifically Panels A and B in Table 2. In these panels, F-LSTM and F-ALSTM show only marginal improvements in profit-score compared to LSTM and ALSTM, respectively. This modest increase can be attributed to the baseline models already being sufficiently effective in predicting the rise and drop classes. However, we observe that the enhancement in profit-score primarily stems from improved recall of the rise class. Therefore, incorporating additional fund information allows the models to better capture instances of the rise class, where recall improves with only a slight decline (or even improvement) in precision (Table 3).

Table 3 Relative improvement on profit-score

Now let us consider the Transformer, which exhibits the highest overall accuracy among all the encoders, despite having the lowest profit-score among the models. We observe that it demonstrates relatively balanced accuracy across all three classes, whereas the other models excel more in predicting the rise and drop classes. Upon incorporating additional fund information into the Transformer, F-Transformer shows a significant enhancement in recall for the drop and rise classes, resulting in an improved profit-score. For instance, in 2018, there is a notable relative improvement of \(25.73\%\), as shown in Table 4.

Table 4 Historical data of Taiwan Capitalization Weighted Stock Index (TAIEX)

The aforementioned observations hold consistently across different years. It’s important to note that the profit-scores in 2019 generally appear lower compared to 2018, primarily because 2019 featured a relatively stable market with a higher proportion of flat trends, thus reducing profit opportunities compared to 2018. Nevertheless, even under these conditions, incorporating fund information still enhances the model’s ability to predict the rise category. The asymmetric effects observed in both years also contribute to the higher relative improvement of F-Net in 2018, stemming from the different distributions of the three classes between the two years, as illustrated in Fig. 4.

Finally, we analyze the results for the year 2020. As previously discussed, due to the COVID-related inconsistencies between the training/validation periods and the testing periods, our framework was expected to extract less information for valid forecasting, potentially resulting in poorer performance for this period. As shown in Table 3, the improvements in profit-scores for LSTM and Transformers in 2020 are indeed less pronounced compared to the improvements observed in the previous two years. Surprisingly, however, ALSTM shows a larger improvement in 2020 than in the previous years. Additionally, incorporating fund information leads to improvements for both ALSTM and Transformers, with Transformers showing the largest gains.

Furthermore, the asymmetric effect of increasing recall for the rise class persists in 2020, as detailed in Table 2, Panel C. These observations indicate that, while not as robust as during normal periods, our framework can still extract predictive information from managers’ decisions even under extreme scenarios such as the COVID-19 pandemic. Moreover, the framework continues to exhibit the same asymmetric behaviors as observed before.

In summary, the trading behavior of mutual funds proves to be informative for stock prediction models, even when applied to extreme time periods such as predicting during a pandemic using pre-pandemic training data. Moreover, we observe asymmetric effects from the fund managers’ information, demonstrating that the additional fund data enhances the model’s ability to predict the rising class more effectively compared to other classes.

4.5 Asymmetric Effects

As noted earlier, we observe asymmetric improvements in predictions when mutual fund information is integrated into existing machine learning models. Across all testing periods, incorporating fund data enhances the models’ ability to predict the "rise" label more effectively. In addition to this asymmetric effect, we notice that the relative improvement in F-Net’s profit-score is higher in 2018 compared to 2019. This section explores the asymmetric behavior of mutual funds from a financial perspective.

Several factors may contribute to this asymmetry. Firstly, mutual funds exhibit inherent asymmetry in their operations. Financial studies, such as Wermers (1999), have observed that mutual funds tend to exhibit herding behavior, particularly favoring stocks with strong profitability. Given that our hypergraph construction requires active portfolio adjustments as inputs, stocks classified as "rise" may inherently attract more attention in our framework, thereby contributing to the observed asymmetry.

Furthermore, Wermers (1999) found that herding behavior in mutual funds is asymmetric, particularly evident in trading smaller stocks. This asymmetry in fund operations across different subsets of stocks could also influence the observed asymmetry.

Secondly, there may be asymmetric causal effects between stocks and funds. Research by Alexakis et al. (2013) suggests bi-directional long-run causality between positive components of stock index returns and fund flow changes, while causal relations from fund flows to stock indexes are predominantly one-directional for negative components. This asymmetric information flow under varying market conditions could contribute to the observed behavior.

Lastly, fund managers may possess varying selection and timing abilities under different market conditions. For instance, Wu (2011) demonstrates that these abilities differ in upside, neutral, and downside markets. Comparing the historical data of the Taiwan Capitalization Weighted Stock Index (TAIEX) in Table 4, we observe that 2018 experienced a bear market relative to 2019. These asymmetric abilities in different market conditions influence fund operations, thereby contributing varying levels of information across different time periods and potentially affecting the observed asymmetry.

All these asymmetric effects have been extensively studied in financial literature using traditional statistical tools with more linear models. Our results validate these findings by demonstrating that they persist even when considering potential nonlinearities through machine learning techniques.

5 Generalization, Variations and Applications

In addition to mutual fund managers, other professional investors significantly influence the Taiwanese stock market, particularly three major institutional investors: foreign investors, investment trusts, and dealers. Yang (2018) found that the trading behaviors of these institutional investors have a substantial relationship with stock returns. Their study demonstrated that stocks continuously bought by these investors exhibit significantly positive returns, whereas those continuously sold experience negative returns. Further insights by Wang (2021) highlighted that the net buy/sell activities of these investors also impact stock returns. These observations underscore the pivotal role played by these institutional investors in Taiwan’s stock market. Therefore, it is worthwhile to investigate whether incorporating their behaviors into our framework would alter our results.

We will first detail how we incorporate these institutional investors into the framework in Sect. 5.1, followed by presenting the corresponding empirical results in Sect. 5.2. Additionally, Sect. 5.3 will briefly outline the framework and results if we modify it to a two-class scenario, while Sect. 5.4 will explore the potential of utilizing our framework as a foundation for algorithmic trading (Fig. 5).

Fig. 5
figure 5

Structure of transformer encoder

5.1 Construction of I-Net, and FI-Net

As discussed in Sect. 3.1, our framework incorporates expert decision information. For the F-Net, this involves using hypergraph convolution to integrate mutual fund managers’ decisions. We introduce two additional models that handle expert information differently.

Firstly, we introduce I-Net depicted in Fig. 6, where the expert part is replaced with an LSTM network that incorporates information from three major institutional investors. Mathematically, we define

Fig. 6
figure 6

Framework of proposed I-Net

$$\begin{aligned} i_{t}^{s} = \text {LSTM}\left( I_{t-k:t}^{s} \right) \end{aligned}$$

where \(I_{t-k:t}^{s}\) represents the input trading sequences of institutional investors, and \(i_{t}^{s}\) represents the extracted institutional information representation. Subsequently, we concatenate this institutional information \(i_{t}^{s}\) with the dynamic price representation \(z_{t}^{s}\) to predict the stock trend at the next time step using a fully connected layer:

$$\begin{aligned} {{\widehat{y}}}_{t + 1}^{s} = W_{o}^{T}\left[ i_{t}^{s}, z_{t}^{s} \right] + b_{o} \end{aligned}$$

where \(W_{o}\) is a learnable parameter and \(\left[ i_{t}^{s}, z_{t}^{s} \right] \) denotes the concatenation of institutional information and dynamic price representation at time t.

Next, we introduce FI-Net depicted in Fig. 7, which integrates information from both mutual fund managers and the three major institutional investors. Similar to F-Net, fund information \(f_{t}^{s}\) is collected through hypergraph convolution, while institutional investors’ information \(i_{t}^{s}\) is incorporated via LSTM as in I-Net. The two sets of information are then merged through feature fusion, defined as

$$\begin{aligned} c_{t}^{s} = f_{t}^{s} \circ i_{t}^{s} \end{aligned}$$

where \(c_{t}^{s}\) represents the dynamic stock representation extracted from the trading behaviors of both sets of experts. Finally, the concatenation of stock representation \(c_{t}^{s}\) and price representation \(z_{t}^{s}\) is fed into a fully connected layer to predict the stock trend at time step \(t + 1\):

$$\begin{aligned} {{\widehat{y}}}_{t + 1}^{s} = W_{o}^{T}\left[ c_{t}^{s}, z_{t}^{s} \right] + b_{o} \end{aligned}$$

where \(W_{o}\) is a learnable parameter for stock trend predictions.

Fig. 7
figure 7

Framework of proposed FI-Net

5.2 Empirical Results of I-Net, and FI-Net

We now evaluate I-Net and FI-Net using empirical data. In addition to the datasets described in Sect. 4.1, we also collect daily trading data of the three major institutional investors in Taiwan from January 5, 2015, to December 31, 2020, including net buy/sell transactions, net buy/sell market capitalization, holdings, holding ratios, and turnover.

The results are presented in Table 5, alongside those in Table 2. From the 2018 results in Panel A, I-Net achieves the best profit-score performance. Notably, I-Net, which integrates transaction information from the three major institutional investors, significantly improves overall prediction accuracy, MCC, and F1-score. However, FI-Net, which incorporates information from both mutual fund managers and the three major institutional investors, although achieving higher accuracy and MCC than the backbone models, does not consistently outperform in all evaluation metrics. This suggests a trade-off between profit-score and accuracy metrics, possibly due to differing profit goals between mutual fund managers and institutional investors.

Table 5 Comparison between F-Net, I-Net, and FI-Net

Similar trends are observed in the results for the other two years: models incorporating fund information (F-Net and FI-Net) generally exhibit better profit-scores, while models incorporating information from the three major institutional investors (I-Net and FI-Net) tend to have higher accuracy.

Based on these findings, we conclude that incorporating mutual fund information can enhance profit-score, primarily by improving the ability to predict the rise class. I-Net, leveraging transaction information from three major institutional investors, symmetrically enhances overall predictive ability across all cases, contrasting with the asymmetric effects observed in F-Net. Moreover, our results indicate that the trading behaviors of expert investors, such as mutual funds and the three major institutional investors, offer valuable information for stock price prediction models. However, the nature of information provided differs, leading to varying improvements in profit-score and accuracy, potentially influenced by their distinct profit objectives. Further investigation into this phenomenon through financial literature is warranted.

5.3 Empirical Results for 2-Class

Due to the nature of stock trading, investors often focus on stocks that exhibit significant movements, either upwards or downwards. Consequently, the "flat" cases where stocks do not show significant changes might not be of interest. To explore this scenario, we consider a two-class classification problem where we exclude all "flat" cases:

$$\begin{aligned} {{\widehat{y}}}_{t + 1}^{s} = {\left\{ \begin{array}{ll} \text {"rise"}, &{} \text {if } PC^{s}(t + 1) \ge 0.5\%, \\ \text {"drop"}, &{} \text {if } PC^{s}(t + 1) \le -0.5\%, \\ \text {"abandon"}, &{} \text {otherwise.} \end{array}\right. } \end{aligned}$$

We then repeat the evaluation of F-Net, I-Net, and FI-Net by replacing the three-class classification with this two-class classification. The results are summarized in Table 6.

Table 6 Comparison between F-Net, I-Net, and FI-Net under 2-Class Classification

It is observed that all conclusions drawn from the three-class classification generally hold in the two-class version: fund managers’ decisions continue to provide predictive information beyond other data sources, and exhibit asymmetric effects in prediction accuracy. The differences between F-Net, I-Net, and FI-Net also generally persist.

5.4 Trading Performance

Finally, we conduct a preliminary investigation into the potential of our framework for algorithmic trading. We adopt a simple trading strategy:

  • When the framework predicts "rise", long one unit of stock and short it as soon as the framework predicts "drop".

  • When the framework predicts "drop", short one unit of stock and long it as soon as the framework predicts "rise".

In essence, the algorithm opens a position when the framework predicts any future movement of the price, and closes the position as soon as the framework predicts an opposite movement. This is a naive strategy as it does not consider the magnitude of profits for each transaction. It is treated as a preliminary investigation.

We apply this algorithm on our data with a \(0.1\%\) transaction cost under each of the frameworks presented in Table 5 for both two-class and three-class scenarios. The results are summarized in Table 7. For comparison, we also include results using a simple buy-and-hold strategy, as well as a representative machine-learning-based algorithm by Hui and Chan (2014).

Table 7 Traing performance under different F-Net, I-Net and FI-Net

Observing the profits, the frameworks with fund information (F-Net and FI-Net) outperform the two comparison strategies. Specifically, for ALSTM and Transformers, the frameworks with fund information also outperform their respective benchmark models in terms of profit. This is attributed to the frameworks’ ability to better predict future stock movements, as demonstrated in Sects. 4.4 and 5, enabling them to effectively buy stocks with rising prices and sell stocks with declining prices. However, due to the naive nature of the algorithm that does not consider profit magnitude, it executes numerous transactions that do not cover their transaction costs, resulting in lower net profits compared to the comparison strategies. To mitigate over-trading, future frameworks should incorporate predictions of movement magnitudes, which is beyond the scope of this study.

We acknowledge that this preliminary experiment does not comprehensively evaluate whether our framework has potential to develop a competitive trading strategy. Further sophisticated investigations are necessary to fully address this issue, representing a potential extension of this study.

6 Conclusion

This paper introduces a machine learning model designed to extract predictive insights from mutual fund managers’ portfolio decisions. The framework leverages the relationships between mutual fund activities and stock prices using a novel hypergraph network that captures inter-stock relations shaped by professional fund managers. Our analysis of the model’s predictions across different classes reveals that mutual fund managers’ portfolio decisions provide valuable predictive information beyond traditional historical price data. Importantly, we observe asymmetric effects in the predictive information extracted from these decisions, highlighting that established findings in finance literature persist even when employing nonlinear relationships modeled through machine learning techniques. We anticipate that this framework will enhance future stock prediction capabilities and contribute to advancements in related research fields.