Next Article in Journal
Evidence of Economic Policy Uncertainty and COVID-19 Pandemic on Global Stock Returns
Previous Article in Journal
Credit Risk in G20 Nations: A Comparative Analysis in International Finance Using Option-Adjusted-Spreads
Previous Article in Special Issue
New Dataset for Forecasting Realized Volatility: Is the Tokyo Stock Exchange Co-Location Dataset Helpful for Expansion of the Heterogeneous Autoregressive Model in the Japanese Stock Market?
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Simulating Multi-Asset Classes Prices Using Wasserstein Generative Adversarial Network: A Study of Stocks, Futures and Cryptocurrency

1
Department of Computer Science and Engineering, The Hong Kong University of Science and Technology, Hong Kong, China
2
Department of Industrial Engineering and Decision Analytics and Department of Mathematics, The Hong Kong University of Science and Technology, Hong Kong, China
*
Author to whom correspondence should be addressed.
Current address: Clear Water Bay, Sai Kung, New Territories, Hong Kong, China.
J. Risk Financial Manag. 2022, 15(1), 26; https://doi.org/10.3390/jrfm15010026
Submission received: 26 November 2021 / Revised: 3 January 2022 / Accepted: 5 January 2022 / Published: 10 January 2022
(This article belongs to the Special Issue AI and Financial Markets)

Abstract

:
Financial data are expensive and highly sensitive with limited access. We aim to generate abundant datasets given the original prices while preserving the original statistical features. We introduce the Wasserstein Generative Adversarial Network with Gradient Penalty (WGAN-GP) into the field of the stock market, futures market and cryptocurrency market. We train our model on various datasets, including the Hong Kong stock market, Hang Seng Index Composite stocks, precious metal futures contracts listed on the Chicago Mercantile Exchange and Japan Exchange Group, and cryptocurrency spots and perpetual contracts on Binance at various minute-level intervals. We quantify the difference of generated results (836,280 data points) and original data by MAE, MSE, RMSE and K-S distances. Results show that WGAN-GP can simulate assets prices and show the potential of a market simulator for trading analysis. We might be the first to look into multi-asset classes in a systematic approach with minute intervals across stocks, futures and cryptocurrency markets. We also contribute to quantitative analysis methodology for generated and original price data quality.

1. Introduction

Various scholars are trying to solve price prediction problems to capture short-term alphas in the markets (Ariyo et al. (2014); Foster (2002); Abraham et al. (2018)). However, a more fundamental contribution can be understanding the underlying price behavior of multiple asset classes with limited data. One of the critical processes is to generate enough data for observations and backtesting, therefore we want to learn the distribution of asset prices based on limited price information. We hope to generate richer varieties of data to simulate the original prices while preserving the original statistical features. Stock prices are considered to be random walks (and crypto as well) by Palamalai et al. (2021). To simulate the price behaviors, we adopt WGAN-GP to generate richer data with noise to discover hidden characteristics. To ensure the quality of generated real and fake data discriminated by WGAN-GP, we use MAE, MSE, RMSE and KS distance to calculate the price differences with multiple minute level intervals.
The Generative Adversarial Network(GAN) Goodfellow et al. (2014)’s success in generating realistic synthetic images has inspired machine learning for generating multi-asset class prices. The GAN models in image generations could be used in financial datasets. Inspired by the generator and discriminator ideas, we implement a Wasserstein GAN with Gradient Penalty (WGAN-GP) framework to learn the underlying original financial datasets distributions, given minute level intervals prices across stocks, futures and cryptocurrencies markets. We explore a universal WGAN-GP model to simulate multi-asset classes datasets purchased from the Hong Kong Stock Exchanges, the Chicago Mercantile Exchange and the Japan Exchange Group. We report observations from stocks, futures and crypto markets, and evaluate generated prices against original datasets. The results showed good performance, and we can use WGAN-GP as a probabilistic prediction model on financial time series to obtain the potential distribution of original financial datasets.
Since financial datasets contain potentially sensitive information, datasets are always headaches for quantitative researchers for predictive purposes when backtesting algorithm trading strategies ranging from multiple time intervals like intraday and high frequency trading. Furthermore, based on abundant prices, reducing algorithm overfitting and enhancing the robustness of portfolios when markets are volatile are desired among professional users. Moreover, stock datasets have unique features like ‘tick size’ and trading mechanisms for each market including auctions and continuous trading sessions, while futures contracts have day and night sessions.
Here, we propose a practical model focusing on minute-level prices and quantifying the quality against original prices.  Li et al. (2020) obtained the training tick data from OneMarketData as a financial data provider.  Samuel et al. (2021) trained the WGAN-GP for daily prices downloaded from Yahoo Finance (n.d.)1, but generated data are distinguishable. Their WGAN-GP consists of a generator and discriminator function which utilize an LSTM architecture. However, the model has space for optimization, which could be achieved by adjusting the hyperparameters. One of the solutions could be the learning rates. Samuel used an RMSprop optimizer with a fixed learning rate of 0.00005. Smith (2017) proposed training with cyclical learning rates instead of fixed values, which achieves improved classification accuracy. WGAN-GP can be trained to customize conditions through parameter settings like cyclic learning rates. To ensure the input data quality, we purchased all limit order books data including trades and order books from HKEX for stocks and CME and JPX for precious metals. We downloaded cryptos spots and perpetual futures from Binance, one of the biggest exchanges. To the best of authors’ knowledge, we might be the first to look into multi-asset classes in a systematic approach with minute-level intervals observations with WGAN as in Figure 1.
We propose the following research questions:
  • Can WGAN-GP be trained as a probabilistic model for financial prices simulations?
  • Can WGAN-GP simulate multiple minute-level intervals prices?
  • How good are the WGAN-GP when simulating multiple asset classes, e.g., stocks, futures and cryptos?
The contents are organized as follows. Section 2 describes the model GAN, WGAN and WGAN-GP with their features. Section 3 describes our proposed model based on WGAN-GP and multiple asset classes datasets. Section 4 includes the results for training the Hong Kong stocks. Section 5 reports the performance of precious metal futures including gold  CME Gold Futures and Option (n.d.), JPX Gold Futures and Options (n.d.) and platinum  CME Platinum Futures and Options (n.d.), JPX Platinum Futures and Options (n.d.) futures products listed on CME and JPX. Section 6 focuses on training cryptocurrencies including spot and perpetual futures contracts. Section 7 discusses the results and provides implications for future research. Finally, we conclude our model performance and give insights about multi-asset classes simulations in Section 8.
Algorithm 1: WGAN-GP algorithm
for i i n r a n g e ( e p o c h s ) do
   for j i n r a n g e ( n c r i t i c ) do
  sample X original P data ;
  sample X n o i s e P n o i s e ;
   L original = C r i t i c ( X original ) ;
   L fake = C r i t i c ( G e n e r a t o r ( X n o i s e ) ) ;
   G P = bad   hbox L original , L fake ;
   l o s s c = 1 b s i = 1 b s L f a k e ( i ) 1 b s i = 1 b s L o r i g i n a l ( i ) + GP
   α d = CyclicLR ( epoch , bad   hbox c , bad   hbox c ;
   W e i g h t c r i t i c = W e i g h t c r i t i c + α d · RMSprop ( l o s s c , W e i g h t c r i t i c ) ;
   end for
   sample batch noise again;
    L fake = C r i t i c ( G e n e r a t o r ( X n o i s e ) ) ;
    l o s s g = 1 b s i = 1 b s L fake ( i ) )
    α g = CyclicLR(epoch, b a s e ̲ l r g , l r ̲ m a x g ) ;
    W e i g h t g e n e r a t o r = W e i g h t g e n e r a t o r
   α g e n e r a t o r · RMSprop ( l o s s g e n e r a t o r , W e i g h t g e n e r a t o r ) ;
   end for
Algorithm 1 WGAN-GP trains each asset class with customized parameters, and we systematically examine the difference between generated data prices and original prices by MAE, MSE, RMSE and KS test in Section 4 for stocks markets, Section 5 for precious metal futures listed on CME and JPX and Section 6 for cryptos listed on Binance including spots and perpetual futures.

2. Generative Adversarial Networks

Generative adversarial networks are unsupervised learning algorithms that build two neural networks competing in a zero-sum game. The ultimate goal of GAN is to generate P g e n e r a t e d close to original distribution P o r i g i n a l . Using GANs on images is easy and intuitive, however hard for humans to examine large-scale datasets.

2.1. GAN Structure

Generator and discriminator are the two models in a game playing against each other during the training. The generator will output an image initiated from random noise and pass it to the discriminator as a binary classifier assigning generated real or fake labels. The generator struggles to adjust according to the feedback and continues to fool the discriminator. Meanwhile, the discriminator continues to refine the decision making strategies until it cannot differentiate real and fake ones. The optimal states of the discriminator are random guesses with 0.5 accuracies.

