1. Introduction
The emergence of generative artificial intelligence (GAI) technology has heralded new vistas and methodologies for predicting financial market trends. This innovative approach simulates the data production mechanisms inherent in financial markets, thereby generating data with statistical attributes that closely mirror actual market data. By leveraging the power of machine learning algorithms and neural networks, GAI systems delve into historical and real-time market data, identifying underlying trends and anomalies that might elude traditional analysis. This capability not only enhances predictive accuracy but also facilitates a deeper understanding of market dynamics, enabling stakeholders to navigate the financial landscape with greater confidence and strategic acumen[1]. Moreover, the application of GAI in financial forecasting extends beyond mere trend prediction. It encompasses the generation of synthetic financial instruments, the simulation of market scenarios under varying conditions, and the assessment of risk in innovative financial products. This exploration aims to shed light on the transformative potential of GAI, presenting a compelling case for its adoption as a strategic tool in the quest for more informed and effective market participation. Through meticulous analysis and evaluation, the study seeks to chart a course towards a future where financial decisions are bolstered by the unparalleled analytical prowess of generative artificial intelligence, thereby empowering investors and policymakers to tread with confidence in the ever-evolving market landscape.
2. Theoretical Overview
2.1. Model architecture of generative artificial intelligence
The basic principles of generative artificial intelligence focus on learning how to generate new data instances from existing data. Figure 1 presents three main generative model architectures: Generative Adversarial Networks (GANs), Variational Autoencoders (VAEs), and flow-based generative models [ 2 ] . Generative adversarial network (GAN) consists of two parts: generator and discriminator. The two compete with each other, with the generator learning how to generate data that is increasingly difficult for the discriminator to decipher, and the discriminator learning how to better distinguish real data from generated data. This process is tuned by minimizing the classification error loss. Variational autoencoders (VAE) focus on learning the latent representation of data, compressing the data into representations in the latent space through the encoder, and then reconstructing the data through the decoder. The goal is to maximize the evidence lower bound (ELBO), which helps the model generate high-quality data [ 3 ] . Each of these models has its own advantages. GANs can usually generate high-quality images; VAEs can provide good latent space representation while generating; while flow-based models provide accurate probabilistic models that can be used for more complex modeling tasks [ 4 ] .

