Lock sink strategy generation method and device based on generative agent, and electronic equipment
By generating multimodal exchange rate paths through generative agents and combining diffusion models and adversarial networks, the hedging strategy is dynamically adjusted, which solves the problem of insufficient accuracy in exchange rate risk management in existing technologies and achieves efficient exchange rate risk control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-25
- Publication Date
- 2026-03-31
AI Technical Summary
In high-frequency, small-amount cross-border payments, existing technologies suffer from high costs and fixed strategies for static hedging tools, while dynamic hedging strategies ignore the complexity of exchange rate fluctuation paths, resulting in insufficient accuracy and an inability to effectively manage exchange rate risks.
A generative agent is adopted to generate benchmark and extreme exchange rate paths by preprocessing and fusing multimodal data, using diffusion models and adversarial networks, and dynamically generating exchange rate hedging strategies by combining the exchange rate simulation environment and reward function.
It improves the accuracy and flexibility of exchange rate hedging strategies, enabling real-time responses to market fluctuations, reducing exchange rate risk, and minimizing financial losses from small payments.
Smart Images

Figure CN121766080A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence, fintech, or other related fields. Specifically, it relates to a method, apparatus, and electronic device for generating hedging strategies based on generative agents. Background Technology
[0002] With the acceleration of global economic integration and the rapid development of e-commerce, cross-border payments have become an indispensable part of business activities. Especially for cross-border e-commerce, international supply chain management, and personal overseas consumption, the demand for high-frequency, small-amount payments is increasing. However, the volatility of exchange rates in the international currency market brings significant risks to such payments, particularly when the transaction involves currency exchange at a specific point in time; uncertain exchange rate trends may cause additional economic losses for either the payer or the payee.
[0003] There are two main types of exchange rate risk management methods in related technologies: static hedging tools and dynamic hedging strategies. Static hedging tools, such as forward exchange contracts and foreign exchange swaps, allow parties to transact at a predetermined exchange rate at a specific future time. While they provide a sense of security in locking in exchange rates, their effectiveness is significantly reduced for high-frequency, small-amount cross-border payments due to high transaction fees and fixed strategy restrictions. On the other hand, dynamic hedging strategies, such as exchange rate forecasting based on traditional machine learning models, aim to dynamically adjust hedging strategies based on historical data to cope with market fluctuations. However, these methods typically only predict a single future exchange rate value, ignoring the diversity and complexity of exchange rate fluctuation paths. Especially in rapidly changing market environments, the accuracy of such predictions is often greatly limited.
[0004] There is currently no effective solution to the above problems. Summary of the Invention
[0005] This invention provides a method, apparatus, and electronic device for generating exchange rate hedging strategies based on generative agents, in order to at least solve the technical problem of low accuracy when using a single exchange rate analysis method in the process of financial exchange rate risk management.
[0006] To achieve the above objectives, according to one aspect of this application, a method for generating exchange rate hedging strategies based on a generative agent is provided, comprising: preprocessing and fusing multimodal data to obtain a multidimensional feature vector set; inputting the multidimensional feature vector set into a generative agent to output a baseline path set and an extreme path set, wherein the generative agent includes a pre-trained diffusion model for generating baseline paths and a pre-trained adversarial network model for generating extreme paths, the baseline path including exchange rate fluctuation data under normal operating conditions, and the extreme path including exchange rate fluctuation data when abnormal events occur; inputting the baseline path set and the extreme path set into an exchange rate simulation environment to generate a target exchange rate hedging strategy and exchange rate hedging strategy profit data, wherein the exchange rate simulation environment includes a predefined multidimensional state space, action space, and reward function, the input parameters of the multidimensional state space including the baseline path and the extreme path, the action space outputting multiple exchange rate hedging actions of the target exchange rate hedging strategy, and the reward function used to determine the expected profit data corresponding to each of the exchange rate hedging actions.
[0007] Optionally, the steps of preprocessing and fusing multimodal data to obtain a multidimensional feature vector set include: acquiring structured data and unstructured data to obtain the multimodal data, wherein the structured data includes at least one of the following: real-time exchange rate data, transaction volume data, and volatility data obtained through an application programming interface (API); and the unstructured data includes at least one of the following: news text of cross-border payment orders generated by a payment system and user comments from various social media platforms; preprocessing the structured data and the unstructured data; and fusing the structured data and the unstructured data using a gated recurrent unit (GRU) network to output the multidimensional feature vector set.
[0008] Optionally, the preprocessing steps for the structured data and the unstructured data include: performing time series alignment, missing value imputation, and feature engineering on the structured data; and performing text vectorization and sentiment index analysis on the unstructured data.
[0009] Optionally, the step of inputting the multidimensional feature vector set into the generative agent and outputting a baseline path set and an extreme path set includes: inputting the exchange rate time series and the multidimensional feature vector set into the diffusion model in the generative agent; adding Gaussian noise to the exchange rate time series as the main generation variable to generate a noisy sequence; performing a denoising operation on the noisy sequence by the diffusion model, analyzing the exchange rate changes at multiple time steps, and outputting a baseline path set and a baseline confidence interval for multiple time steps, wherein the baseline confidence interval is used to limit the range of exchange rate adjustment for the baseline path set.
[0010] Optionally, the step of denoising the noise sequence by the diffusion model includes: calling a multi-layer preset convolutional neural network U-Net by the diffusion model to denoise the noise sequence. The preset U-Net is used to denoise the noise sequence, and multi-dimensional feature vectors are used as conditional inputs in the generation process. Each layer of the preset convolutional neural network U-Net contains two convolutional blocks and the activation function is the ReLU activation function.
[0011] Optionally, the step of inputting the multidimensional feature vector set into the generative agent and outputting a baseline path set and an extreme path set includes: inputting pre-acquired random noise and historical volatility data into the generator of the adversarial network model in the generative agent to generate an initial extreme path set, wherein the generator is based on a Transformer encoder architecture; inputting the initial extreme path set into the discriminator of the adversarial network model, wherein the discriminator distinguishes between the real historical exchange rate path and multiple initial extreme paths, and outputs the true probability value of each initial extreme path, wherein the discriminator is based on a Transformer decoder architecture; and the generator of the adversarial network model filters the initial extreme paths according to the true probability values to obtain the extreme path set.
[0012] Optionally, the step of inputting the benchmark path set and the extreme path set into an exchange rate simulation environment to generate a target hedging strategy and hedging strategy profit data includes: inputting the benchmark path set and the extreme path set into the exchange rate simulation environment; inputting multi-dimensional feature vectors into the state space of each dimension in the exchange rate simulation environment; performing combination processing of multiple types of hedging actions by the action space based on the feature vectors of the multi-dimensional state space, the benchmark path and the extreme path, and outputting the target hedging strategy, wherein the multiple types of hedging actions include: extraction hedging action, delayed hedging action, split hedging action and extended action; and outputting the hedging strategy profit data based on the reward function, considering the exchange rate, transaction cost and risk penalty coefficient when executing each type of hedging action.
[0013] Optionally, after inputting the baseline path set and the extreme path set into the exchange rate simulation environment to generate the target hedging strategy and hedging strategy profit data, the method further includes: generating a hedging request based on the target hedging strategy, the transaction amount, and the execution time period; submitting the hedging request through a financial application programming interface (API) and receiving the transaction result, wherein the transaction result includes at least one of the following: the actual exchange rate, the transaction fee cost, and the transaction execution time; storing the transaction result in a database; determining the actual path data and the actual reward value using the transaction result; and updating the model parameters of each model in the generative agent using the actual path data and the actual reward value.
[0014] According to another aspect of the present invention, a device for generating exchange rate hedging strategies based on generative agents is also provided, comprising: a multimodal data processing unit for preprocessing and fusing multimodal data to obtain a multidimensional feature vector set; a generative agent action unit for inputting the multidimensional feature vector set into a generative agent and outputting a baseline path set and an extreme path set, wherein the generative agent includes a pre-trained diffusion model for generating baseline paths and a pre-trained adversarial network model for generating extreme paths, the baseline path including exchange rate fluctuation data under normal operating conditions, and the extreme path including exchange rate fluctuation data when abnormal events occur; and a hedging unit for inputting the baseline path set and the extreme path set into an exchange rate simulation environment to generate a target hedging strategy and hedging strategy profit data, wherein the exchange rate simulation environment includes a defined multidimensional state space, an action space, and a reward function, the input parameters of the multidimensional state space including the baseline path and the extreme path, the action space outputting multiple hedging actions of the target hedging strategy, and the reward function for determining the expected profit data corresponding to each hedging action.
[0015] Optionally, the multimodal data processing unit includes: a data acquisition module for acquiring structured data and unstructured data to obtain the multimodal data, wherein the structured data includes at least one of the following: real-time exchange rate data, transaction volume data, and volatility data acquired through an application programming interface (API); and the unstructured data includes at least one of the following: news text of cross-border payment orders generated by a linked payment system and user comments from various social media platforms; a preprocessing module for preprocessing the structured data and the unstructured data; and a data fusion module for fusing the structured data and the unstructured data using a gated recurrent unit (GRU) network to output the multidimensional feature vector set.
[0016] Optionally, the preprocessing module includes: a first preprocessing submodule, used to perform time series alignment, missing value imputation, and feature engineering on the structured data; and a second preprocessing submodule, used to perform text vectorization and sentiment index analysis on the unstructured data.
[0017] Optionally, the generative agent action unit includes: a first input module, used to input the exchange rate time series and the multidimensional feature vector set into the diffusion model in the generative agent; a noise addition module, used to add Gaussian noise to the exchange rate time series, which is the main variable of generation, to generate a noise sequence; and a denoising module, used to perform denoising operation on the noise sequence by the diffusion model, analyze the exchange rate changes at multiple time steps, and output a baseline path set and a baseline confidence interval for multiple time steps, wherein the baseline confidence interval is used to limit the range of exchange rate adjustment intervals of the baseline path set.
[0018] Optionally, the denoising module includes: a network invocation submodule, used by the diffusion model to invoke a multi-layer preset convolutional neural network U-Net to perform denoising operations on the noise sequence. The preset U-Net is used to denoise the noise sequence, and multi-dimensional feature vectors are used as conditional inputs to participate in the generation during the denoising process. Each layer of the preset convolutional neural network U-Net contains two convolutional blocks and the activation function is the ReLU activation function.
[0019] Optionally, the generative agent action unit further includes: a second input module, used to input pre-acquired random noise and historical volatility data into the generator of the adversarial network model in the generative agent to generate an initial extreme path set, wherein the generator is generated based on a Transformer encoder architecture; a third input module, used to input the initial extreme path set into the discriminator of the adversarial network model, wherein the discriminator distinguishes between the real historical exchange rate path and multiple initial extreme paths, and outputs the true probability value of each initial extreme path, wherein the discriminator is generated based on a Transformer decoder architecture; and a path filtering module, used by the generator of the adversarial network model to filter the initial extreme paths according to the true probability values to obtain the extreme path set.
[0020] Optionally, the exchange rate locking unit includes: a fourth input module, used to input the baseline path set and the extreme path set into the exchange rate simulation environment, and input multi-dimensional feature vectors into the state space of each dimension in the exchange rate simulation environment; an action combination module, used to perform combination processing of multiple types of exchange rate locking actions based on the feature vectors of the multi-dimensional state space, the baseline path and the extreme path, and output the target exchange rate locking strategy, wherein the multiple types of exchange rate locking actions include: extraction locking action, delayed locking action, split locking action and extended action; and an exchange rate locking profit determination module, used to output the exchange rate locking strategy profit data based on the reward function, the exchange rate, transaction cost and risk penalty coefficient when executing each type of exchange rate locking action.
[0021] Optionally, the hedging strategy generation device based on generative agents further includes: a hedging request generation unit, used to generate a hedging request based on the target hedging strategy, transaction amount, and execution time period after inputting the baseline path set and the extreme path set into the exchange rate simulation environment to generate target hedging strategy and hedging strategy profit data; a hedging request submission unit, used to submit the hedging request through a financial application programming interface (API) and receive the transaction result, wherein the transaction result includes at least one of the following: actual exchange rate, transaction fee cost, and transaction execution time; a transaction result storage unit, used to store the transaction result in a database; and a model update unit, used to determine the actual path data and actual reward value using the transaction result, and update the model parameters of each model in the generative agent using the actual path data and the actual reward value.
[0022] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute the above-described generative agent-based pooling strategy generation method.
[0023] According to another aspect of the present invention, an electronic device is also provided, including one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the generative agent-based pooling strategy generation method described above.
[0024] According to another aspect of the present invention, a computer program product is also provided, including a computer program that, when executed by a processor, implements the steps of the generative agent-based pooling strategy generation method described above.
[0025] In this disclosure, multimodal data is preprocessed and fused to obtain a multidimensional feature vector set. This multidimensional feature vector set is then input into a generative agent, which outputs a baseline path set and an extreme path set. The generative agent includes a pre-trained diffusion model for generating the baseline path and a pre-trained adversarial network model for generating the extreme path. The baseline path includes exchange rate fluctuation data under normal operating conditions, and the extreme path includes exchange rate fluctuation data when abnormal events occur. The baseline path set and the extreme path set are then input into an exchange rate simulation environment to generate a target hedging strategy and hedging strategy profit data. The exchange rate simulation environment includes a predefined multidimensional state space, action space, and reward function. The input parameters of the multidimensional state space include the baseline path and the extreme path. The action space outputs multiple hedging actions of the target hedging strategy, and the reward function is used to determine the expected profit data corresponding to each hedging action.
[0026] Based on the aforementioned publicly available information, through multimodal data fusion, generative agent-driven exchange rate path simulation, and hedging strategy generation, it is possible to generate exchange rate paths covering a variety of possibilities. By running two models in parallel, all possible exchange rate paths can be evaluated more comprehensively, improving the quality of the basis for hedging strategy formulation. Based on the generated multi-path predictions, hedging strategies can be dynamically adjusted (such as early hedging, delayed hedging, and split hedging), responding to market fluctuations in real time, reducing risks, and thus solving the technical problem of low accuracy when using a single exchange rate analysis method in the process of financial exchange rate risk management. Attached Figure Description
[0027] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0028] Figure 1 A hardware structure block diagram of a computer terminal (or mobile device) for implementing a generative agent-based pooling strategy generation method is shown.
[0029] Figure 2 This is a flowchart of an optional method for generating a pooling strategy based on a generative agent according to an embodiment of the present invention;
[0030] Figure 3 This is a schematic diagram of an optional pooling strategy generation device based on generative agents according to an embodiment of the present invention;
[0031] Figure 4 This is a structural block diagram of an electronic device that executes a method for generating pooling strategies based on generative agents, according to an embodiment of this application. Detailed Implementation
[0032] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0033] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0034] To facilitate understanding of the present invention by those skilled in the art, some terms or nouns involved in the various embodiments of the present invention are explained below:
[0035] Generative Artificial Intelligence, or generative agents / generative AI for short, is a machine learning technique that learns from training data and generates new, similar data. In this invention, generative agents are used to simulate multiple possible paths for future exchange rates, providing a more comprehensive risk assessment for cross-border payments.
[0036] The Diffusion Model (DM) is a generative agent model that generates data by progressively adding noise and then learning to remove it. In this invention, the diffusion model is used to generate a baseline path for exchange rate fluctuations, covering daily and normal fluctuations.
[0037] Generative Adversarial Networks (GANs) consist of two deep neural networks: a generator and a discriminator, which compete with each other to improve the quality of the generated data. This invention utilizes a GAN to generate extreme paths of exchange rate fluctuations to simulate the impact of sudden market events on exchange rates.
[0038] Proximal Policy Optimization (PPO) is a reinforcement learning algorithm particularly suitable for policy optimization problems. It stabilizes the training process and avoids significant performance degradation by updating the policy to minimize the deviation from the old policy. In this invention, PPO is used to optimize a hedging strategy, dynamically adjusting the optimal action plan based on the generated exchange rate path.
[0039] Multimodal Data Fusion (MDF) refers to combining different types of input data (e.g., images, text, time series, etc.) to understand and process information from multiple perspectives. In this invention, structured data (exchange rate time series) and unstructured data (news text, social media content) are fused to obtain a more comprehensive representation of market conditions and enhance forecast accuracy.
[0040] Volatility, or Vol for short, is a statistical indicator that measures the degree of change in asset prices, typically referring to the standard deviation of price fluctuations over a period of time. In this invention, it is used to quantify exchange rate instability, serving as an important basis for assessing exchange rate risk.
[0041] Foreign Exchange Hedging Strategy (FHS) is a method for managing exchange rate risk in cross-border payments. This can be achieved by purchasing foreign exchange contracts in advance to lock in future exchange rates or by dynamically selecting the timing of hedging based on exchange rate forecasts.
[0042] Long Short-Term Memory (LSTM) networks are an improved version of recurrent neural networks, particularly well-suited for processing and predicting time-series patterns in data. In the data preprocessing module, LSTMs are used to fill in missing values in time series data to ensure data integrity and consistency.
[0043] A Gated Recurrent Unit (GRU) is an improved recurrent neural network unit. Compared to LSTM, it has a simpler structure and reduces computational resource requirements. In this invention, the GRU is used to fuse time-series data and text vectors to generate a comprehensive market state representation.
[0044] The Relative Strength Index (RSI) is a commonly used technical analysis indicator used to assess the strength of an asset's price movement. It is calculated based on the price fluctuations over a specific period and ranges from 0 to 100. It is typically used to determine whether the market is overbought or oversold.
[0045] The Moving Average Convergence Divergence (MACD) is a trend-following indicator that reveals changes in price trends by calculating the deviation between two different moving averages. In this invention, it is used for feature engineering within the data preprocessing module.
[0046] An Application Programming Interface (API) allows different software components to communicate with each other. In the hedging execution and feedback module, the API is used as an interface with the banking system to execute hedging strategies and collect transaction feedback.
[0047] U-Net is a convolutional neural network architecture used for image segmentation, but in this invention it is extended to the processing of time series data. U-Net gradually removes noise added to exchange rate data through convolution and upsampling (or transposed convolution) processes to generate predictions of future exchange rate paths.
[0048] It should be noted that the method and apparatus for generating exchange rate hedging strategies based on generative intelligent agents in this disclosure can be used in the field of artificial intelligence technology to simulate exchange rate paths and generate exchange rate hedging strategies based on generative artificial intelligence agents. It can also be used in any field other than the field of artificial intelligence technology to simulate exchange rate paths and generate exchange rate hedging strategies based on generative artificial intelligence agents. This disclosure does not limit the application field of the method and apparatus for generating exchange rate hedging strategies based on generative intelligent agents.
[0049] It should be noted that the information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, and displayed data) collected in this public disclosure are information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of related data all comply with the relevant laws, regulations, and standards of the relevant regions, necessary confidentiality measures have been taken, and they do not violate public order and good morals. Corresponding operation entry points are provided for users to choose to authorize or refuse. For example, this system has interfaces with relevant users or organizations. Before obtaining relevant information, a request to obtain the information needs to be sent to the aforementioned user or organization through the interface, and the relevant information is obtained only after receiving consent from the aforementioned user or organization.
[0050] It should be noted that in this disclosure, customer information is collected and analyzed, and users are provided with corresponding operation entry points to choose whether to agree to or reject the automated decision results; if the user chooses to reject, the process will proceed to the expert decision-making process.
[0051] The following embodiments of the present invention can be applied to various systems / applications / devices based on generative agents for generating exchange rate hedging strategies. The present invention is applicable to cross-border payment risk management scenarios, such as small-amount payment scenarios on cross-border e-commerce platforms. For high-frequency, small-amount international transactions on e-commerce platforms, the present invention can analyze exchange rate fluctuation risks in real time, dynamically generate optimal exchange rate hedging strategies, and effectively reduce exchange rate losses in small-amount payment scenarios. Alternatively, in international trade settlement scenarios, during the settlement of bulk commodity imports and exports, the present invention helps enterprises lock in favorable exchange rates in advance through accurate simulation of exchange rate fluctuation paths, avoiding exchange rate fluctuation risks during transactions and enhancing financial stability.
[0052] This invention integrates multimodal data fusion, generative AI-driven exchange rate path simulation, and reinforcement learning dynamic optimization strategies to generate exchange rate paths covering a wide range of market possibilities, including benchmark and extreme paths, significantly improving the quality of the basis for strategy formulation. Based on the generated exchange rate paths, this invention uses reinforcement learning algorithms to dynamically adjust hedging strategies, such as "early hedging," "split hedging," or combining options hedging, to adapt to the ever-changing market environment, maximizing returns and minimizing risks.
[0053] In cross-border e-commerce small-amount payment scenarios, this invention can significantly reduce the exchange rate loss rate from its original level, thereby significantly reducing financial losses for enterprises and individuals caused by exchange rate fluctuations. By implementing a feedback closed-loop mechanism, this invention can update the model in real time, achieving low-latency strategy execution and enabling rapid response even in unexpected market situations, ensuring the robustness and timeliness of the strategy.
[0054] The present invention will now be described in detail with reference to various embodiments.
[0055] Example 1
[0056] According to an embodiment of the present invention, an embodiment of a lock-and-sink policy generation method based on generative agents is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0057] The method for generating pooling strategies based on generative agents provided in Embodiment 1 of this application can be executed on a mobile terminal, computer terminal, or similar computing device. Figure 1 A hardware block diagram of a computer terminal (or mobile device) for implementing a generative agent-based pooling policy generation method is shown. Figure 1 As shown, computer terminal 10 (or mobile device) may include one or more ( Figure 1The processor 102 (which may include, but is not limited to, a microprocessor MCU (Microcontroller Unit) or a programmable gate array (FPGA)) is shown as 102a, 102b, ..., 102n. It also includes a memory 104 for storing data and a transmission device 106 for communication functions. In addition, it may include: a display, an input / output interface (I / O interface), a Universal Serial Bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0058] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10 (or mobile device). As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).
[0059] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the generative agent-based pooling strategy generation method in this embodiment. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby realizing the aforementioned generative agent-based pooling strategy generation method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0060] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0061] The display can be, for example, a touchscreen liquid crystal display (LCD), which allows the user to interact with the user interface of the computer terminal 10 (or mobile device).
[0062] Under the aforementioned operating environment, this application provides the following: Figure 2 The method for generating pooling strategies based on generative agents is shown. Figure 2 This is a flowchart of an optional generative agent-based pooling strategy generation method according to an embodiment of the present invention, such as... Figure 2 As shown, the method includes the following steps:
[0063] In this embodiment, in order to enhance the accuracy and comprehensiveness of exchange rate risk management, preprocessing and fusion processing of multimodal data can be implemented to obtain a multidimensional feature vector set.
[0064] Step S201: Preprocess and fuse the multimodal data to obtain a multidimensional feature vector set.
[0065] Optionally, the steps of preprocessing and fusing multimodal data to obtain a multidimensional feature vector set include: acquiring structured and unstructured data to obtain multimodal data, wherein the structured data includes at least one of the following: real-time exchange rate data, transaction volume data, and volatility data obtained through an application programming interface (API); and the unstructured data includes at least one of the following: news text of cross-border payment orders generated by a related payment system and user comments from various social media platforms; preprocessing the structured and unstructured data; and fusing the structured and unstructured data using a gated recurrent unit (GRU) network to output a multidimensional feature vector set.
[0066] Specifically, acquiring multimodal data involves a combination of structured and unstructured data. Structured data includes exchange rate data, trading volume data, volatility data, and other data obtained in real time through application programming interfaces (APIs), which provide the foundation for quantifying market conditions. Unstructured data, on the other hand, encompasses news texts related to cross-border payment orders and user comments from various social media platforms, helping to capture the impact of market data changes and non-quantitative factors on exchange rates.
[0067] Optionally, the preprocessing steps for structured and unstructured data include: performing time series alignment, missing value imputation, and feature engineering on structured data; and performing text vectorization and sentiment index analysis on unstructured data.
[0068] First, time series alignment is performed to ensure that data from different sources are synchronized over time. For example, exchange rate data at 1-minute intervals are converted into averages at 15-minute intervals to allow for comparison and analysis with data such as trading volume and volatility on the same time scale. Second, missing value imputation is performed. In this embodiment, a Long Short-Term Memory (LSTM) network can be used to predict and fill in missing data points, maintaining data continuity and preventing bias during model training. Finally, feature engineering is employed, such as calculating technical indicators like the Relative Strength Index (RSI) and Moving Average Convergence Divergence (MACD), to enhance insights into market trends and help the model more accurately capture patterns in exchange rate changes.
[0069] Next, unstructured news texts and social media comments can be vectorized. A pre-trained natural language processing model converts the text into fixed-length vectors, transforming semantic information into numerical features for easier processing by machine learning models. Simultaneously, sentiment index analysis is performed. Using text classification techniques, market change data expressed in comments or news articles is quantified into an index ranging from -1 to 1, where -1 represents extremely negative changes and 1 represents extremely positive market changes. This helps assess the potential impact of market data changes on exchange rate fluctuations.
[0070] It should be noted that this embodiment employs a gated recurrent unit network to fuse structured and unstructured data. Through this network, preprocessed structured features (such as time series and volatility) and unstructured features (such as semantic vectors and sentiment indices) can be integrated into a multidimensional feature vector set. This not only captures the dynamic relationships of data over time but also effectively controls computational costs during information processing. The output multidimensional spatiotemporal feature vector accurately represents the current overall market state.
[0071] Step S202: Input the multidimensional feature vector set into the generative agent and output the baseline path set and the extreme path set. The generative agent includes a pre-trained diffusion model for generating the baseline path and a pre-trained adversarial network model for generating the extreme path. The baseline path includes exchange rate fluctuation data under normal operating conditions, and the extreme path includes exchange rate fluctuation data when abnormal events occur.
[0072] Optionally, the step of inputting a multidimensional feature vector set into a generative agent and outputting a baseline path set and an extreme path set includes: inputting the exchange rate time series and the multidimensional feature vector set into a diffusion model in the generative agent; adding Gaussian noise to the exchange rate time series, which is the main variable for generation, to generate a noisy sequence; performing a denoising operation on the noisy sequence by the diffusion model; analyzing the exchange rate changes at multiple time steps; and outputting a baseline path set and a baseline confidence interval for multiple time steps, wherein the baseline confidence interval is used to limit the range of exchange rate adjustment for the baseline path set.
[0073] The generative agent involved in this embodiment includes a diffusion model, which receives input not only current exchange rate data but also a multi-dimensional feature vector set fused by GRU. This feature vector set, which integrates market conditions, helps the model consider more influencing factors when generating exchange rate paths. By adding Gaussian noise to the current exchange rate data and the multi-dimensional feature vectors, a series of noise sequences are generated. This aims to simulate the uncertainty and randomness in the market, helping the diffusion model learn to predict exchange rate fluctuations in a noisy environment and generate exchange rate paths that are more consistent with reality.
[0074] The diffusion model, by simulating the gradual denoising process of exchange rate data, can not only generate a benchmark path set but also cover exchange rate trends under normal market fluctuations. This facilitates the optimization of subsequent reinforcement learning strategies, ensuring their robustness and flexibility in predicting and hedging exchange rate risks. Simultaneously, the output of the benchmark confidence interval provides strategy makers with a quantitative perspective on risk, helping to design appropriate hedging strategies under different market scenarios to reduce potential losses from exchange rate volatility.
[0075] Optionally, the step of denoising the noise sequence by the diffusion model includes: calling a multi-layer preset convolutional neural network U-Net by the diffusion model to denoise the noise sequence. The noise sequence is denoised using the preset U-Net, and multi-dimensional feature vectors are used as conditional inputs in the denoising process. Each layer of the preset convolutional neural network U-Net contains two convolutional blocks and the activation function is the ReLU activation function.
[0076] In this embodiment, the diffusion model invokes a multi-layered, pre-defined U-Net convolutional neural network for denoising. Each layer of the U-Net network contains two convolutional blocks and employs the ReLU activation function, which helps the model gradually recover a clean exchange rate signal containing multimodal information when processing noisy sequences. Through iterative denoising using the U-Net network, the model can predict exchange rate changes at multiple future time steps, forming a baseline path set. Simultaneously, it can calculate a baseline confidence interval, which reflects the possible range of exchange rate adjustments, helping policymakers find certainty amidst uncertainty.
[0077] Optionally, the step of inputting a multidimensional feature vector set into a generative agent and outputting a baseline path set and an extreme path set includes: inputting pre-acquired random noise and historical volatility data into the generator of the adversarial network model in the generative agent to generate an initial extreme path set, wherein the generator is based on a Transformer encoder architecture; inputting the initial extreme path set into the discriminator of the adversarial network model, wherein the discriminator distinguishes between the real historical exchange rate path and multiple initial extreme paths, and outputs the true probability value of each initial extreme path, wherein the discriminator is based on a Transformer decoder architecture; and the generator of the adversarial network model filters the initial extreme paths according to the true probability values to obtain the extreme path set.
[0078] The generative agent in this embodiment also includes an adversarial network model. The generator, based on a Transformer encoder architecture, receives pre-acquired random noise and historical volatility data. Using this information and a multi-dimensional feature vector set, the generator captures complex relationships and patterns through multi-layered attention mechanisms (such as self-attention) to generate an initial set of extreme paths. This helps simulate extreme exchange rate fluctuations that may occur under specific market conditions. Next, the initial set of extreme paths is input into the discriminator of the adversarial network model, which is also generated based on a Transformer decoder architecture. The discriminator distinguishes between real historical exchange rate paths and the generated initial extreme paths, outputting the true probability value for each initial extreme path. This process helps the generator learn how to more accurately simulate market behavior under extreme conditions. Through continuous training, the generator can gradually improve the accuracy and realism of its generated paths, thus contributing to the formation of a higher-quality set of extreme paths.
[0079] Finally, the generator filters the initial set of extreme paths based on the true probability values output by the discriminator, thus obtaining a set of extreme paths. This filtering process ensures that the generated paths not only reflect historical volatility and the current market state but also conform to the statistical regularities of exchange rate fluctuations and the characteristics of extreme events in the real world. The output of the extreme path set is particularly valuable for risk management, as it reveals the potential drastic changes in exchange rates when facing unexpected situations. This helps to consider various extreme possibilities when formulating strategies, thereby improving the robustness of the strategies.
[0080] Step S203: Input the baseline path set and the extreme path set into the exchange rate simulation environment to generate the target exchange rate hedging strategy and the return data of the hedging strategy. The exchange rate simulation environment includes a predefined multidimensional state space, action space and reward function. The input parameters of the multidimensional state space include the baseline path and the extreme path. The action space outputs multiple hedging actions of the target exchange rate hedging strategy. The reward function is used to determine the expected return data corresponding to each hedging action.
[0081] Optionally, the step of inputting the benchmark path set and the extreme path set into the exchange rate simulation environment to generate the target hedging strategy and the hedging strategy profit data includes: inputting the benchmark path set and the extreme path set into the exchange rate simulation environment; in the exchange rate simulation environment, inputting multi-dimensional feature vectors into the state space of each dimension; based on the feature vectors, benchmark paths, and extreme paths of the multi-dimensional state space, performing combination processing of multiple types of hedging actions by the action space, and outputting the target hedging strategy, wherein the multiple types of hedging actions include: extraction hedging actions, delayed hedging actions, split hedging actions, and extended actions; based on the reward function, outputting the hedging strategy profit data by considering the exchange rate, transaction cost, and risk penalty coefficient when executing each type of hedging action.
[0082] In the construction of the exchange rate simulation environment in this embodiment, firstly, a baseline path set and an extreme path set are input into the environment. These path sets not only represent the normal fluctuation trend of market exchange rates but also take into account possible extreme fluctuations. Subsequently, multi-dimensional feature vectors are incorporated into the state space of each dimension, which helps the environment to more comprehensively identify the overall state of the market, including key factors such as market data changes, volatility, and trading volume. The construction of the state space enables the simulation environment to generate more realistic market scenarios based on multimodal data.
[0083] It should be noted that in the exchange rate simulation environment, based on the input multidimensional state space feature vector, baseline path, and extreme paths, the action space performs combined processing of various hedging actions. These hedging actions include, but are not limited to, extraction hedging actions (i.e., immediately hedging at the current exchange rate), delayed hedging actions (choosing to hedging at a future point in time, bearing the corresponding time risk), splitting hedging actions (dividing the hedging amount into multiple parts and hedging them at different times and exchange rates), and extended actions (such as combining with advanced financial instruments like options hedging). The setting of the action space provides the agent with a variety of strategy options, allowing for flexible adjustment of hedging decisions based on market simulation results, helping to find the optimal balance between cost and risk.
[0084] Based on the defined reward function, this embodiment comprehensively evaluates the exchange rate, transaction costs, and risk penalty coefficients when various hedging actions are executed, thereby generating the profit data of the hedging strategy. The design of the reward function ensures that the hedging strategy considers both potential exchange rate gains and transaction costs and market risks, thus helping the agent learn a hedging strategy in a simulated environment that maximizes profits while effectively managing risks.
[0085] Optionally, after inputting the baseline path set and extreme path set into the exchange rate simulation environment to generate the target hedging strategy and hedging strategy profit data, the method further includes: generating a hedging request based on the target hedging strategy, transaction amount, and execution time period; submitting the hedging request through a financial application programming interface (API) and receiving the transaction result, wherein the transaction result includes at least one of the following: actual exchange rate, transaction cost, and transaction execution time; storing the transaction result in a database; using the transaction result to determine the actual path data and actual reward value, and using the actual path data and actual reward value to update the model parameters of each model in the generative agent.
[0086] Based on the target hedging strategy, the specific transaction amount, and the time period to be executed, this embodiment automatically constructs a hedging request. The request may include all the key parameters required to execute the hedging operation. For example, the request may include information such as the execution amount, target currency, expected exchange rate, hedging action type (early hedging, delayed hedging, split hedging, etc.), and execution time window, helping to ensure the accurate implementation of the hedging strategy. This embodiment uses a financial application programming interface (API) pre-integrated with financial institutions to submit the constructed hedging request, triggering the actual hedging operation. Subsequently, the transaction result is received, which may include, but is not limited to, key data points such as the actual exchange rate, transaction fees, and execution time. The received transaction result is stored in a customized database, which records the specific details of each hedging operation, including but not limited to the hedging strategy, actual exchange rate, cost, and execution time. The construction of the database helps to form a detailed transaction history, providing data support for subsequent analysis, model optimization, and compliance review.
[0087] By utilizing actual path data and actual reward values from transaction results, this embodiment can update the various model parameters in the generative agent. For example, based on the difference between the actual and predicted exchange rates, as well as actual transaction costs and expected strategy returns, it adjusts the noise variance parameter of the diffusion model, optimizes the generator and discriminator weights of the GAN model, and fine-tunes the decision parameters of the reinforcement learning policy network. This closed-loop update mechanism helps the model continuously learn and adapt in actual operation, improving the accuracy of market fluctuation prediction and the effectiveness of the strategy.
[0088] This embodiment not only automatically outputs and executes the optimal hedging strategy based on the generated exchange rate path prediction, but also continuously optimizes each component of the generative agent through feedback from actual market operations, ensuring the long-term effectiveness and adaptability of the strategy. This model update based on actual transaction data helps enhance the robustness of the hedging strategy, providing accurate exchange rate risk assessment and management solutions even in rapidly changing market conditions, thereby reducing exchange rate loss risk in cross-border payments and improving the efficiency and cost-effectiveness of financial transactions.
[0089] Through the above steps, multimodal data can be preprocessed and fused to obtain a multidimensional feature vector set. This multidimensional feature vector set is then input into a generative agent, which outputs a baseline path set and an extreme path set. The generative agent includes a pre-trained diffusion model for generating the baseline path and a pre-trained adversarial network model for generating the extreme path. The baseline path includes exchange rate fluctuation data under normal operating conditions, and the extreme path includes exchange rate fluctuation data when abnormal events occur. The baseline path set and the extreme path set are then input into an exchange rate simulation environment to generate a target hedging strategy and hedging strategy profit data. The exchange rate simulation environment includes a defined multidimensional state space, action space, and reward function. The input parameters of the multidimensional state space include the baseline path and the extreme path. The action space outputs multiple hedging actions of the target hedging strategy, and the reward function is used to determine the expected profit data corresponding to each hedging action. In this embodiment, through multimodal data fusion, generative agent-driven exchange rate path simulation, and hedging strategy generation, it is possible to generate exchange rate paths covering a variety of possibilities (the diffusion model can simulate a baseline path covering a 95% confidence interval, while GAN simulation generates a 5% extreme volatility path). By running the two models in parallel, all possible exchange rate paths can be evaluated more comprehensively, improving the quality of the basis for hedging strategy formulation. Based on the generated multi-path predictions, the hedging strategy can be dynamically adjusted (such as early hedging, delayed hedging, split hedging, etc.), responding to market fluctuations in real time, reducing risks, and thus solving the technical problem of low accuracy when using a single exchange rate analysis method in the process of financial exchange rate risk management in related technologies.
[0090] The following describes in detail another optional implementation method.
[0091] This invention proposes an exchange rate path simulation system based on "multimodal data fusion - multi-path generation - reinforcement learning optimization - execution feedback closed loop," the process of which includes:
[0092] 1. Multimodal data acquisition and preprocessing: Integrate structured data (exchange rates, transaction volume) and unstructured data (news, social media) to extract spatiotemporal feature vectors.
[0093] 2. Generative AI path generation: The diffusion model generates a baseline path with a 95% confidence interval (covering normal fluctuation scenarios); GAN generates extreme paths.
[0094] 3. Reinforcement learning strategy optimization: Based on the multi-path generation results, the hedging strategy (such as "early hedging" and "split hedging") is optimized through the Proximal Policy Optimization (PPO) algorithm.
[0095] 4. Execution and Feedback Closed Loop: Execute exchange rate hedging strategies through financial institution APIs, collect actual data and update models to improve the accuracy of predictions and strategies.
[0096] System architecture and module functions.
[0097] (1) System overall architecture.
[0098] The system adopts a "device-edge-cloud" collaborative architecture, with the core module deployed in the cloud (handling high-computing-power tasks) and edge devices (such as payment terminals) responsible for executing exchange locking instructions.
[0099] Module 1: Multi-source data acquisition module.
[0100] The collected data includes both structured and unstructured data. Structured data includes real-time exchange rates (timestamp, bid price, ask price, mid-price), trading volume, and volatility (standard deviation over the past hour), obtained via API. Unstructured data includes news texts from media outlets and user comments from social media. The trigger condition is that data collection is automatically triggered when the payment system generates a cross-border payment order (amount, target currency, payment time).
[0101] Module 2: Data Preprocessing Module.
[0102] Structured data processing includes: time series alignment: resampling exchange rate data from different sources at 15-minute intervals; missing value imputation: using an LSTM network to predict missing values (inputting data from the previous 3 time steps and outputting the current value); feature engineering: calculating technical indicators (such as RSI, MACD, and moving average of the cross-sectional area).
[0103] Unstructured data processing includes: text vectorization: using a pre-trained natural language processing model to encode news / comment text into 768-dimensional semantic vectors; sentiment analysis: outputting a sentiment index (range [-1, 1], -1 for extremely negative, 1 for extremely positive); multimodal fusion: using a GRU network (128 hidden nodes, learning rate 0.001) to fuse structured features (time series, volatility) and unstructured features (semantic vectors, sentiment index), outputting a 15-dimensional spatiotemporal feature vector (representing the "comprehensive state" of the current market).
[0104] Module 3: Generative AI Path Generation Module.
[0105] Diffusion model (generating baseline path):
[0106] Input: Current exchange rate "S_t" (e.g., 6.90), 15-dimensional spatiotemporal feature vector.
[0107] Noise addition: Add Gaussian noise "ε~N(0,σ²)" (σ=0.005, initial noise variance) to "S_t" to generate the noise sequence "S_t+ε".
[0108] Denoising process: Denoising is performed step by step using a 3-layer U-Net (each layer contains 2 convolutional blocks, with ReLU activation function) to predict the exchange rate change "ΔS_t" at each 15-minute time step.
[0109] Output: After 24 hours of iteration (96 time steps), 1000 baseline paths are generated with a 95% confidence interval of [6.82, 6.95] (example).
[0110] GAN model (generates extreme paths):
[0111] Generator: Input random noise "zN(0,1)" and historical volatility "σ" (e.g., 0.035), and generate extreme paths (e.g., daily exchange rate fluctuation > 5%) through Transformer encoder (6 layers, 8 heads).
[0112] Discriminator: Input the real historical path (such as exchange rate data during interest rate hikes) and the generated path, and output a probability value (0-1) representing the "real" probability.
[0113] Training objectives: The generator minimizes cross-entropy loss (to deceive the discriminator), and the discriminator maximizes classification accuracy (to distinguish between real and fake paths).
[0114] Output: Generate 500 extreme paths (covering scenarios of "surge", "plunge" and "oscillation").
[0115] Module 4: Reinforcement Learning Strategy Optimization Module.
[0116] State space (S): contains 5 features: current exchange rate "S_t", volatility "σ_t", remaining lock-in time "τ" (hours), and available funds.
[0117] "C", sentiment index "E" (Example: "S=[6.90,0.003,2,100000,0.3]").
[0118] Action Space (A): Defines 3 basic action types (expandable):
[0119] Action 1: Lock in currency in advance (exchange immediately at the current exchange rate, with a handling fee of 0.1%).
[0120] Action 2: Delayed exchange rate hedging (waiting for "Δt" hours for reassessment, during which time the risk of exchange rate fluctuations is assumed);
[0121] Action 3: Split the locking of foreign exchange (split the amount proportionally, such as locking 50% immediately and locking 50% later).
[0122] Extended action (optional): Combine with option hedging (such as buying put options at a cost of 0.2% of the amount).
[0123] Reward function (R): Taking into account exchange rate gains, transaction costs, and risk costs, the formula is as follows:
[0124] R=(S_{lock}-S_t)\times C\times(1-fee\_rate)-\sigma_t\times penalty\_coef; where:
[0125] "S_{lock}": The exchange rate at which the lock is executed;
[0126] "fee_rate": Exchange rate (e.g., 0.1%).
[0127] "penalty_coef": Risk penalty coefficient (e.g., 0.5%, used to penalize delayed currency locking under high volatility).
[0128] Optimization Algorithm: A proximal policy optimization algorithm is employed to train the policy network in a simulated environment (input 15-dimensional state space, output action probability distribution). The simulated environment is constructed from historical data (70%) and generative AI paths (30%) to ensure coverage of both normal and extreme scenarios.
[0129] Module 5: Locking and Feedback Module.
[0130] API call: Submit a currency hedging request through the financial institution's API. Parameters include amount, currency pair, target exchange rate, and execution time.
[0131] Transaction Confirmation: Receive the transaction results (actual exchange rate, transaction fee, transaction time) returned by the bank;
[0132] Data recording: Store actual data (such as the transaction exchange rate of 6.88 and the transaction fee of $50) into the database;
[0133] Model updates: Diffusion model: Optimize noise variance σ with actual path data (e.g., adjust from 0.005 to 0.004); PPO policy network: Update network weights with actual reward values (improving the reward prediction accuracy of splitting and locking actions); Data preprocessing module: Fine-tune the natural language processing model with new data (adapting to new domain texts, such as news related to "cryptocurrency supervision").
[0134] Specific implementation steps (taking cross-border e-commerce small-amount payments as an example).
[0135] Phase 1: Data Acquisition (Real-time Trigger).
[0136] When the cross-border e-commerce system generates an order (amount: USD 10,000, payment time: 30 minutes later), data collection is triggered: Structured data: API call to obtain the real-time USD / CNY exchange rate (currently 6.90, volatility of 0.003 over the past hour); Unstructured data: crawling... News from the agency (keywords " (Discussion), obtain the text " The announcement that interest rates would remain unchanged was encoded into a 768-dimensional vector using a natural language processing model, and the sentiment analysis output a market change index of 0.3 (neutral to positive).
[0137] Phase 2: Data preprocessing (completed offline).
[0138] Structured data processing: Resample the 1-minute exchange rate data to a 15-minute mean and fill in missing values (forward imputation).
[0139] Multimodal fusion: The GRU network fuses time series (exchange rate in the past 1 hour), volatility (0.003), BERT vector (768 dimensions), and sentiment index (0.3), outputting a 15-dimensional spatiotemporal feature vector (example: "[0.12,0.08,0.95,..., 0.3]").
[0140] Phase 3: Generative AI Path Generation (Offline Training + Online Inference).
[0141] Diffusion model inference: Input the current exchange rate 6.90 and a 15-dimensional feature vector to generate 1000 baseline paths (95% confidence interval [6.82, 6.95]).
[0142] GAN model inference: Input historical volatility of 0.035 and random noise to generate 500 extreme paths (e.g., the probability of the exchange rate falling to 6.75 is 5%, and the probability of it rising to 7.05 is 3%).
[0143] Phase 4: Optimization of reinforcement learning strategies (online decision-making).
[0144] State space: "S=[6.90,0.003,0.5 (remaining time 30 minutes = 0.5 hours),10000,0.3]";
[0145] Action evaluation: The PPO algorithm calculates rewards for three types of actions:
[0146] Pre-emptive exchange rate locking: Execution rate 6.90, transaction fee $10 (10,000 × 0.1%), profit = (6.90 - 6.90) × 10,000 - $10 = -$10;
[0147] Delayed exchange rate locking: After waiting for 30 minutes, the exchange rate may fluctuate to 6.88 (60% probability) or 6.92 (40% probability). Expected return = 0.6 × (6.88 - 6.90) × 10,000 + 0.4 × (6.92 - 6.90) × 10,000 - 0 (no transaction fee) = -80 USD;
[0148] Split hedging (50% immediate + 50% delayed): Loss of $5 (5,000 × 0.1%) + Expected return = 0.5 × (-80) + 0.5 × 0 = -$40;
[0149] Optimal action: Split and lock in exchange rates (highest Sharpe ratio, best risk-adjusted return).
[0150] Phase 5: Execution and Feedback of Currency Locking (Online Closed Loop).
[0151] API call: Submit a splitting and locking request through the financial institution's API.
[0152] Transaction Confirmation: The financial institution returned the transaction result: $5,000 was traded at an exchange rate of 6.90, with a transaction fee of $5;
[0153] Data recording: The actual exchange rate of 6.90 and the transaction fee of $5 were stored in the database;
[0154] Model updates include: Diffusion model: Optimize noise variance σ=0.004 using the actual path (6.90 no fluctuation); PPO policy network: Update network weights to improve reward prediction accuracy for splitting and locking in exchange rate action in the "low volatility scenario".
[0155] Through the above implementation methods, this invention can generate a baseline path with a 95% confidence interval using a diffusion model, and combine it with a GAN to generate extreme paths, covering more than 99% of market possibilities and avoiding strategy failure caused by single-path prediction. Simultaneously, it can integrate structured data (exchange rates, volatility) and unstructured data (news, sentiment), extracting spatiotemporal features through GRU and natural language processing models, thereby improving the comprehensiveness of path generation and strategy decision-making.
[0156] Furthermore, this invention utilizes three major technical means—full-process automation, multi-module parallel optimization, and edge computing acceleration—to control the entire process of data acquisition, strategy decision-making, and exchange rate locking execution within 10 seconds, thus completely resolving the latency issues in high-frequency payment scenarios.
[0157] This invention can control the entire process from data acquisition to strategy execution within 10 seconds (2 seconds for data acquisition + 3 seconds for preprocessing + 3 seconds for path generation + 2 seconds for strategy decision), supporting high-frequency payment scenarios such as hundreds of transactions per second in cross-border e-commerce and tens of transactions per second in enterprise-level scenarios. For example, during platform promotions (500 orders per second), the system can generate the optimal exchange rate locking strategy for each order in real time, avoiding additional exchange rate losses due to delays.
[0158] This invention, through multimodal data fusion and generative AI path generation, can effectively cope with black swan events, gray rhino events, and daily fluctuations. For example, in the event of a dollar liquidity crisis, the system generates an extreme path of dollar surge two hours in advance, triggering a split-locking exchange rate + option hedging strategy to help customers avoid exchange rate losses.
[0159] The following is a detailed description with reference to another embodiment.
[0160] Example 2
[0161] The lock-in strategy generation device based on generative agents provided in this embodiment includes multiple implementation units, each of which corresponds to a specific implementation step in the above embodiment one. The specific implementation method and beneficial effects can be referred to the foregoing method embodiment, and will not be repeated here.
[0162] Figure 3 This is a schematic diagram of an optional generative agent-based pooling strategy generation device according to an embodiment of the present invention, such as... Figure 3 As shown, the pooling strategy generation device based on generative agents may include: a multimodal data processing unit 31, a generative agent action unit 32, and a pooling unit 33.
[0163] The multimodal data processing unit 31 is used to preprocess and fuse multimodal data to obtain a multidimensional feature vector set.
[0164] The generative agent action unit 32 is used to input a multi-dimensional feature vector set into the generative agent and output a baseline path set and an extreme path set. The generative agent includes a pre-trained diffusion model for generating baseline paths and a pre-trained adversarial network model for generating extreme paths. The baseline paths include exchange rate fluctuation data under normal operating conditions, and the extreme paths include exchange rate fluctuation data when abnormal events occur.
[0165] The hedging unit 33 is used to input the benchmark path set and the extreme path set into the exchange rate simulation environment to generate the target hedging strategy and the hedging strategy profit data. The exchange rate simulation environment includes a predefined multidimensional state space, action space and reward function. The input parameters of the multidimensional state space include the benchmark path and the extreme path. The action space outputs multiple hedging actions of the target hedging strategy. The reward function is used to determine the expected profit data corresponding to each hedging action.
[0166] The aforementioned currency hedging strategy generation device based on generative agents can preprocess and fuse multimodal data through a multimodal data processing unit 31 to obtain a multidimensional feature vector set. The generative agent action unit 32 inputs the multidimensional feature vector set into the generative agent and outputs a baseline path set and an extreme path set. The generative agent includes a pre-trained diffusion model for generating baseline paths and a pre-trained adversarial network model for generating extreme paths. The baseline path includes exchange rate fluctuation data under normal operating conditions, and the extreme path includes exchange rate fluctuation data when abnormal events occur. The currency hedging unit 33 inputs the baseline path set and the extreme path set into an exchange rate simulation environment to generate a target currency hedging strategy and currency hedging strategy profit data. The exchange rate simulation environment includes a predefined multidimensional state space, action space, and reward function. The input parameters of the multidimensional state space include the baseline path and the extreme path. The action space outputs multiple currency hedging actions of the target currency hedging strategy, and the reward function is used to determine the expected profit data corresponding to each currency hedging action. In this embodiment, through multimodal data fusion, generative agent-driven exchange rate path simulation, and hedging strategy generation, it is possible to generate exchange rate paths covering a variety of possibilities (the diffusion model can simulate a baseline path covering a 95% confidence interval, while GAN simulation generates a 5% extreme volatility path). By running the two models in parallel, all possible exchange rate paths can be evaluated more comprehensively, improving the quality of the basis for hedging strategy formulation. Based on the generated multi-path predictions, the hedging strategy can be dynamically adjusted (such as early hedging, delayed hedging, split hedging, etc.), responding to market fluctuations in real time, reducing risks, and thus solving the technical problem of low accuracy when using a single exchange rate analysis method in the process of financial exchange rate risk management in related technologies.
[0167] Optionally, the multimodal data processing unit includes: a data acquisition module for acquiring structured data and unstructured data to obtain multimodal data, wherein the structured data includes at least one of the following: real-time exchange rate data, transaction volume data, and volatility data acquired through an application programming interface (API); and the unstructured data includes at least one of the following: news text of cross-border payment orders generated by a linked payment system and user comments from various social media platforms; a preprocessing module for preprocessing the structured and unstructured data; and a data fusion module for fusing the structured and unstructured data using a gated recurrent unit (GRU) network to output a multidimensional feature vector set.
[0168] Optionally, the preprocessing module includes: a first preprocessing submodule for performing time series alignment, missing value imputation, and feature engineering on structured data; and a second preprocessing submodule for performing text vectorization and sentiment index analysis on unstructured data.
[0169] Optionally, the generative agent action unit includes: a first input module for inputting the exchange rate time series and a multi-dimensional feature vector set into the diffusion model in the generative agent; a noise addition module for adding Gaussian noise to the exchange rate time series, which is the main variable of generation, to generate a noisy sequence; and a denoising module for performing denoising operations on the noisy sequence by the diffusion model, analyzing the exchange rate changes at multiple time steps, and outputting a baseline path set and a baseline confidence interval for multiple time steps, wherein the baseline confidence interval is used to limit the range of exchange rate adjustment intervals of the baseline path set.
[0170] Optionally, the denoising module includes: a network invocation submodule, used to invoke a multi-layer preset convolutional neural network U-Net by the diffusion model to perform denoising operations on the noise sequence. The preset U-Net is used to denoise the noise sequence, and multi-dimensional feature vectors are used as conditional inputs to participate in the generation during the denoising process. Each layer of the preset convolutional neural network U-Net contains two convolutional blocks and the activation function is the ReLU activation function.
[0171] Optionally, the generative agent action unit further includes: a second input module, used to input pre-acquired random noise and historical volatility data into the generator of the adversarial network model in the generative agent to generate an initial extreme path set, wherein the generator is generated based on a Transformer encoder architecture; a third input module, used to input the initial extreme path set into the discriminator of the adversarial network model, wherein the discriminator distinguishes between the real historical exchange rate path and multiple initial extreme paths, and outputs the true probability value of each initial extreme path, wherein the discriminator is generated based on a Transformer decoder architecture; and a path filtering module, used by the generator of the adversarial network model to filter the initial extreme paths according to the true probability values to obtain an extreme path set.
[0172] Optionally, the exchange rate hedging unit includes: a fourth input module, used to input the baseline path set and the extreme path set into the exchange rate simulation environment, and input multi-dimensional feature vectors into the state space of each dimension in the exchange rate simulation environment; an action combination module, used to combine multiple types of exchange rate hedging actions based on the feature vectors, baseline paths and extreme paths of the multi-dimensional state space, and output the target exchange rate hedging strategy, wherein the multiple types of exchange rate hedging actions include: extraction hedging action, delayed hedging action, split hedging action and extension action; and an exchange rate hedging profit determination module, used to output the exchange rate hedging strategy profit data based on the reward function, the exchange rate, transaction cost and risk penalty coefficient when executing various types of exchange rate hedging actions.
[0173] Optionally, the hedging strategy generation device based on generative agents further includes: a hedging request generation unit, used to generate a hedging request based on the target hedging strategy, transaction amount, and execution time period after inputting the benchmark path set and extreme path set into the exchange rate simulation environment to generate target hedging strategy and hedging strategy return data; a hedging request submission unit, used to submit the hedging request through a financial application programming interface (API) and receive the transaction result, wherein the transaction result includes at least one of the following: actual exchange rate, transaction fee cost, and transaction execution time; a transaction result storage unit, used to store the transaction result in a database; and a model update unit, used to determine the actual path data and actual reward value using the transaction result, and update the model parameters of each model in the generative agent using the actual path data and actual reward value.
[0174] The aforementioned generative agent-based pooling strategy generation device may further include a processor and a memory. The aforementioned multimodal data processing unit 31, generative agent action unit 32, pooling unit 33, etc., are all stored in the memory as program units, and the processor executes the aforementioned program units stored in the memory to realize the corresponding functions.
[0175] The aforementioned processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and by adjusting kernel parameters, exchange rate path simulation and hedging strategy generation can be implemented based on a generative agent.
[0176] The aforementioned memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0177] Example 3
[0178] Embodiments of this application may provide an electronic device. Figure 4This is a structural block diagram of an electronic device that executes a generative agent-based pooling strategy generation method according to an embodiment of this application. Figure 4 As shown, the electronic device may include: one or more ( Figure 4 (Only one is shown) processor 402, memory 404, memory controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.
[0179] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the generative agent-based pooling strategy generation method and apparatus in this application embodiment. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby realizing the aforementioned generative agent-based pooling strategy generation method. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0180] The processor can access information and applications stored in memory via a transmission device to perform the following steps: preprocessing and fusing multimodal data to obtain a multidimensional feature vector set; inputting the multidimensional feature vector set into a generative agent to output a baseline path set and an extreme path set, wherein the generative agent includes a pre-trained diffusion model for generating the baseline path and a pre-trained adversarial network model for generating the extreme path, the baseline path includes exchange rate fluctuation data under normal operating conditions, and the extreme path includes exchange rate fluctuation data when abnormal events occur; inputting the baseline path set and the extreme path set into an exchange rate simulation environment to generate a target hedging strategy and hedging strategy profit data, wherein the exchange rate simulation environment includes a defined multidimensional state space, action space, and reward function, the input parameters of the multidimensional state space include the baseline path and the extreme path, the action space outputs multiple hedging actions of the target hedging strategy, and the reward function is used to determine the expected profit data corresponding to each hedging action.
[0181] Those skilled in the art will understand that Figure 4 The structure shown is for illustrative purposes only. Electronic devices can also be smartphones, tablets, handheld computers, mobile internet devices (MIDs), PADs, and other terminal devices. Figure 4 This does not limit the structure of the aforementioned electronic device. For example, electronic devices may also include components that are more... Figure 4The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 4 The different configurations shown.
[0182] Those skilled in the art will understand that all or part of the steps in the various generative agent-based pooling strategy generation methods of the above embodiments can be implemented by a program instructing the hardware of the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0183] Example 4
[0184] Embodiments of this application also provide a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the generative agent-based pooling strategy generation method provided in Embodiment 1.
[0185] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored computer program, wherein, when the computer program is running, it controls the device where the computer-readable storage medium is located to execute any one of the generative agent-based pooling strategy generation methods in the first embodiment above.
[0186] Optionally, in this embodiment, the storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.
[0187] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the generative agent-based pooling strategy generation method described in various embodiments of this application.
[0188] This application also provides a computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the lock-in strategy generation method based on generative agents described in various embodiments of this application.
[0189] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0190] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0191] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0192] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0193] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0194] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0195] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for generating a lock-in strategy based on a generative agent, characterized in that, The method comprises the following steps: Preprocessing and fusion processing of multi-modal data to obtain a multi-dimensional feature vector set; Inputting the multi-dimensional feature vector set into a generative agent to output a benchmark path set and an extreme path set, wherein the generative agent comprises a diffusion model pre-trained to generate a benchmark path and an adversarial network model pre-trained to generate an extreme path, the benchmark path comprises exchange rate fluctuation data in a normal operating state, and the extreme path comprises exchange rate fluctuation data when an abnormal event occurs; Inputting the benchmark path set and the extreme path set into an exchange rate simulation environment to generate a target lock-in strategy and lock-in strategy yield data, wherein the exchange rate simulation environment comprises a defined multi-dimensional state space, an action space, and a reward function, the input parameters of the multi-dimensional state space comprise the benchmark path and the extreme path, the action space outputs multiple lock-in actions of the target lock-in strategy, and the reward function is used to determine the expected yield data corresponding to each lock-in action.
2. The lock-in strategy generation method according to claim 1, characterized in that, The step of preprocessing and fusion processing of multi-modal data to obtain a multi-dimensional feature vector set comprises: Obtaining structured data and unstructured data to obtain the multi-modal data, wherein the structured data comprises at least one of the following: real-time exchange rate data, transaction volume data, and volatility data obtained through an application programming interface (API), and the unstructured data comprises at least one of the following: news text of cross-border payment orders generated by an associated payment system and user comments on multiple types of social media; Preprocessing the structured data and the unstructured data; Fusing the structured data and the unstructured data using a gated recurrent unit (GRU) network to output the multi-dimensional feature vector set.
3. The lock-in strategy generation method according to claim 2, characterized in that, The step of preprocessing the structured data and the unstructured data comprises: Performing time series alignment processing, missing value filling processing, and feature engineering processing on the structured data; Performing text vectorization processing and sentiment index analysis processing on the unstructured data.
4. The lock-in strategy generation method according to claim 1, characterized in that, The step of inputting the multi-dimensional feature vector set into a generative agent to output a benchmark path set and an extreme path set comprises: Inputting an exchange rate time series and the multi-dimensional feature vector set into a diffusion model in the generative agent; Adding Gaussian noise to the exchange rate time series as a generated main variable to generate a noise sequence; Performing denoising operation on the noise sequence by the diffusion model to analyze exchange rate changes at multiple time steps and output a benchmark path set and a benchmark confidence interval at multiple time steps, wherein the benchmark confidence interval is used to define the exchange rate adjustment interval range of the benchmark path set.
5. The lock-in strategy generation method according to claim 4, characterized in that, The step of performing denoising operation on the noise sequence by the diffusion model comprises: Calling a multi-layer preset convolutional neural network (U-Net) by the diffusion model to perform denoising operation on the noise sequence, wherein the preset U-Net is used to denoise the noise sequence, and the multi-dimensional feature vector is used as a conditional input to participate in generation during the denoising process, and each layer of the preset convolutional neural network (U-Net) comprises 2 convolutional blocks and a ReLU activation function.
6. The lock-in strategy generation method according to claim 4, characterized in that, The step of inputting the multi-dimensional feature vector set into the generative agent to output the benchmark path set and the extreme path set comprises: inputting the pre-acquired random noise and historical volatility data into a generator of a generative adversarial network model in the generative agent to generate an initial extreme path set, wherein the generator is generated based on a Transformer encoder architecture; inputting the initial extreme path set into a discriminator of the generative adversarial network model, discriminating the real historical exchange rate path and the plurality of initial extreme paths by the discriminator, and outputting a real probability value of each initial extreme path, wherein the discriminator is generated based on a Transformer decoder architecture; screening the initial extreme paths by the generator of the generative adversarial network model according to the real probability value to obtain the extreme path set.
7. The lock-in strategy generation method according to claim 1, characterized in that, The step of inputting the benchmark path set and the extreme path set into the exchange rate simulation environment to generate the target lock-in strategy and the lock-in strategy yield data comprises: inputting the benchmark path set and the extreme path set into the exchange rate simulation environment, importing multi-dimensional feature vectors into a state space of each dimension in the exchange rate simulation environment; performing multi-class lock-in action combination processing by the action space based on the feature vectors of the multi-dimensional state space, the benchmark path and the extreme path, and outputting a target lock-in strategy, wherein the multi-class lock-in action comprises: extraction lock-in action, delay lock-in action, split lock-in action and expansion action; outputting the lock-in strategy yield data based on the exchange rate, the commission cost and the risk penalty coefficient of each type of lock-in action when the lock-in action is performed.
8. The lock-in strategy generation method according to claim 1, characterized in that, After inputting the benchmark path set and the extreme path set into the exchange rate simulation environment to generate the target lock-in strategy and the lock-in strategy yield data, the method further comprises: generating a lock-in request based on the target lock-in strategy, a transaction amount and a to-be-executed time period; submitting the lock-in request through a financial application programming interface (API) and receiving a transaction result, wherein the transaction result comprises at least one of the following: actual exchange rate, commission cost and transaction execution time; storing the transaction result into a database; determining actual path data and actual reward value by using the transaction result, and updating model parameters of each model in the generative agent by using the actual path data and the actual reward value. 9.A lock-in strategy generation device based on a generative agent, characterized by, The method comprises: a multi-modal data processing unit configured to pre-process and fuse multi-modal data to obtain a multi-dimensional feature vector set; a generative agent action unit configured to input the multi-dimensional feature vector set into a generative agent to output a benchmark path set and an extreme path set, wherein the generative agent comprises a diffusion model pre-trained to generate a benchmark path and a generative adversarial network model pre-trained to generate an extreme path, the benchmark path comprises exchange rate volatility data in a normal operating state, and the extreme path comprises exchange rate volatility data when an abnormal event occurs. A lock-in unit is configured to input the benchmark path set and the extreme path set into a rate simulation environment to generate a target lock-in strategy and lock-in strategy return data, wherein the rate simulation environment includes a defined multi-dimensional state space, an action space, and a reward function, input parameters of the multi-dimensional state space include the benchmark path and the extreme path, the action space outputs a plurality of lock-in actions of the target lock-in strategy, and the reward function is used to determine expected return data corresponding to each lock-in action.
10. An electronic device, comprising: The computer program product comprises one or more processors and a memory, and the memory is configured to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the method for generating a lock-in strategy based on a generated agent according to any one of claims 1 to 8.