2.2. GAN Training

The GAN has iterative gradient descent for both players. The Loss function is obtained by taking a batch of real (from P r e a l ) and generated samples (from = P g e n e r a t e d ). ADAM or RMSprop optimizer is widely used for increasing training convergence. The overall value function Value (G, D), which incorporates both Loss(D) and Loss(G), is defined as:
min G max D V a l u e ( D , G ) = E x p original [ log D ( x ) ] + E n o i s e p n o i s e [ log ( 1 D ( G ( n o i s e ) ) ) ]
Both players can be lazy from updating, leading to mode collapse, ignoring all other modes and staying in the comfort zones with few states. The generator can only create a few generated data when minimizing the loss while Discriminator remains passive feedback.

2.3. Wasserstein GAN

Wasserstein GAN solves the mode collapse problems by subtle changes on the models with earthmoving distance by Arjovsky et al. (2017). However, weight clipping is hard to enforce a Lipschitz constraint to stabilize the training while keeping diversified data varieties.
W a s s e r s t e i n P o r i g i n a l , P g e n e r a t e d = sup f L i p s c h i t z 1 E x P o r i g i n a l [ f ( x ) ] E x P g e n e r a t e d [ f ( x ) ]

2.4. Wasserstein GAN with Gradient Penalty

A derivable function is 1-Lipschtiz if and only if it has gradients of norm at most 1 everywhere. Therefore, the gradient penalty is used to constrain the gradient norm of the critic’s output to be 1 everywhere in regard to its input. The gradient penalty by Gulrajani et al. (2017) is added to the objective:
L o s s P o r i g i n a l , P g e n e r a t e d = E x P o r i g i n a l f w ( x ) E n o i s e P g e n e r a t e d f w G θ ( n o i s e ) + λ E x P o r i g i n a l x f w ( x ) 2 1 2
Our model is based on WGAN-GP in Section 3 and customized for the following asset classes including stocks, futures, and cryptocurrencies demonstrated in Section 4, Section 5 and Section 6.

3. Our Proposed Model and Asset Classes Datasets Descriptions for Training

We initialize b s = 64 , n c r i t i c = 5 , l r ̲ m i n c = 3 × 10 4 , l r ̲ m a x c = 8 × 10 4 , l r ̲ m i n g = 1 × 10 4 , l r ̲ m a x g = 1 × 10 3 . We used an AMD EPYC 7H12 64-Core Processor 2.6 GHz, with 1 TB RAM, and 4 Nvidia A100-SXM4-40 GB GPUs for the training tasks, since each dataset is pretty big with all limit order books information, the powerful server can better model the training performance. The training takes around 200 h to complete, and generate a total of 836,280 data points, 4140 data points for each row, respectively. For stocks we generated 372,600 points for HSI Composite, 115,920 data points including TGD, TPL, PLE and GCE for precious metal futures, 202,860 for cryptos spots and 144,900 for crypto perpetual futures. The parameters for training are outlined in Table 1 and multiple asset classes datasets in Table 2.
For the Hong Kong market, Kim and Mei (2001) showed that political developments in Hong Kong have a significant impact on its market volatility and return. The extended ARCH-jump filter with bad news has a more significant volatility effect than good news. The unique characteristics can be price jumps that misprice derivative products tracking benchmark HSI indices, leading to a dynamic hedging portfolio less effective with jumps caused by policy risks. Xu et al. (2020) argued market liberalization leads to lower quoted spread, lower effective spread, lower market depth, and higher short-term volatility for the Shanghai–Hong Kong Stock Connect program (SHHKConnect). Meyer and Guernsey (2017) discussed how high frequency trading on the HKEx compared to the SGX may derive from an underlying conflicted approach within Hong Kong’s political-economy about how HKEx relates to China’s exchanges. On this occasion, we might be the first to look into the Hang Seng Index Component Stocks, a total of 60 stocks. We introduce WGAN into Hong Kong stocks simulations to better understand Hong Kong markets.
For the futures market, Kang et al. (2017) evaluated and compared optimal portfolio weights and time-varying hedge ratios from 4 January 2002 to 28 July 2016. They showed directional spillovers (DS) could transmit from one market to another. Xu and Fung (2005) indicated that pricing transmissions for these precious metals contracts are strong across the two markets. Still, information flows appear to lead from the U.S. market to the Japanese market in terms of returns, and the offshore trading information can be absorbed in 24 h. Mensi et al. (2021) suggested that gold and silver are net contributors of risk to the other markets, whereas palladium is a net receiver of risk for all the time horizons. Platinum is a net contributor of risk to the other markets in the short term and a net receiver of risk from the remaining markets in the intermediate- and long-term horizons. Precious metals provide diversification gains to currency investors for all time horizons.
For the cryptocurrency market, Lee et al. (2020) studied BTC data from January 2018 contracts to March 2019 on all CBOE and CME. They concluded that Bitcoin spot and futures are cointegrated, and Bitcoin futures are biased predictors of spot prices. Kyriazis et al. (2019) studied bearish market daily data from 1 January 2018 to 16 September 2018. They concluded that the highest capitalization digital currencies, namely Bitcoin, Ethereum and Ripple, will influence others. Baur and Hoang (2021) concluded stablecoins are relatively safe compared with BTC. We benchmarked BTC as the highest market capitalization asset from the above literature.

4. HANG SENG INDEX Components Stocks Simulations

The Hang Seng Index (HSI) is the main stock market index in Hong Kong to monitor the daily changes of the largest companies listed in the Hong Kong stock market. HSI is the leading indicator of the overall market performance in Hong Kong. These 60 constituent companies represent about half of the capitalisation of the Hong Kong Stock Exchange.

4.1. Data Cleaning for HKEX Datasets

The complete limit order book and trade book data were purchased from HKEX. After deserializing from binary files into MongoDB to reconstruct simulations, we recorded the stock code and order book modification, including cancellation and trade orders in milliseconds. To generate an order book snapshot, we resampled by consecutive trading minutes to obtain Open, Close, High and Low prices. Finally, we obtained the minute-level original Close prices.

4.2. Input and Output Prices for the WGAN-GP Model

Here, we introduced the input prices of original minute close in Figure 2 for WuXi Biologics 2269.HK as an example and output as generated minute close prices in Figure 3, followed by density plot by price distributions in Figure 4 for 2269.HK.
Given the price distributions at minute intervals for 2269.HK, we started from 19 October 2020, and fed the minute interval prices into the WGAN-GP model. The generator tries to fool the discriminator by generating as many data points as possible. In contrast, the discriminator struggles to judge by labelling real and fake compared to the original data.
After obtaining the generated real data, the two curves can be plotted in the same graph (the X-axis is the price). The simulated real price curve is twisted around the original minute level close. We need to quantify the difference between two prices by MAE, MSE, RMSE and K-S distances Table 3. As shown in Table 3 and Table 4, we calculated and generated 19–23 October 2020, five trading days with MAE-R, MSE-R and RMSE-R, where R denotes Generated Real, meaning the differences against original input minute close prices. To further ensure the quality of generated real and fake data, we investigate the KS test with Generated Real and Fake compared with original input prices. Usually, the smaller KS, the better results. The KS R/F ratio means the difference between KS Real and KS Fake. Similarly, the smaller, the better.
Hong Kong securities market includes 1. Auction Session Pre-opening Session 9:00 a.m.–9:30 a.m. 2. Continuous Trading Session from 9:30 a.m. to 4:00 p.m. with an hour break in the noon Hong Kong Exchanges and Clearing Limited (n.d.). HSBC continuous trading minutes include pre-opening session and continuous trading session with an closing auction every market open day shown in Figure 5.

4.3. Quantitative Results by MAE, MSE, RMSE, K-S Tests, KS R/F Ratio and MAE-R/ Tick

We measured the difference by mean absolute error (MAE), mean squared error (MSE), and root-mean-square deviation (RMSE). Due to the page limit, we only listed Generated Real data with original market close data. We calculated the Kolmogorov-Smirnov test (KS-test) between Generated Real and Generated Fake to quantify the distribution difference with original market close price data.
MAE represents the difference between the real and fake values extracted by averaging the absolute difference over the datasets. MSE represents the difference between the real and fake values extracted by squaring the average difference over the dataset.
M A E = 1 N i = 1 N y i y ^ i
M S E = 1 N i = 1 N y i y ^ i 2
where y i denotes real values and y ^ i denotes fake values.
The KS-test is a kind of “goodness-of-fit test”. Suppose that we have an i.i.d. sample X 1 , , X n with some unknown distribution P and we want to test the hypothesis that P is equal to a particular distribution P 0 , i.e., decide between the following hypotheses:
H 0 : P = P 0 H 1 : P P 0
The KS-test tries to determine if two datasets differ significantly. The KS-test has the advantage of not assuming the distribution of data Li et al. (2020). Li et al. proposed model Stock-GAN outperformed against recurrent conditional variational auto-encoder (VAE) and DCGAN instead of WGAN. However, they only tested the model on two stocks: a large capitalization stock, Alphabet Inc (GOOG), on one trading day in August 2017 and a small-capitalization stock, Patriot National (PN), which has relatively poor performance. The Stock-GAN model KS distance is 0.126 for GOOG, which is better than VAE (0.218) and DCGAN (0.181).

