Asset transaction action output method and device, electronic equipment and storage medium

By fusing multidimensional feature vectors and sparse adjacency matrices of assets, and combining deep learning and reinforcement learning, the problem of sensitivity to historical data in existing portfolio construction methods is solved, achieving efficient and automated trading decisions and market awareness.

CN122175686APending Publication Date: 2026-06-09CHINA ELECTRONICS CLOUD DIGITAL INTELLIGENCE TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA ELECTRONICS CLOUD DIGITAL INTELLIGENCE TECH CO LTD
Filing Date
2026-01-16
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing stock portfolio construction methods are sensitive to historical data and estimates of expected returns, leading to increased risk exposure and requiring expertise and extensive research, making it difficult to achieve efficient automated trading.

Method used

By acquiring multidimensional feature vectors of assets, constructing sparse adjacency matrices and fusing spatiotemporal features, and combining contextual coding and market state representation, asset trading actions are determined, and automated trading decisions are made using deep learning and reinforcement learning methods.

Benefits of technology

It achieves a high-performance, highly adaptive automated trading solution that can sense changes in market structure and time series, and provide efficient investment advice.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122175686A_ABST
    Figure CN122175686A_ABST
Patent Text Reader

Abstract

The present disclosure relates to an asset transaction action output method and device, electronic equipment and storage medium, and relates to the field of deep learning. The method comprises: obtaining multi-dimensional feature vectors of each asset in a preset asset pool at multiple historical time points; determining a sparse adjacency matrix at a single historical time point according to the multi-dimensional feature vectors of each asset at the historical time point; performing spatio-temporal feature fusion on the sparse adjacency matrices at each historical time point to determine a market state representation vector; determining a scenario code according to the multi-dimensional feature vectors of each asset at multiple historical time points; determining an asset transaction action according to the scenario code and the market state representation vector; and outputting the asset transaction action. The present disclosure can simultaneously perceive market structure changes and time sequence changes, and can be directly deployed in a real-time trading environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, electronic device, and storage medium for outputting asset transaction actions. Background Technology

[0002] Classic stock portfolio construction methods typically rely on Markowitz portfolio theory, employing diversified investment across multiple industries based on risk appetite. However, this approach is highly sensitive to historical data and estimates of expected returns. Inaccurate estimates can lead to underperformance, increased risk exposure, and highly concentrated asset allocation. In addition, some portfolio construction methods based on technical and fundamental analysis exist, but these require specialized knowledge and experience, and depend heavily on extensive research and analysis of listed company backgrounds. In recent years, with advancements in complex network theory and technology, complex networks have gradually become an effective tool for studying financial markets, particularly the stock market. They are widely applied in areas such as stock price prediction, market risk analysis, index construction, and portfolio recommendation, achieving significant results. Summary of the Invention

[0003] Embodiments of this disclosure provide a method, apparatus, electronic device, and storage medium for outputting asset transaction actions.

[0004] In a first aspect, embodiments of this disclosure provide a method for outputting asset trading actions, comprising: obtaining multidimensional feature vectors of each asset in a preset asset pool at multiple historical moments; determining a sparse adjacency matrix for a single historical moment based on the multidimensional feature vectors of each asset at a single historical moment; performing spatiotemporal feature fusion on the sparse adjacency matrices at each historical moment to determine a market state representation vector; determining a scenario code based on the multidimensional feature vectors of each asset at multiple historical moments; determining an asset trading action based on the scenario code and the market state representation vector; and outputting the asset trading action.

[0005] Secondly, embodiments of this disclosure provide an asset trading action output device, comprising: a vector acquisition unit configured to acquire multidimensional feature vectors of each asset in a preset asset pool at multiple historical moments; a matrix determination unit configured to determine a sparse adjacency matrix of each asset at a single historical moment based on the multidimensional feature vectors of each asset at that historical moment; a vector fusion unit configured to perform spatiotemporal feature fusion on the sparse adjacency matrices at each historical moment to determine a market state representation vector; a scenario encoding unit configured to determine a scenario encoding based on the multidimensional feature vectors of each asset at multiple historical moments; an action determination unit configured to determine an asset trading action based on the scenario encoding and the market state representation vector; and an action output unit configured to output the asset trading action.

[0006] Thirdly, embodiments of this disclosure provide an electronic device including a memory, a processor, a bus, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the asset transaction action output method as described in the first aspect.