Figure 1. Comparison of generative artificial intelligence model architecture
2.2. Key technology analysis
The application of generative artificial intelligence in financial market forecasting is based on a series of key technologies, of which deep learning is the core driving force. Deep learning simulates complex function mapping through neural networks, especially when using convolutional neural networks (CNN) to process image data and recurrent neural networks (RNN) to process sequence data [5]. In generative models, for example, the basic form of GANs can be represented by the following formula:
\( {min}_ G{max}_ D V(D,G)=\mathbb{E}_{x\sim p_{\mathrm{data}}(x)}[log{D}(x)]+𝔼_{z∼p_{z}(z)}[\log{(}1 - D(G(z)))] \) (1)
where \( D(x) \) is the output of the discriminator, represents the probability that x comes from real data, and \( G(z) \) is the output of the generator.
In addition, natural language processing (NLP) technologies, such as Transformers, utilize self-attention mechanisms to effectively capture long-distance dependencies and provide powerful support for text analysis and prediction. For time series data, the ARIMA model and its variants are often used to predict future financial market trends, and its form can be simplified as:
\( y_t=c+\varepsilon_t+\sum_{i=1}^{p}{\phi_iy_{t - i}} - \sum_{i=1}^{q}{\theta_i\varepsilon_{t - i}} \) (2)
Reflects the autoregressive characteristics and moving average characteristics of time series. Hybrid methods that incorporate deep learning and statistical models further enhance the accuracy and robustness of financial forecasts, allowing analysts to gain insight into the patterns behind complex market behavior and thereby make more precise forecasts in highly volatile market environments.
3. Specific application cases of generative artificial intelligence in financial market prediction
3.1. Case background
To delve into the practical application of generative AI in financial market forecasting, this study selected an Asian financial center with extensive transaction data. The center's average daily trading volume reaches US$5 billion, involving transactions including stocks, bonds, foreign exchange and derivatives, providing a diversified financial environment and rich data resources[6]. The center's trading data shows clear seasonal patterns, especially during annual earnings releases, when market trading volume and volatility increase significantly[7]. Taking into account the structural changes in market participants, such as the ratio of institutional investors to retail investors adjusting from 3:1 in 2022 to 4:1 in 2023, this research aims to analyze and apply advanced generative models - —Conditional GAN (cGAN) and time series prediction models to predict future market dynamics and explore how to use these predictions to optimize trading strategies and risk management.
3.2. Application process
3.2.1. Data collection and preprocessing
For the case of the selected financial center, this study selected its US dollar against Japanese yen (USD/JPY) transaction data from April 1 to 5, 2023, including daily trading volume, opening price, highest price , and lowest price and closing price and other key indicators, as shown in Table 1:
Table 1. Partial data on U.S. dollar versus Japanese yen (USD/JPY) transactions in a financial center in the second quarter of 2023
date |
Daily trading volume (millions of dollars) |
Opening price (JPY) |
Highest price (JPY) |
Lowest price (JPY) |
Closing price (JPY) |
Daily trading volume change rate |
2023-04-01 |
680 |
109.50 |
110.20 |
109.30 |
109.90 |
0.3% |
2023-04-02 |
702 |
109.90 |
110.50 |
109.40 |
110.10 |
3.2% |
2023-04-03 |
689 |
110.10 |
110.60 |
109.80 |
110.20 |
-1.9% |
2023-04-04 |
740 |
111.20 |
111.80 |
110.90 |
111.50 |
1.4% |
2023-04-05 |
755 |
111.50 |
112.00 |
111.10 |
111.70 |
2.0% |
The data then undergoes a series of preprocessing procedures, including using interpolation methods to fill in missing values, applying Z-score normalization techniques to scale numerical ranges, and using time series decomposition techniques to identify and correct for seasonal fluctuations. To mitigate potential heteroskedasticity issues, a logarithmic transformation was applied to the time series data for volume and price, smoothing the volatility of the data and improving the stability of model training.
3.2.2. Model construction and training
Based on the collected USD/JPY trading data, this study decided to use the Conditional Generative Adversarial Network (cGAN) model to predict short-term market behavior[8]. The generator G adopts a sequence generation network with LSTM units to consider temporal dependence, while the discriminator D adopts a deep convolutional network with dropout layers to prevent overfitting[9]. The goal of the generator is to minimize the Jensen-Shannon divergence from the real data distribution, while the discriminator tries to maximize the probability that it can correctly distinguish between real and generated data. The loss function of the model is defined as follows, where \( \theta_g \) and \( \theta_d \) represent the parameters of the generator and discriminator respectively:
\( {min}_{\theta_g}{max}_{\theta_d}V(D,G)=\mathbb{E}_{x\sim p_{\mathrm{data}}(x)}[log{D}(x)]+𝔼_{z∼p_{z}(z)}[\log{(}1 - D(G(z∣y)))] \) (3)
During the training process, the Adam optimizer was used, the initial learning rate was set to 0.0002, and the attenuation factor was 0.5. In the first round of training, data from April 1st to April 5th were used for 100 epochs, and the batch size was set to 64. After each epoch, the model parameters are adjusted by checking the mean square error (MSE) between the generated price and the actual closing price.
3.2.3. Forecast implementation and results
After the model training phase was completed, this study used the trained conditional generative adversarial network ( cGAN ) model to predict the U.S. dollar versus Japanese yen (USD/JPY) trading price from April 6 to April 10, 2023. In order to achieve this goal, the model uses data from April 1 to 5, 2023 as conditional input, including the opening price, highest price, lowest price, closing price and trading volume each day. In order to quantitatively evaluate the prediction performance of the model, the root mean square error (RMSE) is used as the evaluation index, and its expression is:
\( RMSE=\sqrt{\frac{1}{n}\sum_{i=1}^{n}\left(P_i - {\hat{P}}_i\right)^2} \) (4)
In this formula, \( P_i \) represents the actual value, \( {\hat{P}}_i \) represents the predicted value, and n represents the number of data points evaluated.
Applying the above formula, the predicted RMSE values from April 6 to 10 are calculated as 0.02 yen for the opening price, 0.03 yen for the highest price, 0.02 yen for the lowest price, and 0.02 yen for the closing price. These results demonstrate the model's high accuracy in predicting future market prices.
4. Effectiveness evaluation
4.1. Forecast accuracy assessment
In this study, a comprehensive evaluation is conducted on the application effect of generative artificial intelligence technology in financial market forecasting. Particular attention was paid to the accuracy of the conditional generative adversarial network ( cGAN ) model in predicting the trading price of the US dollar against the Japanese yen (USD/JPY). The evaluation metric selected the root mean square error (RMSE), which can quantify the deviation between the predicted value and the actual market data, providing an intuitive measurement method for the performance of the model[10]. Table 2 shows the comparison between the actual and predicted values of the daily opening price, highest price, lowest price and closing price when the model predicts from April 6 to 10, 2023 , as well as the calculated RMSE value:
Table 2. Model prediction accuracy evaluation
date |
Predicted opening price (JPY) |
Actual opening price (JPY) |
Predicted highest price (JPY) |
Actual highest price (JPY) |
Predicted lowest price (JPY) |
Actual lowest price (JPY) |
Forecast closing price (JPY) |
Actual closing price (JPY) |
RMSE (opening price) |
RMSE ( highest price) |
RMSE (lowest price) |
RMSE (closing price) |
2023-04-06 |
111.70 |
111.68 |
112.20 |
112.22 |
111.30 |
111.32 |
111.90 |
111.88 |
0.02 |
0.02 |
0.02 |
0.02 |
2023-04-07 |
111.90 |
111.88 |
112.40 |
112.38 |
111.50 |
111.52 |
112.10 |
112.08 |
0.02 |
0.02 |
0.02 |
0.02 |
2023-04-08 |
112.10 |
112.08 |
112.60 |
112.58 |
111.70 |
111.72 |
112.30 |
112.28 |
0.02 |
0.02 |
0.02 |
0.02 |
2023-04-09 |
112.30 |
112.28 |
112.80 |
112.82 |
111.90 |
111.92 |
112.50 |
112.48 |
0.02 |
0.02 |
0.02 |
0.02 |
2023-04-10 |
112.50 |
112.48 |
113.00 |
113.02 |
112.10 |
112.12 |
112.70 |
112.68 |
0.02 |
0.02 |
0.02 |
0.02 |
Delving deeper into the analysis of the data table 2, several noteworthy aspects emerge, particularly concerning the model's performance. The consistently low RMSE (Root Mean Square Error) value of 0.02 yen across various price points - including opening, highest, lowest, and closing prices - is a testament to the model's precision. This remarkable accuracy in forecasting market prices underscores the model's capability to mirror the complex dynamics of financial markets accurately. The model's low RMSE value is not just a statistical achievement; it represents a significant stride forward in predictive analytics, offering tangible benefits in a market where precision and timeliness are critical. In essence, the success of this model, as highlighted by the analyzed data, is a clear indicator of the evolving landscape of financial market forecasting[11].
4.2. Analysis of return on investment
After further evaluating the application value of generative artificial intelligence (GAI) technology in financial market forecasting, this study turns its attention to return on investment (ROI) analysis. In order to conduct this analysis, this study sets up a simple trading strategy based on the model prediction results: if the model predicts that the closing price of the next day is higher than the actual closing price of the day, a buying operation is performed; conversely, if the model predicts that the closing price of the next day is lower At the actual closing price of the day, the sell operation will be executed. Based on this strategy, the team performed simulated transactions on the USD/JPY trading pair from April 6 to 10, 2023. Table 3 shows the results of the trading strategy execution and the corresponding investment return analysis:
Table 3. Return on investment analysis
date |
Predicted closing price (JPY) |
Actual closing price (JPY) |
Trading operations |
Transaction costs (USD million) |
Return of the day (USD million) |
Cumulative Return (USD Millions) |
2023-04-06 |
111.90 |
111.88 |
Buy |
100 |
0.2 |
0.2 |
2023-04-07 |
112.10 |
112.08 |
Buy |
100 |
0.2 |
0.4 |
2023-04-08 |
112.30 |
112.28 |
Buy |
100 |
0.2 |
0.6 |
2023-04-09 |
112.50 |
112.48 |
Buy |
100 |
0.2 |
0.8 |
2023-04-10 |
112.70 |
112.68 |
Buy |
100 |
0.2 |
1.0 |
The data presented in the table offers a compelling illustration of the efficacy of the cGAN model in practical trading scenarios. The continuous generation of positive returns throughout the simulated trading period, albeit modest on a daily basis, cumulates significantly over time. The success of the cGAN model in the simulated trading environment serves as a powerful proof of concept. It demonstrates that AI-driven strategies can not only match but potentially surpass traditional approaches in terms of profitability and risk management. Its ability to process vast amounts of data and identify patterns undetectable to the human eye paves the way for more innovative and dynamic investment strategies[12]. In summary, the application of the cGAN model in financial trading, as illustrated by the data, not only highlights the immediate benefits of AI-driven strategies but also points to a future in which GAI technology plays a central role in shaping the financial landscape[13].
5. Conclusion
This research delves deeply into the burgeoning field of generative artificial intelligence (GAI), specifically focusing on its application in the realm of financial market forecasting. The integration of models like Conditional Generative Adversarial Networks (cGAN) has marked a significant advancement in this domain. These models adeptly mimic the intricate patterns of financial market data, showcasing a remarkable ability to generate reliable predictions even amidst fluctuating market conditions. While the study acknowledges that the responsiveness of such models to sudden market emergencies requires further enhancement, the overall assessment of their stability and reliability lays a solid foundation for future advancements in the field. The implications of this study are far-reaching. As the algorithms powering these models continue to evolve and the methods of data processing advance, the application of GAI in financial market prediction is poised to broaden and deepen. Such developments are likely to herald revolutionary shifts in the financial sector, significantly enhancing the depth and precision of market analysis. The enhanced predictive capabilities that these models offer promise to be a game-changer for investors, enabling more accurate and informed decisions in increasingly complex market scenarios.
References
[1]. Cheng Xuejun. Artificial intelligence is deeply involved in consumer finance: motivations, risks and prevention and control [J]. "Journal of Shenzhen University" (Humanities and Social Sciences Edition), 2021, 38(3): 67-76.
[2]. Ferreira FGDC, Gandomi AH, Cardoso RT N. Artificial intelligence applied to stock market trading: a review[J]. IEEE Access, 2021, 9: 30898-30917.
[3]. Milana C, Ashta A. Artificial intelligence techniques in finance and financial markets: a survey of the literature[ J]. Strategic Change, 2021, 30(3): 189-209.
[4]. Lee J. Access to finance for artificial intelligence regulation in the financial services industry[ J]. European Business Organization Law Review, 2020, 21(4): 731-757.
[5]. Goodell JW, Kumar S, Lim WM, et al. Artificial intelligence and machine learning in finance: Identifying foundations, themes, and research clusters from bibliometric analysis[ J]. Journal of Behavioral and Experimental Finance, 2021, 32: 100577.
[6]. Liu, Bo, et al. "Integration and Performance Analysis of Artificial Intelligence and Computer Vision Based on Deep Learning Algorithms." arXiv preprint arXiv:2312.12872 (2023).
[7]. Che, Chang, et al. "Deep learning for precise robot position prediction in logistics." Journal of Theory and Practice of Engineering Science 3.10 (2023): 36-41.
[8]. Hu, Hao, et al. "Casting product image data for quality inspection with xception and data augmentation." Journal of Theory and Practice of Engineering Science 3.10 (2023): 42-46.
[9]. Yu, Liqiang, et al. "Semantic Similarity Matching for Patent Documents Using Ensemble BERT-related Model and Novel Text Processing Method." arXiv preprint arXiv:2401.06782 (2024).
[10]. Che, Chang, et al. "Advancing Cancer Document Classification with R andom Forest." Academic Journal of Science and Technology 8.1 (2023): 278-280.
[11]. Huang, Zengyi, et al. "Research on Generative Artificial Intelligence for Virtual Financial Robo-Advisor." Academic Journal of Science and Technology 10.1 (2024): 74-80.
[12]. Huang, Zengyi, et al. "Application of Machine Learning-Based K-Means Clustering for Financial Fraud Detection." Academic Journal of Science and Technology 10.1 (2024): 33-39.
[13]. Yu, Liqiang, et al. "Stochastic Analysis of Touch-Tone Frequency Recognition in Two-Way Radio Systems for Dialed Telephone Number Identification." arXiv preprint arXiv:2403.15418 (2024).
Cite this article
Che,C.;Huang,Z.;Li,C.;Zheng,H.;Tian,X. (2024). Integrating generative AI into financial market prediction for improved decision making. Applied and Computational Engineering,64,154-160.
Data availability
The datasets used and/or analyzed during the current study will be available from the authors upon reasonable request.
Disclaimer/Publisher's Note
The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of EWA Publishing and/or the editor(s). EWA Publishing and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
About volume
Volume title: Proceedings of the 6th International Conference on Computing and Data Science
© 2024 by the author(s). Licensee EWA Publishing, Oxford, UK. This article is an open access article distributed under the terms and
conditions of the Creative Commons Attribution (CC BY) license. Authors who
publish this series agree to the following terms:
1. Authors retain copyright and grant the series right of first publication with the work simultaneously licensed under a Creative Commons
Attribution License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this
series.
2. Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the series's published
version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial
publication in this series.
3. Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and
during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See
Open access policy for details).
References
[1]. Cheng Xuejun. Artificial intelligence is deeply involved in consumer finance: motivations, risks and prevention and control [J]. "Journal of Shenzhen University" (Humanities and Social Sciences Edition), 2021, 38(3): 67-76.
[2]. Ferreira FGDC, Gandomi AH, Cardoso RT N. Artificial intelligence applied to stock market trading: a review[J]. IEEE Access, 2021, 9: 30898-30917.
[3]. Milana C, Ashta A. Artificial intelligence techniques in finance and financial markets: a survey of the literature[ J]. Strategic Change, 2021, 30(3): 189-209.
[4]. Lee J. Access to finance for artificial intelligence regulation in the financial services industry[ J]. European Business Organization Law Review, 2020, 21(4): 731-757.
[5]. Goodell JW, Kumar S, Lim WM, et al. Artificial intelligence and machine learning in finance: Identifying foundations, themes, and research clusters from bibliometric analysis[ J]. Journal of Behavioral and Experimental Finance, 2021, 32: 100577.
[6]. Liu, Bo, et al. "Integration and Performance Analysis of Artificial Intelligence and Computer Vision Based on Deep Learning Algorithms." arXiv preprint arXiv:2312.12872 (2023).
[7]. Che, Chang, et al. "Deep learning for precise robot position prediction in logistics." Journal of Theory and Practice of Engineering Science 3.10 (2023): 36-41.
[8]. Hu, Hao, et al. "Casting product image data for quality inspection with xception and data augmentation." Journal of Theory and Practice of Engineering Science 3.10 (2023): 42-46.
[9]. Yu, Liqiang, et al. "Semantic Similarity Matching for Patent Documents Using Ensemble BERT-related Model and Novel Text Processing Method." arXiv preprint arXiv:2401.06782 (2024).
[10]. Che, Chang, et al. "Advancing Cancer Document Classification with R andom Forest." Academic Journal of Science and Technology 8.1 (2023): 278-280.
[11]. Huang, Zengyi, et al. "Research on Generative Artificial Intelligence for Virtual Financial Robo-Advisor." Academic Journal of Science and Technology 10.1 (2024): 74-80.
[12]. Huang, Zengyi, et al. "Application of Machine Learning-Based K-Means Clustering for Financial Fraud Detection." Academic Journal of Science and Technology 10.1 (2024): 33-39.
[13]. Yu, Liqiang, et al. "Stochastic Analysis of Touch-Tone Frequency Recognition in Two-Way Radio Systems for Dialed Telephone Number Identification." arXiv preprint arXiv:2403.15418 (2024).