4.4. Discussion for HANG SENG INDEX Components Stocks Markets

After rounding by tick size, the MAE-R/Tick can be referred as part of volatility. In Table 3, 1211.HK (Tick value = 0.2, MAE-R/Tick = 33.08), 2313.HK (Tick value = 0.1, MAE-R/Tick = 29.12), 2331.HK (Tick value = 0.05, MAE-R/Tick = 26.56), 1928.HK (Tick value = 0.02, MAE-R/Tick = 37.7), 0762.HK (Tick value = 0.01, MAE-R/Tick = 23.8) shows higher volatility in one minute interval. The highest KS REAL and KS FAKE are 0.122, 0.110 and the highest KS R/F Ratio is 1.519. Overall, the quantitative results show the WGAN-GP generated data for prices are of high quality.

5. CME and JPX Precious Metal Futures Market Simulations

The Chicago Mercantile Exchange and the Japan Exchange Group are among the most significant futures exchanges globally. Precious metals futures are the most liquid products. Gold, silver, platinum and palladium are precious metal commodities with a wide range of industrial usage. The precious metal also retains a significant role as a relatively stable investment instrument by the private firms, governments, LBMA and central banks. Precious metal futures are highly leveraged investments for hedging and speculations where margin can keep with broker or exchange.
We purchased the historical data on the website of CME Group and Japan Exchange Group covering the whole year of 2020 trade and order books. After resampling, we obtained Open, High, Low and Close at different time intervals.

5.1. Results on Japan Exchange Group Precious Metal Futures at Different Time Intervals

We selected 6 Janiary 2020, as our observation date, where we captured input prices at various minute intervals. Surprisingly, platinum futures at 15 min intervals have the least MAE-R. We generated 57,960 data points for TGD in Table 5 and TPL in Table 6 for a single day, at least three times larger than the original inputs.

5.2. Results on Chicago Mercantile Exchange Precious Metal Futures at Different Time Intervals

Platinum futures have the highest MAE-R among all contracts, whether CME or JPX. We selected 6 January 2020, as our observation date, where we captured input prices at various minute intervals. We generated 57,960 data points for PLE in Table 7 and GCE in Table 8 for a single day, at least three times larger than the original inputs. We visualized Platinum futures contract (PLE) 15 minutes results in Figure 6.

6. Cryptocurrencies Simulations

The cryptocurrency market runs continuously all day globally. The centralized exchanges across time zones are active somewhere at any time. A cryptocurrency is a digital currency secured by cryptography, making it nearly impossible to counterfeit or double-spend. Many cryptocurrencies are decentralized networks based on blockchain technology—a distributed ledger enforced by computers networks. As an emerging asset class, we examine the following spots and perpetual futures contracts by minute level intervals.

6.1. Spot Results and Analysis

A Spot Market is a market where investors can trade assets with other traders in real-time. As the name suggests, transactions are settled immediately or “on the spot” when the buying/selling order is filled. You can purchase an asset with fiat or another cryptocurrency from a seller as a buyer.
The data is open-source on the website of Binance (n.d.)2 where we downloaded spot and results for Bitcoin (BTCUSDT) in Table 9, Ethereum (ETHUSDT) in Table 10, Binance Coin (BNBUSDT) in Table 11, Cardano (ADAUSDT) in Table 12, Solana (SOLUSDT) in Table 13, XRP (XRPUSDT) in Table 14, Polkadot (DOTUSDT) in Table 15 on the date of 3 Septemper 2021, from 12:00 a.m. to 11:59 p.m. for a total of 1440 trading minutes. We generated 202,860 data points in total for a single trading day, 28,980 each symbol.

6.2. Perpetual Futures Results and Analysis

Perpetual contracts are derivative contracts similar to futures with no expiration date or settlement, allowing them to be held or traded for a consistent trading time. Perpetual contracts are gaining popularity in cryptos because they allow traders to hold leveraged positions without the burden of an expiration date. Unlike traditional futures, perpetual contracts trade close to the index price of the underlying asset due to perpetual funding rates. We included BTCUSDT Perpetual in Table 16 and visualized BTC Perpetual in Figure 7, ETHUSDT Perpetual in Table 17, BNBUSDT Perpetual in Table 18, ADAUSDT Perpetual in Table 19, and XRPUSDT Perpetual in Table 20 for multiple intervals.
As shown in Table 16, BTC Perpetuals, for KS R/F Ratio, three out of seven are more significant than one. From Table 17 ETHUSDT Perpetuals, only one ratio is over one. From Table 18 BNBUSDT Perpetuals, two out of seven are over one. Also, for Table 19 ADAUSDT Perpetuals, two out of seven are more significant than one. For Table 20 XRPUSDT Perpetuals, one out of seven is more significant than one. Overall, the REAL is much closer to the original price inputs, ensuring the data quality we generate.

7. Discussion and Future Directions

Each asset class shows its unique features due to granular trading conditions, market microstructure, liquidity and volatility. A few directions to explore:
  • There exists the possibility to extend more asset classes into Forex and other emerging markets like China A markets. The exchange will only release price quotations once every three seconds, including price and volume, within three seconds are hidden from the markets. Therefore, the simulation is useful for generating abundant hidden information and understanding the blackbox between the intervals for understanding the China A markets.
  • From the asset classes perspective, the Hong Kong stock market has less liquidity due to policy risks and expensive transaction fees of around 0.1477% of total transaction value per side, including buying and selling. Lezmi et al. (2020) conducted experiments including risk parity strategy and augmenting the investment universe with market regime indicators. Lezmi addressed RBMs and GANs being used for estimating the probability distribution of performance and risk statistics, which can improve the risk management of quantitative investment strategies. Rosolia and Osterrieder (2021) discussed different asset classes such as commodities, forex, futures, index and shares. For trading hours, the Hong Kong stock market had 5.5 h of trading sessions with an hour lunch break, almost one-quarter of the futures market (Sunday–Friday 6:00 p.m.–5:00 p.m. (5:00 p.m.–4:00 p.m./CT) with a 60-min break each day beginning at 5:00 p.m. (4:00 p.m. CT)) and crypto market (24 h). Interestingly, the 2269.HK-1 min test result is around 100.38 for MAE-Real/Tick size, which is five times larger than the 3690.HK-1 min test result, ten times larger compared to 0005.HK-1 min test result, and 14 times larger than 0688.HK-1 min test result. Some underlying features (e.g., volume, volatility, etc.) might exist during our observations. Our simulator could discover the potential abnormal stock behaviour and underlying market impacts by comparing generated prices against original input price behaviour. Further investigation can focus on evaluating and clustering MAE values to discover market microstructure and trading conditions.
  • Volume simulation can be another further work. Institutional investment banks and trading firms predict volume curves for normal days for optimizing their portfolio positions. Special dates like index rebalancing days, Korean exam days, Japan Nikkei 225 component weights change days, festival half days, Triple witching hour days on the third Friday of every March, June, September, and December are volume sensitive. Many volume parameters of passive and active trading executions need to be discovered.
  • From the trading frequency perspective, simulating tick data, minute-level data, and daily-level data will enhance the robustness and scalability for multiple trading frequencies. Some asset managers prefer to buy and hold strategies, and others prefer transactions at a weekly frequency. Kakushadze (2016) presented alpha signals with an average holding period ranging from approximately 0.6 to 6.4 days. Thus, a scalable observation of pricing the inventory assets would be desired. Simulating order books, including best bid and ask orders with inter-arrivals, especially on extreme market conditions like COVID 19 or rockets up like Trading Curb situations, will be helpful topics to explore. The figure shows the simulated volume-weighted average price (VWAP) and time-weighted average price (TWAP) against original VWAP and TWAP. The spread is getting narrow when trading continues until 1200 minutes in Figure 8.

8. Conclusions