[0007] Fourthly, embodiments of this disclosure provide a non-transitory computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the asset transaction action output method as described in the first aspect.

[0008] By applying the technical solution disclosed herein, multidimensional feature vectors of each asset in a preset asset pool at multiple historical moments can be obtained. Based on the multidimensional feature vectors of each asset at a single historical moment, a sparse adjacency matrix for that historical moment is determined. Furthermore, spatiotemporal feature fusion is performed on each of the multidimensional feature vectors and the sparse adjacency matrix at each historical moment to determine a market state representation vector. Simultaneously, a scenario code is determined based on the multidimensional feature vectors of each asset at multiple historical moments. Based on the scenario code and the market state representation vector, an asset trading action is determined. Finally, the asset trading action is output. The solution disclosed herein can simultaneously perceive changes in market structure and time series, and can be directly deployed in a live trading environment, providing investment institutions with a high-performance, highly adaptive automated trading solution with extremely high commercial value.

[0009] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0010] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:

[0011] Figure 1 An exemplary system architecture diagram in which an embodiment of the asset transaction action output method of this disclosure can be applied;

[0012] Figure 2 This is a flowchart illustrating one embodiment of the asset transaction action output method disclosed herein;

[0013] Figure 3 This is a flowchart illustrating another embodiment of the asset transaction action output method disclosed herein;

[0014] Figure 4 This is a schematic diagram of the structure of one embodiment of the asset transaction action output device disclosed herein;

[0015] Figure 5This is a schematic diagram of the structure of an embodiment of the electronic device disclosed herein. Detailed Implementation

[0016] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of this disclosure. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure pertains.

[0017] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this disclosure. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms “comprising” and / or “including” are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0018] Where there is no conflict, the embodiments and features described herein can be combined with each other.

[0019] To make the technical solutions and advantages of this disclosure clearer, the following description, in conjunction with the accompanying drawings and specific embodiments, will provide a more detailed account of this disclosure.

[0020] Figure 1 An exemplary system architecture 100 is shown, in which embodiments of the asset transaction action output method or asset transaction action output device of this disclosure can be applied.

[0021] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0022] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications, such as stock trading applications, can be installed on terminal devices 101, 102, and 103.

[0023] Terminal devices 101, 102, and 103 can be either hardware or software. When terminal devices 101, 102, and 103 are hardware, they can be various electronic devices, including but not limited to smartphones, tablets, in-vehicle computers, laptops, and desktop computers. When terminal devices 101, 102, and 103 are software, they can be installed in the electronic devices listed above. They can be implemented as multiple software programs or software modules (e.g., to provide distributed services) or as a single software program or software module. No specific limitations are imposed here.

[0024] Server 105 can be a server that provides various services, such as a backend server that supports stock trading applications installed on terminal devices 101, 102, and 103. The backend server can provide feedback on asset trading actions to the user based on the trading data of each asset in a preset asset pool.

[0025] It should be noted that server 105 can be either hardware or software. When server 105 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When server 105 is software, it can be implemented as multiple software programs or software modules (for example, used to provide distributed services), or as a single software program or software module. No specific limitations are made here.

[0026] It should be noted that the asset transaction action output method provided in this embodiment is generally executed by server 105. Accordingly, the asset transaction action output device is generally located in server 105.

[0027] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0028] Figure 2 A flow 200 illustrating one embodiment of the asset transaction action output method of this disclosure is shown. For example... Figure 2 As shown, the asset transaction action output method in this embodiment may include the following steps:

[0029] Step 201: Obtain the multidimensional feature vectors of each asset in the preset asset pool at multiple historical moments.