The contributions can be summarized in the following:
  • A complete WGAN-GP framework was proposed through extensive and systematic experiments for multiple asset classes, including stocks, futures, and cryptocurrency. Also, an in-depth analysis was given to fine-tune important hyperparameters. We trained our model on various datasets, including the Hong Kong Stock Market Hang Seng Index composite stocks, precious metal futures contracts listed on the Chicago Mercantile Exchange, the Japan Exchange Group, and cryptocurrency spots and perpetual contracts on Binance at various minute-level intervals. After generating 836,280 data points from 90,900 epochs, we showed that WGAN-GP can be trained as a probabilistic model with stability, scalability and robustness for price simulations.
  • From an asset classes perspective, we find that 2269.HK has the largest MAE-R/Tick among Hang Seng Index stocks. Platinum assets like TPL (TOCOM Platinum on the Tokyo Commodity Exchange) and PLE (Platinum (Globex) NYMEX on the Chicago Mercantile Exchange) have relatively larger MAE-R/Tick than a gold asset like GCE and TGD. BTC, ETH, and BNB spots and perpetual futures have the largest MAE-R/Tick values. Many interesting topics remain to work on. First, we can further extend to other markets like The Standard and Poor’s 500, Nikkei 225, KOSPI 200 Index, CSI Small 500 Index, and the DAX Performance Index. Second, derivatives, especially non-linear products like option pricing, can be simulated against historical data.
  • From a trading frequency perspective, WGAN-GP can be used to simulate possible price datasets at various minute-level intervals. We proposed to evaluate the outcomes by comparing the generated synthetic distribution against the original data distribution at multiple time intervals, including one, two, three, four, five, ten and fifteen minutes. When the model goes to the production environment, for execution considerations, some statistics for evaluation such as the quantity of executed orders, prediction of inter-arrival orders, cancellation rates and the best bid and best ask can be implemented.
To sum up, our results show that WGAN-GP can simulate asset prices and show a market simulator’s potential for trading analysis. We might be the first to look into multi-asset classes in a systematic approach with minute level intervals across stocks, futures and cryptocurrencies markets. We also contribute to quantitative analysis methodology for generated and original price data quality.

Author Contributions

Conceptualization, F.H. and J.Z.; methodology and visualization, F.H.; resources and curation, J.Z.; writing—original draft preparation, F.H.; writing—review and editing, X.M.; supervision, J.Z. and funding acquisition, J.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by Hong Kong Research Grant Council Grants 16208120 and Grants 16204718.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Informed consent was obtained from all subjects involved in the study.

Data Availability Statement

Data that supports the findings of this study are available from the corresponding author upon reasonable request. Restrictions apply to the availability of data.

Acknowledgments

Thanks, SiuTim Wong, Luxu Liang for providing calculations support.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
TGDTOCOM Gold on Tokyo Commodity Exchange
TPLTOCOM Platinum on Tokyo Commodity Exchange
GCEGold (Globex) COMEX on Chicago Mercantile Exchange
PLEPlatinum (Globex) NYMEX on Chicago Mercantile Exchange
CMECOMEX on Chicago Mercantile Exchange
JPXJapan Exchange Group
WGAN-GPWasserstein Generative Adversarial Networks-Gradient Penalty
HSIHang Seng Indexes

Notes

1
2

References

  1. Abraham, Jethin, Daniel Higdon, John Nelson, and Juan Ibarra. 2018. Cryptocurrency price prediction using tweet volumes and sentiment analysis. SMU Data Science Review 1: 1. [Google Scholar]
  2. Ariyo, Adebiyi A., Adewumi O. Adewumi, and Charles K. Ayo. 2014. Stock price prediction using the ARIMA model. Paper presented at the 2014 UKSim-AMSS 16th International Conference on Computer Modelling and Simulation, Cambridge, UK, March 26–28; pp. 106–12. [Google Scholar]
  3. Arjovsky, Martin, Soumith Chintala, and Léon Bottou. 2017. Wasserstein generative adversarial networks. In International Conference on Machine Learning. Sydney: PMLR, pp. 214–23. [Google Scholar]
  4. Baur, Dirk G., and Lai T. Hoang. 2021. A crypto safe haven against Bitcoin. Finance Research Letters 38: 101431. [Google Scholar] [CrossRef]
  5. Binance. n.d. Available online: https://www.binance.com/en (accessed on 7 January 2022).
  6. CME Gold Futures and Options. n.d. Available online: https://www.cmegroup.com/markets/metals/precious/gold.html (accessed on 8 May 2021).
  7. CME Platinum Futures and Options. n.d. Available online: https://www.cmegroup.com/markets/metals/precious/platinum.html (accessed on 8 May 2021).
  8. Foster, Ernest Allen. 2002. Commodity Futures Price Prediction: An Artificial Intelligence Approach. Doctoral dissertation, University of Georgia, Athens, GA, USA. [Google Scholar]
  9. Goodfellow, Ian, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. 2014. Generative adversarial nets. Advances in Neural Information Processing Systems. 27. Available online: https://proceedings.neurips.cc/paper/2014/file/5ca3e9b122f61f8f06494c97b1afccf3-Paper.pdf (accessed on 8 May 2021).
  10. Gulrajani, Ishaan, Faruk Ahmed, Martin Arjovsky, Vincent Dumoulin, and Aaron Courville. 2017. Improved training of wasserstein gans. arXiv arXiv:1704.00028. [Google Scholar]
  11. Hong Kong Exchanges and Clearing Limited. n.d. Available online: https://www.hkex.com.hk/ (accessed on 8 May 2021).
  12. JPX Gold Futures and Options. n.d. Available online: https://www.jpx.co.jp/english/derivatives/products/precious-metals/gold-standard-futures/index.html (accessed on 8 May 2021).
  13. JPX Platinum Futures and Options. n.d. Available online: https://www.jpx.co.jp/english/derivatives/products/precious-metals/platinum-standard-futures/01.html (accessed on 8 May 2021).
  14. Kakushadze, Zura. 2016. 101 formulaic alphas. Wilmott 84: 72–81. [Google Scholar] [CrossRef]
  15. Kang, Sang Hoon, Ron McIver, and Seong-Min Yoon. 2017. Dynamic spillover effects among crude oil, precious metal, and agricultural commodity futures markets. Energy Economics 62: 19–32. [Google Scholar] [CrossRef]
  16. Kim, Harold Y., and Jianping P. Mei. 2001. What makes the stock market jump? An analysis of political risk on Hong Kong stock returns. Journal of International Money and Finance 20: 1003–16. [Google Scholar] [CrossRef]
  17. Kyriazis, Nikolaos A., Kalliopi Daskalou, Marios Arampatzis, Paraskevi Prassa, and Evangelia Papaioannou. 2019. Estimating the volatility of cryptocurrencies during bearish markets by employing GARCH models. Heliyon 5: e02239. [Google Scholar] [CrossRef] [PubMed]
  18. Lee, Seungho, Nabil El Meslmani, and Lorne N. Switzer. 2020. Pricing efficiency and arbitrage in the bitcoin spot and futures markets. Research in International Business and Finance 53: 101200. [Google Scholar] [CrossRef]
  19. Lezmi, Edmond, Jules Roche, Thierry Roncalli, and Jiali Xu. 2020. Improving the Robustness of Trading Strategy Backtesting with Boltzmann Machines and Generative Adversarial Networks. Available online: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3645473 (accessed on 8 May 2021).
  20. Li, Junyi, Xintong Wang, Yaoyang Lin, Arunesh Sinha, and Michael Wellman. 2020. Generating realistic stock market order streams. Paper presented at the AAAI Conference on Artificial Intelligence, Taipei, Taiwan, April 11–13; vol. 34, pp. 727–34. [Google Scholar]
  21. Mensi, Walid, Jose Arroeola Hernandez, Seong-Min Yoon, Xuan Vinh Vo, and Sang Hoon Kang. 2021. Spillovers and connectedness between major precious metals and major currency markets: The role of frequency factor. International Review of Financial Analysis 74: 101672. [Google Scholar] [CrossRef]
  22. Meyer, David R., and George Guernsey. 2017. Hong Kong and Singapore exchanges confront high frequency trading. Asia Pacific Business Review 23: 63–89. [Google Scholar] [CrossRef]
  23. Palamalai, Srinivasan, K. Krishna Kumar, and Bipasha Maity. 2021. Testing the random walk hypothesis for leading cryptocurrencies. Borsa Istanbul Review 21: 256–68. [Google Scholar] [CrossRef]
  24. Rosolia, Antonio, and Joerg Osterrieder. 2021. Analyzing Deep Generated Financial Time Series for Various Asset Classes. Available online: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3898792 (accessed on 8 May 2021).
  25. Samuel, Rikli, Bigler Daniel Nico, Pfenninger Moritz, and Osterrieder Joerg. 2021. Wasserstein GAN: Deep Generation applied on Bitcoins financial time series. arXiv arXiv:2107.06008. [Google Scholar]
  26. Smith, Leslie N. 2017. Cyclical learning rates for training neural networks. Paper presented at the 2017 IEEE Winter Conference on Applications of Computer Vision (WACV), Santa Rosa, CA, USA, March 24–31; pp. 464–72. [Google Scholar]
  27. Xu, Ke, Xinwei Zheng, Deng Pan, Li Xing, and Xuekui Zhang. 2020. Stock Market Openness and Market Quality: Evidence from the Shanghai–Hong Kong Stock Connect Program. Journal of Financial Research 43: 373–406. [Google Scholar] [CrossRef]
  28. Xu, Xiaoqing Eleanor, and Hung-Gay Fung. 2005. Cross-market linkages between US and Japanese precious metals futures trading. Journal of International Financial Markets, Institutions and Money 15: 107–24. [Google Scholar] [CrossRef]
  29. Yahoo Finance. n.d. Available online: https://help.yahoo.com/kb/SLN2311.html (accessed on 7 January 2022).
Figure 1. Given the original market prices as input, we trained the datasets using WGAN-GP and output the generated real and fake prices judged by the discriminators. The generator struggles to trick the Discriminator, while the Discriminator criticizes the generator until approaching equilibrium, keeping the training process as a zero-sum game in Algorithm 1.
Figure 1. Given the original market prices as input, we trained the datasets using WGAN-GP and output the generated real and fake prices judged by the discriminators. The generator struggles to trick the Discriminator, while the Discriminator criticizes the generator until approaching equilibrium, keeping the training process as a zero-sum game in Algorithm 1.
Jrfm 15 00026 g001
Figure 2. WuXi Biologics is a listed company on the Hong Kong Stock Exchange, one of HSI Composites. For a consecutive trading week, the prices at minute level intervals are plotted in six distributions (the total area under the curve integrates to one with each date as one distribution). The probability density (Y-axis) is the per unit on the prices (X-axis). There exist statistics properties like kurtosis and skewness, mean and standard deviations.
Figure 2. WuXi Biologics is a listed company on the Hong Kong Stock Exchange, one of HSI Composites. For a consecutive trading week, the prices at minute level intervals are plotted in six distributions (the total area under the curve integrates to one with each date as one distribution). The probability density (Y-axis) is the per unit on the prices (X-axis). There exist statistics properties like kurtosis and skewness, mean and standard deviations.
Jrfm 15 00026 g002
Figure 3. Generated real price at the minute interval (blue) and original market close prices (red) are plotted for 2269.HK. Starting from the first minute, the auction period will impact the following several trading minutes. The generated real prices are pretty close to the original input, as shown in tick movement.
Figure 3. Generated real price at the minute interval (blue) and original market close prices (red) are plotted for 2269.HK. Starting from the first minute, the auction period will impact the following several trading minutes. The generated real prices are pretty close to the original input, as shown in tick movement.
Jrfm 15 00026 g003
Figure 4. After mapping the price information by price, the generated prices (blue) are compared with one-minute market close prices (red).
Figure 4. After mapping the price information by price, the generated prices (blue) are compared with one-minute market close prices (red).
Jrfm 15 00026 g004
Figure 5. For the consecutive trading minutes from 19 October to 23 October 2021, we plotted the minutes trading level (X-axis) and minute interval close prices (color red), with the simulated/generated prices in other colours. The open market auction impacts the morning continuous trading session after 9:30 a.m. And starting from 3:30 p.m., there exists market impact caused by China Connect until market close.
Figure 5. For the consecutive trading minutes from 19 October to 23 October 2021, we plotted the minutes trading level (X-axis) and minute interval close prices (color red), with the simulated/generated prices in other colours. The open market auction impacts the morning continuous trading session after 9:30 a.m. And starting from 3:30 p.m., there exists market impact caused by China Connect until market close.
Jrfm 15 00026 g005
Figure 6. Platinum futures contract (PLE) 15 minutes interval has a larger MAE-R 140.385 than other contracts. Price is concentrated in a certain range and generated long-tailed prices can represent more abundant prices than the original prices.
Figure 6. Platinum futures contract (PLE) 15 minutes interval has a larger MAE-R 140.385 than other contracts. Price is concentrated in a certain range and generated long-tailed prices can represent more abundant prices than the original prices.
Jrfm 15 00026 g006
Figure 7. This graph shows the BTC one minute Interval Close prices and generated fake and real price data. BTC perpetual futures contracts are relatively volatile, with a relative large MAE of 72,840.8 compared with other perpetual contracts. The highest density from the original reaches 0.0006. The long tails from generated real and fake show the potential price volatility indicated by the original prices covering 40,000 to 48,000 USDT.
Figure 7. This graph shows the BTC one minute Interval Close prices and generated fake and real price data. BTC perpetual futures contracts are relatively volatile, with a relative large MAE of 72,840.8 compared with other perpetual contracts. The highest density from the original reaches 0.0006. The long tails from generated real and fake show the potential price volatility indicated by the original prices covering 40,000 to 48,000 USDT.
Jrfm 15 00026 g007
Figure 8. One of the implications can be backtesting execution algorithm parameters to optimize filling rates and portfolio positions. The left figure shows the simulated volume-weighted average price and time-weighted average price against original VWAP and TWAP. The spread gets narrow when trading continues until 1200 minutes. The prices are concentrated in a particular range, and WGAN-GP learns from the original prices and can even show the potential market uptrends.
Figure 8. One of the implications can be backtesting execution algorithm parameters to optimize filling rates and portfolio positions. The left figure shows the simulated volume-weighted average price and time-weighted average price against original VWAP and TWAP. The spread gets narrow when trading continues until 1200 minutes. The prices are concentrated in a particular range, and WGAN-GP learns from the original prices and can even show the potential market uptrends.
Jrfm 15 00026 g008
Table 1. Parameters settings for WGAN-GP, a combination of different parameter settings, can approach the optimal loss efficiently. We outlined the parameters for training considerations.
Table 1. Parameters settings for WGAN-GP, a combination of different parameter settings, can approach the optimal loss efficiently. We outlined the parameters for training considerations.
bs Batch Sizes
l r ̲ m i n lower bound on learning rate
l r ̲ m a x higher bound on learning rate
e p o c h s number of training iterations
n o i s e probability to add instance noise
Ccritic with parameters W c
Ggenerator with parameters W g
P o r i g i n a l distribution of training price data
P n o i s e distribution of sample noise
Table 2. We systematically examined the multiple asset classes, including shares (HSI Composite Stocks), futures (Gold, Platinum Futures on CME and JPX) and cryptos (Spot, Perpetual contracts). The data was purchased directly from the exchanges and was of the highest quality.
Table 2. We systematically examined the multiple asset classes, including shares (HSI Composite Stocks), futures (Gold, Platinum Futures on CME and JPX) and cryptos (Spot, Perpetual contracts). The data was purchased directly from the exchanges and was of the highest quality.
Asset ClassesInstrumentSymbol
Shares/ StocksHANG SENG INDEX Component Stocksxxxx.HK
FuturesGold, Platinum Futures on CME and JPXGCE, PLE, TPL, TGD
CryptosSpots, Perpetual contractsVarious products
Table 3. We listed the performance of our model by MAE-R, MSE-R, RMSE-R, and KS tests.HSI Composite stocks are grouped by tick.
Table 3. We listed the performance of our model by MAE-R, MSE-R, RMSE-R, and KS tests.HSI Composite stocks are grouped by tick.
HSI Composite 1 minMAE-RMSE-RRMSE-RKS REALKS FAKEKS R/F RatioTickMAE-R/ Tick
0003.HK0.0360.0070.0850.1000.1300.7690.20.18
2382.HK1.8784.9972.2350.0470.0391.2050.29.39
0388.HK2.2728.8782.9800.0180.0410.4390.211.36
0700.HK3.23116.8304.1020.0910.0821.1100.216.16
1211.HK6.61669.5638.3400.0360.1640.2200.233.08
0669.HK1.0991.9471.3950.0230.0430.5350.110.99
0011.HK1.6105.4632.3370.0560.0670.8360.116.10
2020.HK1.7064.5202.1260.0380.0500.7600.117.06
9988.HK1.7614.7102.1700.0200.0550.3640.117.61
2313.HK2.91213.9123.7300.0630.0840.7500.129.12
0012.HK0.0680.0080.0910.0420.0281.5000.051.36
1038.HK0.1080.0180.1360.0290.0720.4030.052.16
0175.HK0.1290.0290.1690.0410.0271.5190.052.58
1997.HK0.1300.0270.1640.0330.0450.7330.052.60
0017.HK0.1460.0360.1890.0260.0890.2920.052.92
0066.HK0.1730.0480.2190.0330.0550.6000.053.46
2388.HK0.1900.0680.2600.0350.0370.9460.053.80
1113.HK0.2050.0680.2610.1220.1171.0430.054.10
0001.HK0.2060.0770.2770.0250.0570.4390.054.12
0868.HK0.2240.0910.3010.0220.0550.4000.054.48
0823.HK0.2530.1020.3200.0610.0272.2590.055.06
1810.HK0.2790.1390.3730.0530.0860.6160.055.58
1299.HK0.2880.1340.3660.0510.0530.9620.055.76
0006.HK0.3340.1730.4160.0410.0430.9530.056.68
0960.HK0.3520.1820.4260.0320.0360.8890.057.04
1876.HK0.3720.2270.4760.0540.0471.1490.057.44
0002.HK0.4340.3360.5800.0510.0940.5430.058.68
2318.HK0.4590.4070.6380.0200.0770.2600.059.18
0016.HK0.4940.3830.6190.0370.0281.3210.059.88
6862.HK0.4980.4320.6570.0420.0480.8750.059.96
0941.HK0.6300.7070.8410.0620.0621.0000.0512.6
1044.HK0.6730.8070.8980.0320.0560.5710.0513.46
1109.HK0.7110.7920.8900.0370.0540.6850.0514.22
2018.HK0.8061.0331.0160.0470.0371.2700.0516.12
2319.HK0.9791.7251.3130.0560.0441.2730.0519.58
3968.HK1.0261.6741.2940.0370.0430.8600.0520.52
6098.HK1.0631.6801.2960.0500.0530.9430.0521.26
0027.HK1.2092.4321.5600.0320.0570.5610.0524.18
2331.HK1.3282.8571.6900.0600.0441.3640.0526.56
2628.HK0.1900.0600.2440.0490.0540.9070.029.5
0101.HK0.2200.0780.2790.0760.0850.8940.0211
0968.HK0.3320.1660.4080.0410.0490.8370.0216.6
1928.HK0.7541.0141.0010.0900.0851.0590.0237.7
0857.HK0.0280.0010.0350.0460.0331.3940.012.8
3988.HK0.0400.0020.0490.0470.0590.7970.014.0
0386.HK0.0490.0050.0730.0280.0430.6510.014.9
0267.HK0.0580.0060.0750.0310.0281.1070.015.8
1177.HK0.0690.0080.0900.0740.0760.9740.016.9
0288.HK0.0850.0120.1100.0350.0520.6730.018.5
0939.HK0.0870.0120.1120.0410.0440.9320.018.7
0883.HK0.1220.0260.1610.0590.0660.8940.0112.2
0241.HK0.1400.0330.1820.1100.1101.0000.0114.0
2007.HK0.1410.0310.1750.0460.0451.0220.0114.1
1093.HK0.1560.0400.2000.0390.0381.0260.0115.6
0762.HK0.2380.1170.3420.0420.0650.6460.0123.8
Table 4. We selected several typical stocks at different tick values and reported the performance of our model at one, two, three, four, five, ten and fifteen minute intervals. Tick values include 0.2, 0.1, 0.02, 0.05 and 0.01. 2269.HK-15 min in Table 4 shows highest MAE-R/ Tick in all minute intervals compared with other selected representatives by ticks.
Table 4. We selected several typical stocks at different tick values and reported the performance of our model at one, two, three, four, five, ten and fifteen minute intervals. Tick values include 0.2, 0.1, 0.02, 0.05 and 0.01. 2269.HK-15 min in Table 4 shows highest MAE-R/ Tick in all minute intervals compared with other selected representatives by ticks.
HSI-n minsMAE-RMSE-RRMSE-RKS REALKS FAKEKS R/F RatioTickMAE-R/ Tick
3690.HK-14.59733.2385.7650.0490.0590.8300.222.985
3690.HK-24.33330.1695.4930.0440.0351.2570.221.665
3690.HK-34.87236.8536.0710.0310.0620.5000.224.36
3690.HK-44.60233.6615.8020.0260.0590.4410.223.01
3690.HK-54.94337.8656.1530.0210.0790.2660.224.715
3690.HK-104.82336.6586.0550.0940.1030.9130.224.115
3690.HK-156.29653.3707.3050.0780.1180.6610.231.48
2269.HK-110.038192.7913.8850.0450.0840.5360.1100.38
2269.HK-213.358279.7116.7240.0460.0590.7800.1133.58
2269.HK-311.428228.26115.1080.0650.0800.8130.1114.28
2269.HK-412.908265.89816.3060.0300.0680.4410.1129.08
2269.HK-512.842270.44516.4450.0360.1250.2880.1128.42
2269.HK-1011.222238.63015.4480.0750.0920.8150.1112.22
2269.HK-1511.686256.31016.0100.0730.1290.5660.1116.86
0005.HK-10.4860.5210.7220.0470.1030.4560.059.72
0005.HK-20.3860.3020.5500.0710.0312.2900.057.72
0005.HK-30.3940.3620.6020.0530.0481.1040.057.88
0005.HK-40.4120.3150.5610.0480.0540.8890.058.24
0005.HK-50.3700.2690.5190.0510.0580.8790.057.4
0005.HK-100.3250.2080.4560.1040.0871.1950.056.5
0005.HK-150.3070.1700.4120.0580.0940.6170.056.14
0688.HK-10.1380.0310.1750.0570.0451.2670.026.9
0688.HK-20.1480.0350.1860.0690.1070.6450.027.4
0688.HK-30.1460.0360.1900.0180.1030.1750.027.3
0688.HK-40.1380.0330.1810.0730.0661.1060.026.9
0688.HK-50.1540.0380.1940.0750.0870.8620.027.7
0688.HK-100.1360.0310.1770.0650.1000.6500.026.8
0688.HK-150.1400.0350.1860.1460.1461.0000.027.0
1398.HK-10.0800.0110.1060.0520.0530.9810.018.0
1398.HK-20.0770.0100.1010.0430.0520.8270.017.7
1398.HK-30.0780.0100.1020.0540.0780.6920.017.8
1398.HK-40.0800.0110.1040.0840.1010.8320.018.0
1398.HK-50.0710.0090.0950.0730.1170.6240.017.1
1398.HK-100.0670.0080.0890.1050.1140.9210.016.7
1398.HK-150.0690.0080.0890.1290.1330.9700.016.9
Table 5. TGD-n mins (TOCOM gold) represent futures contracts listed in JPX at one, two, three, four, five, ten and fifteen minutes intervals. For KS R/F Ratio, all are smaller than one, where the highest KS REAL and FAKE are 0.077 and 0.144. Precious futures contract tick value is all one dollar.
Table 5. TGD-n mins (TOCOM gold) represent futures contracts listed in JPX at one, two, three, four, five, ten and fifteen minutes intervals. For KS R/F Ratio, all are smaller than one, where the highest KS REAL and FAKE are 0.077 and 0.144. Precious futures contract tick value is all one dollar.
Futures-n minsMAE-RMSE-RRMSE-RKS REALKS FAKEKS R/F RatioTickMAE-R/ Tick
TGD-113.213277.51316.6590.0400.0420.952113.213
TGD-214.126302.61017.3960.0360.0800.450114.126
TGD-313.508283.14616.8270.0530.1250.424113.508
TGD-414.306317.39417.8160.0260.0820.317114.306
TGD-512.653250.56915.8290.0100.1130.088112.653
TGD-1012.708245.90315.6810.0770.1440.535112.708
TGD-1513.979306.56316.2880.0400.0750.533113.979
Table 6. TPL-n mins (TOCOM platinum) represent futures contracts listed in JPX at one, two, three, four, five, ten and fifteen minutes intervals. For KS R/F Ratio, 2 out of 7 are bigger than one, where the highest KS REAL and FAKE are 0.138 and 0.143.
Table 6. TPL-n mins (TOCOM platinum) represent futures contracts listed in JPX at one, two, three, four, five, ten and fifteen minutes intervals. For KS R/F Ratio, 2 out of 7 are bigger than one, where the highest KS REAL and FAKE are 0.138 and 0.143.
Futures-n minsMAE-RMSE-RRMSE-RKS REALKS FAKEKS R/F RatioTickMAE-R/ Tick
TPL-138.3162505.30150.0530.0430.0421.023138.316
TPL-237.8852313.69648.1010.0780.0920.848137.885
TPL-341.8812715.71552.1130.0620.0611.016141.881
TPL-439.9172667.27851.6460.0480.0660.727139.917
TPL-543.6702886.63553.7270.0500.0540.926143.670
TPL-1036.2852239.77147.3260.0580.0830.699136.285
TPL-1535.5832080.62545.6140.1380.1430.965135.583
Table 7. PLE-n mins (platinum) represent futures contracts listed on CME at one, two, three, four, five, ten and fifteen minute intervals. Platinum futures have the highest MAE-R among all futures contracts. For KS R/F Ratio, two out of seven are bigger than one, where the highest KS REAL and FAKE are 0.193 and 0.188.
Table 7. PLE-n mins (platinum) represent futures contracts listed on CME at one, two, three, four, five, ten and fifteen minute intervals. Platinum futures have the highest MAE-R among all futures contracts. For KS R/F Ratio, two out of seven are bigger than one, where the highest KS REAL and FAKE are 0.193 and 0.188.
Futures-n minsMAE-RMSE-RRMSE-RKS REALKS FAKEKS R/F RatioTickMAE-R/ Tick
PLE-1122.82827,653.210166.290.0310.0430.7201122.828
PLE-2141.04033,276.476182.4180.0420.0510.8201141.040
PLE-3131.29629,980.058173.1480.0660.0830.7951131.296
PLE-4129.78929,907.256172.9370.1030.0941.0961129.789
PLE-5130.66030,125.549173.5670.0520.0670.7761130.660
PLE-10139.87533,091.181181.9100.0820.0870.9431139.875
PLE-15140.38530,666.385175.1180.1930.1881.0271140.385
Table 8. GCE-n mins (gold) represent futures contracts (CME) at intervals of one, two, three, four, five, ten, and fifteen. For KS R/F Ratio, all are smaller than one, where the highest KS REAL and FAKE are 0.058 and 0.145.
Table 8. GCE-n mins (gold) represent futures contracts (CME) at intervals of one, two, three, four, five, ten, and fifteen. For KS R/F Ratio, all are smaller than one, where the highest KS REAL and FAKE are 0.058 and 0.145.
Futures-n minsMAE-RMSE-RRMSE-RKS REALKS FAKEKS R/F RatioTickMAE-R/ Tick
GCE-159.1685860.14676.5520.0330.0720.458159.168
GCE-260.2535704.01975.5250.0470.1450.324160.253
GCE-361.6426015.12177.5570.0260.0650.400161.642
GCE-457.8645590.20874.7680.0300.0780.385157.864
GCE-560.4515992.21577.4090.0370.0770.481160.451
GCE-1062.6116352.79279.7040.0580.0690.841162.611
GCE-1566.6046838.20882.6930.0540.1100.491166.604
Table 9. We examined BTC spot prices against generated prices at intervals of one, two, three, four, five, ten and fifteen minutes. For the KS R/F Ratio, four out of seven are more significant than one, indicating hard to train, where the highest KS REAL and FAKE are 0.112 and 0.114.
Table 9. We examined BTC spot prices against generated prices at intervals of one, two, three, four, five, ten and fifteen minutes. For the KS R/F Ratio, four out of seven are more significant than one, indicating hard to train, where the highest KS REAL and FAKE are 0.112 and 0.114.
Spot/USDT-n minsMAE-RMSE-RRMSE-RKS REALKS FAKEKS R/F RatioTickMAE-R/ Tick
BTC-1751.285884,775.829940.6250.0770.0671.1490.0175,128.5
BTC-2809.1141,001,496.2571000.7480.0650.0790.8230.0180,911.4
BTC-3709.722741,981.902861.3840.0280.0610.4590.0170,972.2
BTC-4697.024770,976.836878.0530.0730.1140.6400.0169,702.4
BTC-5705.130754,617.954868.6870.0880.0561.5710.0170,513.0
BTC-10707.617768,399.041876.5840.1120.1031.0870.0170,761.7
BTC-15678.269712,963.929844.3720.0840.0611.3770.0167,826.9
Table 10. We examined ETH spot prices against generated prices at intervals of one, two, three, four, five, ten and fifteen minutes. For KS R/F Ratio, 2 out of 7 are bigger than one, where the highest KS REAL and FAKE are 0.094 and 0.186.
Table 10. We examined ETH spot prices against generated prices at intervals of one, two, three, four, five, ten and fifteen minutes. For KS R/F Ratio, 2 out of 7 are bigger than one, where the highest KS REAL and FAKE are 0.094 and 0.186.
Spot/USDT-n minsMAE-RMSE-RRMSE-RKS REALKS FAKEKS R/F RatioTickMAE-R/ Tick
ETH-194.73514,434.334120.1430.0450.0520.8650.019473.5
ETH-293.37514,331.716119.7150.0540.0521.0380.019337.5
ETH-382.29211,924.118109.1980.0450.0460.9780.018229.2
ETH-492.45913,608.065116.6540.0480.0550.8730.019245.9
ETH-597.98215,446.558124.2840.0540.0461.1740.019798.2
ETH-1085.67912,309.505110.9480.0480.0640.7500.018567.9
ETH-1573.36510,073.590100.3670.0940.1860.5050.017336.5
Table 11. We examined BNBUSDT spot prices against generated prices at one, two, three, four, five, ten and fifteen minute intervals. For the KS R/F Ratio, two out of seven are more significant than one, where the highest KS REAL and FAKE are 0.103 and 0.113.
Table 11. We examined BNBUSDT spot prices against generated prices at one, two, three, four, five, ten and fifteen minute intervals. For the KS R/F Ratio, two out of seven are more significant than one, where the highest KS REAL and FAKE are 0.103 and 0.113.
Spot/USDT-n minsMAE-RMSE-RRMSE-RKS REALKS FAKEKS R/F RatioTickMAE-R/ Tick
BNB-14.55234.2755.8550.0590.0441.3400.01455.2
BNB-24.77335.8675.9890.0180.0580.3100.01477.3
BNB-34.78439.8996.3170.0240.0970.2470.01478.4
BNB-44.28930.4865.5210.0590.0770.7660.01428.9
BNB-54.50733.4145.7800.0260.0780.3330.01450.7
BNB-104.47031.7585.6350.0850.1130.7520.01447.0
BNB-153.83624.5354.9530.1030.1021.0100.01383.6
Table 12. We examined ADAUSDT spot prices against generated prices at one, two, three, four, five, ten and fifteen minute intervals. For KS R/F Ratio, two out of seven are more significant than one, where the highest KS REAL and FAKE are 0.108 and 0.101.
Table 12. We examined ADAUSDT spot prices against generated prices at one, two, three, four, five, ten and fifteen minute intervals. For KS R/F Ratio, two out of seven are more significant than one, where the highest KS REAL and FAKE are 0.108 and 0.101.
Spot/USDT-n minsMAE-RMSE-RRMSE-RKS REALKS FAKEKS R/F RatioTickMAE-R/ Tick
ADA-10.0260000.0010960.0331060.0590.0441.3410.00126
ADA-20.0258170.0010300.0320900.0470.0381.2370.00125.817
ADA-30.0250940.0009970.0315750.0440.0510.8630.00125.094
ADA-40.0265270.0011030.0332130.0470.0530.8870.00126.527
ADA-50.0231260.0008490.0291420.0580.0700.8290.00123.126
ADA-100.0232200.0008440.0290590.0810.1010.8020.00123.220
ADA-150.0228290.0008420.0290110.1080.0891.2130.00122.829
Table 13. We examined SOLUSDT spot prices against generated prices at one, two, three, four, five, ten and fifteen minute intervals. For KS R/F Ratio, three out of seven are bigger than one, where the highest KS REAL and FAKE are 0.082 and 0.073.
Table 13. We examined SOLUSDT spot prices against generated prices at one, two, three, four, five, ten and fifteen minute intervals. For KS R/F Ratio, three out of seven are bigger than one, where the highest KS REAL and FAKE are 0.082 and 0.073.
Spot/USDT-n minsMAE-RMSE-RRMSE-RKS REALKS FAKEKS R/F RatioTickMAE-R/ Tick
SOL-14.27719429.3150605.4143380.0670.0441.5230.01427.7194
SOL-24.80901435.1771245.9310310.0280.0500.5600.01480.9014
SOL-34.65512334.6501825.8864410.0410.0640.6410.01465.5123
SOL-44.53975132.2061405.6750450.0420.0490.8570.01453.9751
SOL-54.34447929.5255255.4337390.0480.0590.8140.01434.4479
SOL-104.24180628.2861725.3184750.0710.0591.2030.01424.1806
SOL-153.88427025.6691285.0664710.0820.0731.1230.01388.4270
Table 14. We examined XRPUSDT spot prices against generated prices at one, two, three, four, five, ten and fifteen minute intervals. For KS R/F Ratio, two out of seven are more significant than one, where the highest KS REAL and FAKE are 0.092 and 0.124.
Table 14. We examined XRPUSDT spot prices against generated prices at one, two, three, four, five, ten and fifteen minute intervals. For KS R/F Ratio, two out of seven are more significant than one, where the highest KS REAL and FAKE are 0.092 and 0.124.
Spot/USDT-n minsMAE-RMSE-RRMSE-RKS REALKS FAKEKS R/F RatioTickMAE-R/ Tick
XRP-10.0213320.0007090.0266190.0710.0800.8880.012.1332
XRP-20.0257050.0009830.0313500.0540.0890.6070.012.5705
XRP-30.0245160.0010010.03163990.0380.0870.4370.012.4516
XRP-40.0225860.0008270.0287630.0790.0671.1790.012.2586
XRP-50.0232680.0008620.0293650.0630.1240.5080.012.3268
XRP-100.0218480.0007240.0269090.0870.0960.9060.012.1848
XRP-150.0211280.0007200.02683560.0920.0671.3730.012.1128
Table 15. We compared DOTUSDT spot prices against generated prices at intervals of one, two, three, four, five, ten, and fifteen minute intervals. DOTUSDT 15 minutes KS are the largest among all time intervals.
Table 15. We compared DOTUSDT spot prices against generated prices at intervals of one, two, three, four, five, ten, and fifteen minute intervals. DOTUSDT 15 minutes KS are the largest among all time intervals.
Spot/USDT-n minsMAE-RMSE-RRMSE-RKS REALKS FAKEKS R/F RatioTickMAE-R/ Tick
DOT-10.6682150.7953630.8918310.0560.0720.7770.0166.8215
DOT-20.6610140.7671410.8758660.0880.0861.0230.0166.1014
DOT-30.6389650.7827940.8847570.0580.0491.1840.0163.8965
DOT-40.6105410.7258110.8519450.0730.0990.7370.0161.0541
DOT-50.6034080.6523600.8076880.0460.0740.6220.0160.3408
DOT-100.6115930.7135140.8446980.0900.0511.7650.0161.1593
DOT-150.4966900.4684740.6844510.1780.1661.0720.0149.6690
Table 16. We compared BTCUSDT perpetual prices at multiple time intervals. BTCUSDT at one minute interval has the highest MAE-R scores. The smallest KS REAL and KS FAKE are 0.044, and 0.071. The highest KS REAL and KS FAKE are 0.113 and 0.192, respectively.
Table 16. We compared BTCUSDT perpetual prices at multiple time intervals. BTCUSDT at one minute interval has the highest MAE-R scores. The smallest KS REAL and KS FAKE are 0.044, and 0.071. The highest KS REAL and KS FAKE are 0.113 and 0.192, respectively.
Perpetual-n minsMAE-RMSE-RRMSE-RKS REALKS FAKEKS R/F RatioTickMAE-R/ Tick
BTC-1728.408824,327.849907.9250.0540.0820.6580.0172,840.8
BTC-2715.831775,010.148880.3470.0440.0740.6590.0171,583.1
BTC-3687.178732,522.649855.8750.0720.0730.9860.0168,717.8
BTC-4702.501760,323.665871.9650.1130.0961.1770.0170,250.1
BTC-5714.130788,127.987887.7660.0750.0711.0560.0171,413.0
BTC-10598.977571,480.481755.9630.0710.0711.0000.0159,897.7
BTC-15716.97612,672.582112.5730.0690.1920.3590.0171,697.6
Table 17. We compared ETHUSDT perpetual prices at multiple intervals. The smallest KS REAL and KS FAKE are 0.029, and 0.054. The highest KS REAL and KS FAKE are 0.085 and 0.219 respectively. ETHUSDT perpetual 15 min intervals, KS R/F Ratio is 0.388 where KS REAL is 0.085, indicating the generated prices are indeed close to original price inputs. Only ETHUSDT 5 min intervals generated FAKE outperform the generated REAL, the R/F Ratio is 1.130.
Table 17. We compared ETHUSDT perpetual prices at multiple intervals. The smallest KS REAL and KS FAKE are 0.029, and 0.054. The highest KS REAL and KS FAKE are 0.085 and 0.219 respectively. ETHUSDT perpetual 15 min intervals, KS R/F Ratio is 0.388 where KS REAL is 0.085, indicating the generated prices are indeed close to original price inputs. Only ETHUSDT 5 min intervals generated FAKE outperform the generated REAL, the R/F Ratio is 1.130.
Perpetual-n minsMAE-RMSE-RRMSE-RKS REALKS FAKEKS R/F RatioTickMAE-R/ Tick
ETH-193.70314,675.114121.1410.0380.0600.6330.019370.3
ETH-293.01313,799.069117.4690.0660.0770.8570.019301.3
ETH-385.09912,511.970111.8570.0290.0540.5370.018509.9
ETH-491.19312,672.582112.5730.0690.1920.3590.019119.3
ETH-594.47414,938.206122.2220.0610.0541.1300.019447.4
ETH-1083.12211,923.743109.1960.0580.0870.6670.018312.2
ETH-1584.01012,094.374109.9740.0850.2190.3880.018401.0
Table 18. We compared BNBUSDT perpetual futures at multiple intervals. Interestingly, BNB, ETH, BTC, ADA and XRP perpetual futures all show the highest KS FAKE score in 15 min intervals due to high volatility.
Table 18. We compared BNBUSDT perpetual futures at multiple intervals. Interestingly, BNB, ETH, BTC, ADA and XRP perpetual futures all show the highest KS FAKE score in 15 min intervals due to high volatility.
Perpetual-n minsMAE-RMSE-RRMSE-RKS REALKS FAKEKS R/F RatioTickMAE-R/ Tick
BNB-14.20231.2585.5910.0860.0990.8680.01420.2
BNB-24.33431.8095.6400.0490.0980.5000.01433.4
BNB-34.57133.4655.7850.0340.0670.5070.01457.1
BNB-44.84638.6276.2150.0510.0890.5730.01484.6
BNB-54.52834.4215.8670.0200.0470.4260.01452.8
BNB-104.37533.3825.7780.0780.0761.0260.01437.5
BNB-154.66035.6175.9680.1100.1081.0190.01466.0
Table 19. We compare ADAUSDT perpetual futures at multiple time intervals.
Table 19. We compare ADAUSDT perpetual futures at multiple time intervals.
Perpetual-n minsMAE-RMSE-RRMSE-RKS REALKS FAKEKS R/F RatioTickMAE-R/ Tick
ADA-10.0253160.0010640.0326160.0440.0460.9560.0001253.16
ADA-20.0237910.0009220.0303580.0240.0600.4000.0001237.91
ADA-30.0249220.0010120.0318130.0540.0521.0380.0001249.22
ADA-40.0235270.0008910.0298570.0690.1000.6900.0001235.27
ADA-50.0246230.001010.0317740.0670.0730.9180.0001246.23
ADA-100.0243150.0009400.0306620.0910.1030.8830.0001243.15
ADA-150.0231820.0009500.0308220.1130.1071.0560.0001231.82
Table 20. We compared XRPUSDT perpetual futures at multiple time intervals. XRP-3 has the largest MAE-R among all intervals.
Table 20. We compared XRPUSDT perpetual futures at multiple time intervals. XRP-3 has the largest MAE-R among all intervals.
Perpetual-n minsMAE-RMSE-RRMSE-RKS REALKS FAKEKS R/F RatioTickMAE-R/ Tick
XRP-10.0218060.0007810.0280720.0660.0740.8910.0001218.06
XRP-20.0211280.0007800.0279320.0500.0520.9620.0001211.28
XRP-30.0244600.0010670.0326610.0390.0241.6250.0001244.60
XRP-40.0223150.0007940.0281790.0730.1040.7020.0001223.15
XRP-50.0210520.0007140.0267240.0340.0730.4660.0001210.52
XRP-100.0203150.0006990.0264330.0670.0680.9850.0001203.15
XRP-150.0228980.0008500.0291570.0830.1070.7760.0001228.98
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Han, F.; Ma, X.; Zhang, J. Simulating Multi-Asset Classes Prices Using Wasserstein Generative Adversarial Network: A Study of Stocks, Futures and Cryptocurrency. J. Risk Financial Manag. 2022, 15, 26. https://doi.org/10.3390/jrfm15010026

AMA Style

Han F, Ma X, Zhang J. Simulating Multi-Asset Classes Prices Using Wasserstein Generative Adversarial Network: A Study of Stocks, Futures and Cryptocurrency. Journal of Risk and Financial Management. 2022; 15(1):26. https://doi.org/10.3390/jrfm15010026

Chicago/Turabian Style

Han, Feng, Xiaojuan Ma, and Jiheng Zhang. 2022. "Simulating Multi-Asset Classes Prices Using Wasserstein Generative Adversarial Network: A Study of Stocks, Futures and Cryptocurrency" Journal of Risk and Financial Management 15, no. 1: 26. https://doi.org/10.3390/jrfm15010026

APA Style

Han, F., Ma, X., & Zhang, J. (2022). Simulating Multi-Asset Classes Prices Using Wasserstein Generative Adversarial Network: A Study of Stocks, Futures and Cryptocurrency. Journal of Risk and Financial Management, 15(1), 26. https://doi.org/10.3390/jrfm15010026

Article Metrics

Back to TopTop