[0030] In this embodiment, the executing entity of the asset transaction action output method (e.g., Figure 1The server 105 shown can obtain multidimensional feature vectors of each asset in the preset asset pool at multiple historical moments in various ways. For example, it can obtain them from a device used to store the multidimensional feature vectors of each asset. Alternatively, the executing entity can obtain transaction data of each asset at multiple historical moments, and obtain the aforementioned multidimensional feature vectors by extracting features from the transaction data. The preset asset pool in this embodiment can be the CSI 300 constituent stocks, which consists of 300 stocks with large market capitalization and good liquidity from the Shanghai and Shenzhen Stock Exchanges. Multiple historical moments can be the past few years or several months. The multidimensional feature vectors can be calculated from multiple parameters of the stock. In some specific practices, three categories of 25 parameters can be extracted for each stock in the CSI 300 constituent stocks. For example, 12 technical parameters, 8 fundamental parameters, and 5 alternative data. Technical parameters may include, but are not limited to: momentum, volatility, ATR, and volume-weighted average price over the past 5, 10, and 20 days. Eight fundamental parameters may include, but are not limited to: trailing price-to-earnings ratio (P / E or PER, also known as the price-earnings ratio or market capitalization-earnings ratio, is the ratio of stock price to earnings per share, calculated as stock price divided by earnings per share or market capitalization divided by net profit. This indicator measures stock valuation by assessing investors' willingness to pay for company earnings, and includes four calculation methods: static, dynamic, trailing, and projected), price-to-book ratio (P / B PBR refers to the ratio of stock price per share to book value per share. It reflects the price that common shareholders are willing to pay for each dollar of net assets, representing the market's evaluation of the company's asset quality), ROE (Return on Equity) change rate, revenue growth rate, etc. Five alternative data may include, but are not limited to: BERT sentiment analysis scores based on news and announcements. BERT is a pre-trained language model used for text sentiment classification through transfer learning. The general steps are as follows: Text acquisition and preprocessing: Collect raw text from financial news, company announcements, social media, etc. The text is cleaned, including removing HTML tags, segmentation, and word segmentation (for Chinese). BERT model processing: A pre-trained BERT model on a large general corpus (such as Chinese Wikipedia) is used as the foundation. Incremental pre-training or domain adaptation is performed on financial texts (such as financial news and financial reports) to improve the model's understanding of financial terminology and context. The pre-processed text is then input into the BERT model. BERT generates a context-sensitive vector representation for each token in the text, and specifically utilizes the vector corresponding to the [CLS] tag as a semantic summary of the entire sequence. Sentiment classification head: A classification layer (usually a fully connected neural network) is connected to the output of the BERT model.This classification layer is trained on a manually labeled financial text sentiment dataset, with labels typically being {extremely negative, negative, neutral, positive, extremely positive}. Score generation: The classification layer ultimately outputs a probability distribution representing the probability that the text belongs to each sentiment category. We can: directly take the probability value, such as the probability of the "positive" category; or map the probability distribution to a numerical score, for example: Score = P(extremely positive). 1 + P (front) 0.5 + P (neutral) 0 + P (negative) (-0.5) +P (extremely negative) (-1). Ultimately, each text (news or announcement) is quantified into a continuously varying value within the range [-1, +1], which serves as the sentiment analysis score and is incorporated into the node features.

[0031] In some optional implementations of this embodiment, if the acquired data is trading data for individual stocks, after extracting features from the trading data to obtain the parameters, cross-sectional market capitalization neutralization and Z-Score standardization can be applied to each parameter. Cross-sectional market capitalization neutralization is an important data processing method in quantitative stock selection to eliminate the influence of market capitalization on factors. Its core is to eliminate the correlation between market capitalization and factors through regression analysis, thereby preventing the stock selection results from being overly concentrated on specific stocks. Z-Score standardization, also known as standard deviation standardization or Z-value standardization, is a statistical method that transforms raw data into standardized data with a mean of 0 and a standard deviation of 1. The data processed by this method (i.e., the Z-value) can intuitively reflect the relative position of the raw data in the overall data distribution, effectively eliminating the differences in the dimensions and magnitudes of different variables, making multi-dimensional data comparable.

[0032] Step 202: Determine the sparse adjacency matrix of each asset at a single historical moment based on the multidimensional feature vectors of each asset at that historical moment.

[0033] The executing entity can determine the sparse adjacency matrix for a given historical moment based on the multidimensional feature vectors of each asset. Specifically, the similarity between assets can be calculated. Then, assets are sorted according to their similarity to determine the K most similar assets. The sparse adjacency matrix is ​​constructed using the similarity between these K assets and the assets. Alternatively, a sparse adjacency matrix can be constructed using assets whose similarity to the assets is less than a preset similarity threshold.

[0034] Step 203: Perform spatiotemporal feature fusion on the sparse adjacency matrix of each historical moment to determine the market state representation vector.

[0035] After obtaining the sparse adjacency matrix of a single historical moment, spatiotemporal feature fusion can be performed on the sparse adjacency matrices of different historical moments to determine the market state representation vector. Specifically, the sparse adjacency matrices of different historical moments can first be input into a pre-trained spatiotemporal graph neural network, and the output of this network is the market state representation vector. In some specific practices, spatiotemporal graph neural networks can include graph attention networks (GAT) and temporal convolutional networks (TCN). A graph attention network is a neural network architecture specifically designed for processing graph-structured data. It introduces an attention mechanism to dynamically calculate the importance weights between nodes, thus prioritizing relevant neighboring nodes when updating node features. A temporal convolutional network is a sequence modeling and prediction tool based on convolutional neural networks. Temporal convolutional networks process sequence data through causal convolution and dilated convolution structures, enabling them to capture long-term dependencies and are suitable for tasks such as time series forecasting. The market state representation vector output by the spatiotemporal graph neural network is a fixed-length vector representing the current state of the market.

[0036] Step 204: Determine the scenario code based on the multidimensional feature vectors of each asset at multiple historical moments.

[0037] The executing entity can also determine the context code based on the multidimensional feature vectors of each asset at multiple historical moments. Specifically, the multidimensional feature vectors can be compressed to obtain a low-dimensional vector, which is then used as the context code. Alternatively, the executing entity can input multiple multidimensional feature vectors into a pre-trained context network to obtain the context code. Here, the context network refers to a neural network architecture capable of capturing global context information. The context network enhances the model's understanding of the overall scene by using modules such as dilated convolution, attention mechanisms, or pyramid pooling to expand the receptive field and integrate multi-scale information. The context code output by the context network can represent the current market situation.

[0038] Step 205: Determine the asset transaction action based on the scenario code and the market state representation vector.

[0039] In this embodiment, the executing entity can determine the asset trading action based on the obtained scenario code and market state representation vector. Specifically, the executing entity can query the correspondence between the two and the asset trading action, and determine the specific asset trading action through the above correspondence. Alternatively, the executing entity can input the two into the policy network to obtain the asset trading action. Here, we are referring to the core concepts in reinforcement learning (RL) and game theory. The goal of the policy network is to find a set of optimal neural network parameters such that executing this policy yields the maximum cumulative expected return. Asset trading actions can include trading and not trading, as well as the probability corresponding to each action.

[0040] Step 206: Output the asset transaction action.

[0041] After receiving the asset transaction action, the executing entity can output the asset transaction action. Technical personnel can then decide whether to proceed with the asset transaction based on this action.

[0042] The asset trading action output method provided by the above embodiments of this disclosure can obtain multi-dimensional feature vectors of each asset in a preset asset pool at multiple historical moments. Based on the multi-dimensional feature vectors of each asset at a single historical moment, a sparse adjacency matrix for that historical moment is determined. Furthermore, spatiotemporal feature fusion is performed on each of the multi-dimensional feature vectors and the sparse adjacency matrix at each historical moment to determine a market state representation vector. Simultaneously, a scenario code is determined based on the multi-dimensional feature vectors of each asset at multiple historical moments. Based on the scenario code and the market state representation vector, an asset trading action is determined. Finally, the asset trading action is output. The solution disclosed in this disclosure can simultaneously perceive changes in market structure and time series changes, and can be directly deployed in a live trading environment, providing investment institutions with a high-performance, highly adaptive automated trading solution with extremely high commercial value.

[0043] See also Figure 3 This illustrates flow 300 of another embodiment of the asset transaction action output method according to this disclosure. (See also...) Figure 3 As shown, the method in this embodiment may include the following steps:

[0044] Step 301: Obtain the multidimensional feature vectors of each asset in the preset asset pool at multiple historical moments.

[0045] Step 302: Determine the feature similarity between assets at a given historical moment based on the multidimensional feature vectors of each asset at that historical moment; for a single asset, determine the K most similar assets to the asset based on the feature similarity between the asset and other assets, where K is a preset value; determine the sparse adjacency matrix at that historical moment based on the feature similarity between the K assets and the asset.

[0046] In this embodiment, after obtaining the multidimensional feature vectors of each asset at multiple historical moments, the similarity can first be calculated for the multidimensional feature vectors of each asset at a single historical moment to obtain the feature similarity between assets at that single historical moment. Specifically, a Gaussian kernel function can be used to map the feature distance between assets to a connection strength between 0 and 1. The more similar (closer) two assets are, the stronger their connection. The closer the distance between two points, the closer the connection strength is to 1; the more dissimilar the points (the farther apart they are), the closer the connection strength is to 0. The specific calculation formula is as follows:

[0047] .

[0048] in, x i , x j Each represents a historical moment t ,assets i and assets j eigenvectors; Representing vectors x i and x j The square of the Euclidean distance between the two assets. This is a measure of the distance between the two assets. x i and x j A measure of similarity in the current feature space. The smaller the distance, the stronger the similarity. x i and x j The more similar the similarities in the current performance, the better. σ (Sigma) represents the scaling parameter. It is a hyperparameter greater than 0 that controls how sensitive the similarity is to distance. When the value of σ is large, the impact of distance differences on the results becomes smaller, and the generated graph is denser. When the value of σ is small, the model is more sensitive to distance, and only very similar assets are connected, resulting in a sparser graph. Represents the first element in the output adjacency matrix. i Line number j The elements of the column, i.e., assets i and j The connection strength or edge weight between them.

[0049] After calculating the feature similarity between each asset, we can retain the K most similar assets for each asset. Using the feature similarity between each asset and the K assets, we construct a sparse adjacency matrix. Alternatively, we can use feature similarities below a preset threshold as elements in the sparse adjacency matrix, ultimately obtaining the complete sparse adjacency matrix. The value of K can be set according to the actual application scenario. In some specific practices, K=10.

[0050] Step 303: For a single historical moment, spatial dimension aggregation is performed on the sparse adjacency matrix of that historical moment and the multidimensional feature vectors of each asset at that historical moment to obtain the spatial aggregation vector of each asset at that historical moment; the temporal dependency between the spatial aggregation vectors of each asset at different historical moments is captured to obtain the time vector of each asset; attention weighting is applied to the time vector of each asset to obtain the market state representation vector.

[0051] After obtaining the sparse adjacency matrix for a single historical moment, the spatial dimension of this matrix can be aggregated with the multidimensional feature vectors of each asset at that historical moment to obtain the spatial aggregated vector for each asset. Specifically, the sparse adjacency matrix and the multidimensional feature vectors of each asset can be weighted to obtain the spatial aggregated vector. Alternatively, weights can be assigned to the multidimensional feature vectors of each asset. Then, the multidimensional feature vectors of each asset are updated using the respective multidimensional feature vectors and their corresponding weights. This ultimately updates the sparse adjacency matrix.

[0052] After obtaining the spatial aggregation vector corresponding to a single historical moment, these vectors can be arranged chronologically to form a spatial aggregation vector sequence. Then, the temporal dependency of this sequence is learned to obtain the time vector for each asset. Specifically, this can be achieved by convolving the learned spatial aggregation vector sequence to obtain the time vector for each asset.

[0053] Finally, attention-weighted summaries are applied to the time vectors of each asset to obtain the market state representation vector. Specifically, the attention mechanism of temporal convolutional networks can be utilized, which allows the model to dynamically focus on key parts of the input when processing sequences.

[0054] In some optional implementations of this embodiment, the spatial aggregation vector of each asset can be determined through the following steps:

[0055] Step 3031: Determine the attention coefficients between assets based on the sparse adjacency matrix.

[0056] Step 3032: For each asset, normalize the attention coefficient between the asset and other assets to determine the attention weight between the asset and other assets.

[0057] Step 3033: Determine the spatial aggregation vector of the asset based on the multidimensional feature vector of the asset, the multidimensional feature vectors of other assets, and the attention weight.

[0058] In this implementation, the attention coefficients between assets can first be determined based on the sparse adjacency matrix. Here, the attention coefficient represents the importance of one asset's information to another asset. Specifically, the attention coefficient can be calculated using the following formula:

[0059] .

[0060] in, e ij Attention coefficient i and j These are two nodes in a sparse adjacency matrix (i.e., two assets in a pre-defined asset pool). x i and x j For assets i and assets j The multidimensional feature vectors, where W is a learnable weight matrix. It is a learnable attention vector. This represents vector concatenation. The parameters W and... It is learned through backpropagation of training data, rather than being pre-set.

[0061] After determining the attention coefficients, they can be normalized to obtain the attention weights between each asset. Understandably, assets with higher weights... j Its information in assets i The new features dominate. Finally, for the multidimensional feature vector of a single asset, the multidimensional feature vector of the asset can be updated by utilizing the multidimensional feature vectors of other assets related to that asset and attention weights, thus achieving spatial aggregation of information.

[0062] In some practical applications, graph attention networks (such as GATv2) can be used to spatially aggregate nodes in a sparse adjacency matrix. Multiple attention heads (e.g., 4 or 8) can be set in a graph attention network. Multiple attention heads allow the graph attention network to learn node relationships from different representation subspaces, thus capturing key nodes more stably and comprehensively.

[0063] In some optional implementations of this embodiment, the temporal dependencies between spatial aggregation vectors can be captured through the following steps:

[0064] Step 3034: For a single asset, combine the spatial aggregation vectors of each historical moment in chronological order to obtain a spatial aggregation vector sequence.

[0065] Step 3035: Perform dilated causal convolution on the spatial aggregation vector sequence to obtain the time vector of each asset.

[0066] In this implementation, after obtaining the spatial aggregation vectors of each asset, the spatial aggregation vectors of each historical moment can be combined according to their chronological order to obtain a spatial aggregation vector sequence. Then, dilated causal convolution is performed on the spatial aggregation vector sequence to obtain the time vector of each asset. Specifically, dilated causal convolution can be performed using the following formula:

[0067] For any spatial aggregation vector in the spatial aggregation vector sequence x ∈R T Dilated causal convolution operation:

[0068] .

[0069] in, ω The convolution kernel weights (size is...) k ), d It is the expansion rate, when t - d • i When <0, x t-d•i =0.

[0070] In some specific practices, the above operations can be achieved using temporal convolutional networks.

[0071] Step 304: Determine the scenario code based on the multidimensional feature vectors of each asset at multiple historical moments.

[0072] In this embodiment, multidimensional feature vectors of each asset at multiple historical moments can be encoded to determine the context code. Here, the context code is a low-dimensional vector that enriches the representation of local features by capturing global context information. Its function is to provide context for the strategy, telling the strategy "what is the current market situation" and whether an aggressive or conservative approach should be adopted.

[0073] Step 305: Perform feature fusion on the scenario code and market state representation vector to determine the asset transaction action and its corresponding probability distribution.

[0074] After obtaining the scenario encoding, it can be fused with the market state representation vector to determine the asset trading action and its corresponding probability distribution. Specifically, both can be input into a strategy network, whose output includes the asset trading action and its corresponding probability distribution. Here, the strategy network is implemented using a neural network, which can learn a mapping strategy from state to action. The asset trading action can include trading or not trading, along with the probability distributions for each action. The sum of the two probability distributions is 1.

[0075] Step 306: Determine the profit reward and risk penalty based on the asset transaction action; determine the reward function based on the profit reward and risk penalty; update the asset transaction action based on the reward function.

[0076] After determining the asset transaction action, the profit reward and risk penalty can be determined. Here, the profit reward and risk penalty can be calculated according to a preset formula. Then, the profit reward and risk penalty are weighted to obtain the reward function. Finally, the asset transaction action is updated based on the feedback from the reward function. Specifically, the reward function can be shown as follows:

[0077] .

[0078] Where μ is the risk-reward coefficient, λ is the risk-aversion coefficient, and μ Return t As a reward for profits, λ Volatility t As a risk penalty.

[0079] In some specific practices, a meta-reinforcement learning agent (Meta-RL Agent with PEARL) can be used to output asset trading actions. The meta-reinforcement learning agent can include a context encoder and a policy network. The context encoder can be a 6-layer multilayer perceptron (MLP), which encodes multi-dimensional feature vectors into 16-dimensional latent vectors. The policy network can be a 4-layer MLP, which outputs asset trading actions. Asset trading actions can include position size and range [-1, 1]. When the agent's actions lead to high volatility, Volatility t The value will increase. Because it has a negative sign and a coefficient λ in front of it, this will directly affect the total reward. R t Decrease. Therefore, in order to obtain a higher total reward, the agent not only needs to learn how to earn money (improve) Return t Furthermore, one must proactively learn how to avoid significant fluctuations in account net value (control). Volatility t By adjusting the value of λ, we can control the trade-off between "profit" and "robustness" of the agent. The larger λ is, the more conservative the agent's behavior becomes.

[0080] In some optional implementations of this embodiment, the meta-reinforcement learning agent can utilize trading data of the CSI 300 constituent stocks from the past five years. The data from the first three years is used as the training set, and the data from the last two years as the test set. More than 500 different tasks are sampled from the training set, each task corresponding to a random time window. Here, the correspondence between windows and tasks is determined through sliding window sampling. Each time window is an independent task environment. Unsupervised clustering algorithms are used to automatically learn and summarize from the statistical features of each window. This is a data-driven and objective partitioning method. These 500 tasks explicitly and evenly cover all the different market states discovered through clustering. This provides the agent with diverse "scenario experiences," enabling it to quickly call upon existing knowledge to adapt when encountering any similar scenarios in the future. In summary, unsupervised clustering methods are used to partition historical time windows into market states, and a meta-training task set covering multiple market states is constructed based on the partitioning results, enabling the agent to acquire robust adaptability across cycles. Market states can include bull markets, bear markets, and sideways markets. After the agent has been trained, the training results can be tested using data from the test set.

[0081] Step 307: Output the asset transaction action.

[0082] The asset trading action output method provided in the above embodiments of this disclosure deeply integrates dynamic graph learning and meta-reinforcement learning to construct an end-to-end framework capable of simultaneously perceiving changes in market structure and time series. This system can be directly deployed in live trading environments, providing investment institutions with a high-performance, highly adaptive automated trading solution with significant commercial value.

[0083] Further reference Figure 4 As an implementation of the methods shown in the above figures, this disclosure provides an embodiment of an asset transaction action output device, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.

[0084] like Figure 4 As shown, the asset transaction action output device 400 of this embodiment includes: a vector acquisition unit 401, a matrix determination unit 402, a vector fusion unit 403, a scenario encoding unit 404, an action determination unit 405, and an action output unit 406.

[0085] The vector acquisition unit 401 is configured to acquire the multidimensional feature vectors of each asset in the preset asset pool at multiple historical moments.

[0086] The matrix determination unit 402 is configured to determine the sparse adjacency matrix of a historical moment based on the multidimensional feature vectors of each asset at a single historical moment.

[0087] The vector fusion unit 403 is configured to perform spatiotemporal feature fusion on the sparse adjacency matrix of each historical moment to determine the market state representation vector.

[0088] Context coding unit 404 is configured to determine context coding based on the multidimensional feature vectors of each asset at multiple historical moments.

[0089] Action determination unit 405 is configured to determine asset transaction actions based on scenario coding and market state representation vector.

[0090] Action output unit 406 is configured to output asset transaction actions.

[0091] In addition, an electronic device is also proposed in the technical solution of this application.

[0092] Figure 5 A schematic diagram of the structure of an electronic device provided in one embodiment of the present disclosure is shown.

[0093] like Figure 5 As shown, the electronic device may include a processor 501, a memory 502, a bus 503, and a computer program stored in the memory 502 and executable on the processor 501. The processor 501 and the memory 502 communicate with each other via the bus 503. When the processor 501 executes the computer program, it implements the steps of the above method, including, for example: obtaining multi-dimensional feature vectors of each asset in a preset asset pool at multiple historical moments; determining the sparse adjacency matrix of each historical moment based on the multi-dimensional feature vectors of each asset at a single historical moment; performing spatiotemporal feature fusion on the sparse adjacency matrices of each historical moment to determine a market state representation vector; determining a scenario code based on the multi-dimensional feature vectors of each asset at multiple historical moments; determining an asset trading action based on the scenario code and the market state representation vector; and outputting the asset trading action.

[0094] In addition, one embodiment of this disclosure also provides a non-transitory computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements the steps of the above-described method, including, for example,: obtaining multi-dimensional feature vectors of each asset in a preset asset pool at multiple historical moments; determining a sparse adjacency matrix of a historical moment based on the multi-dimensional feature vectors of each asset at a single historical moment; performing spatiotemporal feature fusion on the sparse adjacency matrices of each historical moment to determine a market state representation vector; determining a scenario code based on the multi-dimensional feature vectors of each asset at multiple historical moments; determining an asset trading action based on the scenario code and the market state representation vector; and outputting the asset trading action.

[0095] In summary, the technical solution disclosed herein can obtain multi-dimensional feature vectors of each asset in a preset asset pool at multiple historical moments. Based on the multi-dimensional feature vectors of each asset at a single historical moment, a sparse adjacency matrix for that historical moment is determined. Furthermore, spatiotemporal feature fusion is performed on each of the multi-dimensional feature vectors and the sparse adjacency matrix at each historical moment to determine a market state representation vector. Simultaneously, a scenario code is determined based on the multi-dimensional feature vectors of each asset at multiple historical moments. Based on the scenario code and the market state representation vector, an asset trading action is determined. Finally, the asset trading action is output. This disclosed solution can simultaneously perceive changes in market structure and time series, and can be directly deployed in a live trading environment, providing investment institutions with a high-performance, highly adaptive automated trading solution with extremely high commercial value.

[0096] The above description is merely a preferred embodiment of this disclosure and is not intended to limit this disclosure. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method for outputting asset transaction actions, comprising: Obtain the multidimensional feature vectors of each asset in the preset asset pool at multiple historical moments; Based on the multidimensional feature vectors of each asset at a single historical moment, determine the sparse adjacency matrix for that historical moment. Spatiotemporal feature fusion is performed on the sparse adjacency matrix at each historical moment to determine the market state representation vector; Context coding is determined based on the multidimensional feature vectors of each asset at multiple historical moments; Based on the scenario code and the market state representation vector, the asset trading action is determined; Output the asset transaction action.

2. The method according to claim 1, wherein, The step of determining the sparse adjacency matrix for a single historical moment based on the multidimensional feature vectors of each asset at that historical moment includes: Based on the multidimensional feature vectors of each asset at a single historical moment, determine the feature similarity between the assets at that historical moment; For a single asset, based on the similarity of the asset to other assets, determine the K assets that are most similar to the asset, where K is a preset value; Based on the similarity of the characteristics of the K assets to this asset, the sparse adjacency matrix at this historical moment is determined.

3. The method according to claim 1, wherein, The step of fusing spatiotemporal features of each of the multidimensional feature vectors and the sparse adjacency matrix at each historical time point to determine the market state representation vector includes: For a single historical moment, the sparse adjacency matrix of that historical moment and the multidimensional feature vectors of each asset at that historical moment are spatially aggregated to obtain the spatial aggregated vector of each asset at that historical moment. By capturing the temporal dependencies between the spatial aggregation vectors of each asset at different historical moments, the temporal vectors of each asset are obtained. Attention weighting is applied to the time vectors of each asset to obtain the market state representation vector.

4. The method according to claim 3, wherein, The spatial dimension aggregation of the sparse adjacency matrix and the multidimensional feature vectors to obtain the spatial aggregation vector of each asset includes: Based on the sparse adjacency matrix, the attention coefficients between each asset are determined; For each asset, the attention coefficient between that asset and other assets is normalized to determine the attention weight between that asset and other assets; Based on the multidimensional feature vector of the asset, the multidimensional feature vectors of other assets, and the attention weight, the spatial aggregation vector of the asset is determined.

5. The method according to claim 4, wherein, The process of capturing the temporal dependencies between the spatial aggregation vectors of assets at different historical moments to obtain the temporal vectors of each asset includes: For a single asset, the spatial aggregation vectors of each historical moment are combined in chronological order to obtain a spatial aggregation vector sequence. Dilated causal convolution is performed on the spatial aggregated vector sequence to obtain the time vector of each asset.

6. The method according to claim 1, wherein, The step of determining asset trading actions based on the scenario code and the market state representation vector includes: The scenario code and the market state representation vector are fused to determine the asset trading actions and their corresponding probability distributions.

7. The method according to claim 1, wherein, The method further includes: Based on the asset trading activities described, the profit rewards and risk penalties are determined; The reward function is determined based on the aforementioned profit reward and risk penalty; The asset transaction action is updated based on the reward function.

8. An asset transaction action output device, comprising: The vector acquisition unit is configured to acquire the multidimensional feature vectors of each asset in a preset asset pool at multiple historical moments. The matrix determination unit is configured to determine the sparse adjacency matrix of a historical moment based on the multidimensional feature vectors of each asset at a single historical moment. The vector fusion unit is configured to perform spatiotemporal feature fusion on the sparse adjacency matrix at each historical moment to determine the market state representation vector. The scenario coding unit is configured to determine the scenario code based on the multidimensional feature vectors of each asset at multiple historical moments; The action determination unit is configured to determine the asset transaction action based on the scenario code and the market state representation vector; The action output unit is configured to output the asset transaction action.

9. An electronic device comprising a memory, a processor, a bus, and a computer program stored in the memory and executable on the processor, wherein, When the processor executes the computer program, it implements the asset transaction action output method as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the asset transaction action output method as described in any one of claims 1 to 7.