Stock Market Prediction on High-Frequency Data Using Generative Adversarial...

12
Research Article Stock Market Prediction on High-Frequency Data Using Generative Adversarial Nets Xingyu Zhou , 1 Zhisong Pan , 1 Guyu Hu , 1 Siqi Tang, 1 and Cheng Zhao 1,2 1 Army Engineering University of PLA, Nanjing 210007, China 2 Anhui Provincial Key Laboratory of Network and Information Security, Anhui Normal University, Wuhu 241003, China Correspondence should be addressed to Zhisong Pan; [email protected] Received 6 November 2017; Revised 21 January 2018; Accepted 13 February 2018; Published 15 April 2018 Academic Editor: Qian Zhang Copyright © 2018 Xingyu Zhou et al. is is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. Stock price prediction is an important issue in the financial world, as it contributes to the development of effective strategies for stock exchange transactions. In this paper, we propose a generic framework employing Long Short-Term Memory (LSTM) and convolutional neural network (CNN) for adversarial training to forecast high-frequency stock market. is model takes the publicly available index provided by trading soſtware as input to avoid complex financial theory research and difficult technical analysis, which provides the convenience for the ordinary trader of nonfinancial specialty. Our study simulates the trading mode of the actual trader and uses the method of rolling partition training set and testing set to analyze the effect of the model update cycle on the prediction performance. Extensive experiments show that our proposed approach can effectively improve stock price direction prediction accuracy and reduce forecast error. 1. Introduction Predicting stock prices is an important objective in the financial world [1–3], since a reasonably accurate prediction has the possibility to yield high financial benefits and hedge against market risks. With the rapid growth of Internet and computing technologies, the frequency for performing operations on the stock market had increased to fractions of seconds [4, 5]. Since year of 2009 the BM&F Bovespa (the Brazilian stock exchange) has worked in high-frequency, and the number of high-frequency operations has grown from 2.5% in 2009 to 36.5% in 2013. Aldridge and Krawciw [6] estimate that in 2016 high-frequency trading on average ini- tiated 10%–40% of trading volume in equities and 10%–15% of volume in foreign exchange and commodities. ese percentages suggest that the high-frequency stock market is a global trend. In most cases, the forecast results are assessed from two aspects: the first is forecast error (chiefly the RMSE (Root Mean Square Error) or RMSRE (Root Mean Square Relative Error)) between real price and forecast value; the second is direction prediction accuracy, which means the percentage of correct predictions of price series direction, as upward and downward movements are what really matters for decision- making. Even small improvements in predictive performance can be very profitable [7, 8]. However, predicting stock prices is not an easy work, due to the complexity and chaotic dynamics of the markets and the many nondecidable, nonstationary stochastic variables involved [9]. Many researchers from different areas have studied the historical patterns of financial time series and have proposed various methods for forecasting stock prices. In order to achieve promising performance, most of these ways require careful selection of input variables, establishing predictive model with professional financial knowledge, and adopting various statistical methods for arbitrage analysis, which makes it difficult for people outside the financial field to use these methods to predict stock prices [10–12]. Generative adversarial network (GAN) was introduced by Goodfellow et al. [13], where images patches are generated from random noise using two networks trained simultane- ously. Specifically, in GAN a discriminative net learns to distinguish whether a given data instance is real or not, and a generative net learns to confuse by generating high quality data. Although this approach has been successful and applied to a wide range of fields, such as image inpainting, Hindawi Mathematical Problems in Engineering Volume 2018, Article ID 4907423, 11 pages https://doi.org/10.1155/2018/4907423

Transcript of Stock Market Prediction on High-Frequency Data Using Generative Adversarial...

Page 1: Stock Market Prediction on High-Frequency Data Using Generative Adversarial Netsdownloads.hindawi.com/journals/mpe/2018/4907423.pdf · 2018-11-12 · ResearchArticle Stock Market

Research ArticleStock Market Prediction on High-Frequency Data UsingGenerative Adversarial Nets

Xingyu Zhou 1 Zhisong Pan 1 Guyu Hu 1 Siqi Tang1 and Cheng Zhao12

1Army Engineering University of PLA Nanjing 210007 China2Anhui Provincial Key Laboratory of Network and Information Security Anhui Normal University Wuhu 241003 China

Correspondence should be addressed to Zhisong Pan hotpzshotmailcom

Received 6 November 2017 Revised 21 January 2018 Accepted 13 February 2018 Published 15 April 2018

Academic Editor Qian Zhang

Copyright copy 2018 Xingyu Zhou et al This is an open access article distributed under the Creative Commons Attribution Licensewhich permits unrestricted use distribution and reproduction in any medium provided the original work is properly cited

Stock price prediction is an important issue in the financial world as it contributes to the development of effective strategies forstock exchange transactions In this paper we propose a generic framework employing Long Short-Term Memory (LSTM) andconvolutional neural network (CNN) for adversarial training to forecast high-frequency stockmarketThismodel takes the publiclyavailable index provided by trading software as input to avoid complex financial theory research and difficult technical analysiswhich provides the convenience for the ordinary trader of nonfinancial specialty Our study simulates the trading mode of theactual trader and uses the method of rolling partition training set and testing set to analyze the effect of the model update cycle onthe prediction performance Extensive experiments show that our proposed approach can effectively improve stock price directionprediction accuracy and reduce forecast error

1 Introduction

Predicting stock prices is an important objective in thefinancial world [1ndash3] since a reasonably accurate predictionhas the possibility to yield high financial benefits and hedgeagainst market risks With the rapid growth of Internetand computing technologies the frequency for performingoperations on the stock market had increased to fractions ofseconds [4 5] Since year of 2009 the BMampF Bovespa (theBrazilian stock exchange) has worked in high-frequency andthe number of high-frequency operations has grown from25 in 2009 to 365 in 2013 Aldridge and Krawciw [6]estimate that in 2016 high-frequency trading on average ini-tiated 10ndash40 of trading volume in equities and 10ndash15of volume in foreign exchange and commodities Thesepercentages suggest that the high-frequency stock market isa global trend

In most cases the forecast results are assessed from twoaspects the first is forecast error (chiefly the RMSE (RootMean Square Error) or RMSRE (Root Mean Square RelativeError)) between real price and forecast value the second isdirection prediction accuracy which means the percentageof correct predictions of price series direction as upward and

downward movements are what really matters for decision-making Even small improvements in predictive performancecan be very profitable [7 8]

However predicting stock prices is not an easy work dueto the complexity and chaotic dynamics of the markets andthe many nondecidable nonstationary stochastic variablesinvolved [9] Many researchers from different areas havestudied the historical patterns of financial time series andhave proposed various methods for forecasting stock pricesIn order to achieve promising performance most of theseways require careful selection of input variables establishingpredictive model with professional financial knowledge andadopting various statistical methods for arbitrage analysiswhich makes it difficult for people outside the financial fieldto use these methods to predict stock prices [10ndash12]

Generative adversarial network (GAN) was introducedby Goodfellow et al [13] where images patches are generatedfrom random noise using two networks trained simultane-ously Specifically in GAN a discriminative net 119863 learns todistinguish whether a given data instance is real or not anda generative net 119866 learns to confuse 119863 by generating highquality data Although this approach has been successful andapplied to a wide range of fields such as image inpainting

HindawiMathematical Problems in EngineeringVolume 2018 Article ID 4907423 11 pageshttpsdoiorg10115520184907423

2 Mathematical Problems in Engineering

semantic segmentation and video prediction [14ndash16] as faras we know it has not been used for stock forecasting

This work uses basic technical index data as an inputvariable which can be acquired directly from trading soft-ware so that people outside the financial field can predictstock price through our method easily This study introducesforecast error loss and direction prediction loss and showsthat generative adversarial training [13] may be successfullyemployed for combining these losses to produce satisfyingpredict results and we call this prediction architecture GAN-FD (GAN for minimizing forecast error loss and directionprediction loss) For the purpose of conforming to thepractice of actual transactions this work carries out rollingsegmentation on training set and testing set of the raw dataand we will illustrate it in detail in the experimental section

Overall our main contributions are twofold (1) weadapted generative adversarial network for the purpose ofprice prediction which constitutes to our knowledge thefirst application of adversarial training to stock market andextensive experiments show that our prediction model canachieve remarkable results and (2) we carry out rollingsegmentation on training set and testing set of the raw data toinvestigate the effect the of model parameter update cycle onthe stock forecast performance and the experimental resultsshow that smaller model update cycle can advance predictionperformance

In the remainder of this paper we begin with a reviewof the literature on which algorithms have been used for thefinancial market prediction Then we formulate the problemand propose our general adversarial network frameworkFurthermore in the experiments section we presented theexperimental analysis with the proposed model as well as acomparison between the obtained results with those given byclassical prediction models Finally conclusions and possibleextensions are discussed

2 Related Work

This section introduce the relatedwork from the stockmarketprediction method and the generative adversarial network

21 Stock Market Prediction Method According to the re-search developed in this field we can classify the techniquesused to solve the stock market prediction problems totwofold

The first category of related work is econometric modelswhich includes classical econometric models for forecastingCommon methods are the autoregressive method (AR) themoving average model (MA) the autoregressive movingaverage model (ARMA) and the autoregressive integratedmoving average (ARIMA) [17ndash19] Roughly speaking thesemodels take each new signal as a noisy linear combination ofthe last few signals and independent noise terms Howevermost of them rely on some strong assumptions with respectto the noise terms (such as iid assumption 119905-distribution)and loss functions while real financial data may not fullysatisfy these assumptions By introducing a generalizedautoregressive conditional heteroscedastic (GARCH) model

for conditional variances Pellegrini et al [20] apply ARIMA-GARCHmodel to the prediction of financial time series

The second category involves soft computing based mod-els Soft computing is a term that covers artificial intelligencewhich mimics biological processes These techniques includeartificial neural networks (ANN) [21 22] fuzzy logic (FL)[23] support vectormachines (SVM) [24 25] particle swarmoptimization (PSO) [26] and many others Many authorshave tried to deal with fuzziness along with randomness inoption pricing models [27 28] Carlsson and Fuller [29] werethe first to study the fuzzy real options and Thavaneswaranet al [30] demonstrated the superiority of the fuzzy fore-casts and then derived the membership function for theEuropean call price by fuzzifying the interest rate volatilityand the initial value of the stock price Recently there hasbeen a resurgence of interest in deep learning whose basicstructure is best described as a multilayer neural network[31] Some literatures have established various models basedon deep neural networks to improve the prediction abilityof high-frequency financial time series [32 33] The abilityof deep neural networks to extract abstract features fromdata is also attractive Chong et al [12] applied a deepfeature learning-based stockmarket predictionmodel whichextract information from the stock return time series withoutrelying on prior knowledge of the predictors and testedit on high-frequency data from the Korean stock marketChen et al [34] proposed a double-layer neural network forhigh-frequency forecasting with links specially designed tocapture dependence structures among stock returns withindifferent business sectors There also exist a few studiesthat apply deep learning to identification of the relationshipbetween past news events and stock market movements [35ndash37]

However to our knowledge most of these methodsrequire expertise to impose specific restrictions on the inputvariables such as combining related stocks together as entrydata [12] inputting different index data to different layersof the deep neural network [34] and converting news textinto structured representation as input [36] In contrast ourproposed forecasting model directly uses the data providedby the trading software as input which reduce the barrier forordinary investors

22 Generative Adversarial Network Generative adversarialnetwork (GAN) is a framework for estimating generativemodels via an adversarial process in which we simultane-ously train twomodels a generativemodel119866 that captures thedata distribution and a discriminativemodel119863 that estimatesthe probability that a sample came from the training datarather than 119866 The training procedure for 119866 is to maximizethe probability of 119863 making a mistake This frameworkcorresponds to a minimax two-player game In the space ofarbitrary functions 119866 and D a unique solution exists with119866 recovering the training data distribution and 119863 equal to05 everywhere [13] While119866 and119863 are defined bymultilayerperceptrons in [13] most researches recently constructed 119866and 119863 on the basis of Long Short-Term Memory (LSTM)[38] or convolutional neural network (CNN) [39] for a largevariety of application

Mathematical Problems in Engineering 3

XG

Y Y

YX1 X2 XT

LSTMinternalunit

LSTMinternalunit

LSTMinternalunit

Y1 Y2 YTYT+1

Y1 Y2 YTY1 Y2 YT YT+1

D

Inputsequence

ConvConv Conv FC

FCReal

Predicted

Figure 1 GAN-FD architectureThe generator (119866) is founded on LSTM which applies to predicting 119879+1 The discriminator (119863) is based onCNN for the purpose of estimating the probability whether a sequence is real (Y) or being predicted (Y) Conv means convolutional layerFC is an abbreviation for fully connected layer The structure of 119866 and119863 can be adjusted according to the specific application

LSTM is a basic deep learning model and capable oflearning long-term dependencies A LSTM internal unit iscomposed of a cell an input gate an output gate and aforget gate LSTM internal units have hidden state augmentedwith nonlinear mechanisms to allow state to propagatewithout modification be updated or be reset using simplelearned gating functions LSTM work tremendously well onvarious problems such as natural language text compressionhandwriting recognition and electric load forecasting

CNN is a class of deep feed-forward artificial neural net-works that has successfully been applied to analyzing visualimagery A CNN consists of an input layer and an outputlayer as well as multiple hidden layers The hidden layers of aCNN typically consist of convolutional layers pooling layersfully connected layers and normalization layers CNN alsohas many applications such as image and video recognitionrecommender systems and natural language processing

Although there are a lot of literatures forecast stock priceby using LSTM model to the best of our knowledge thispaper is the first to adopt GAN to predict stock pricesThe experimental part (Section 42) compares the predictionperformances between GAN-FC and LSTM

3 Forecasting with High-Frequency Data

In this section we illuminate the details of the generativeadversarial network framework for stock market forecastingwith high-frequency data

31 Problem Statement Under the high-frequency tradingenvironment high-quality one-step forecasting is usuallyof great concern to algorithmic traders providing signifi-cant information to market makers for risk assessment andmanagement In this article we aim to forecast the pricemovement of individual stocks or the market index one stepahead based solely on their historical price information Ourproblem can be mathematically formalized as follows

Let X119905 represent a set of basic indicators and 119884119905 denotethe closing price of one stock for a 1-minute interval attime 119905 (119905 = 1 2 119879) where 119879 is the maximum lagof time Given the historical basic indicators informationX (X = X1X2 X119879) and the past closing price Y (Y =1198841 1198842 119884119879) our goal is to predict the closing price 119884119879+1for the next 1-minute time interval There are literatures thatexamined the effects of different119879 [7 12 40] but in thiswork

we just set 119879 to 242 because each trading day contains 242-minute intervals in the China stock exchanges

32 Prediction Model The deep architecture of the proposedGAN-FD model is illustrated as in Figure 1 Since the stockdata is a typical time series we choose LSTM model whichis widely applied to time series prediction as the generativemodel 119866 to predict output 119879+1 based on the input data Xthat is

119879+1 = 119866 (X) (1)

The discriminative model 119863 is based on the CNNarchitecture and performs convolution operations on theone-dimensional input sequence in order to estimate theprobability whether a sequence comes from the dataset (Y =1198841 1198842 119884119879 119884119879+1) or being produced by a generativemodel 119866 (Y = 1198841 1198842 119884119879 119879+1)

Our main intuition on why to use an adversarial lossis that it can simulate the operating habits of financialtraders An experienced trader usually predicts stock pricethrough the available indicator data which is the work of thegenerative model 119866 and then judges the correct probabilityof his own forecast with the previous stock price as thediscriminative model119863 does

It is noteworthy that the structure of 119866 and 119863 in GAN-FD can be adjusted according to specific application andthe experimental part in this paper just proposed simple 119866and 119863 framework (Section 42) for stock prediction It isreasonable to believe that fine-tuning the structure of 119866 and119863 can improve the predictive performance

33 Adversarial Training The training of the pair (119866 119863)consists of two alternated steps described below For the sakeof clarity we assume that we use pure SGD (minibatches ofsize 1) but there is no difficulty to generalize the algorithmto minibatches of size 119870 by summing the losses over thesamples

Training 119866 (let (XY) be a sample from the dataset) In ordertomake the discriminativemodel119863 as ldquoconfusedrdquo as possiblethe generative model 119866 should reduce the adversarial loss inthe sense that119863will not discriminate the prediction correctlyClassifying Y into class 1 and Y into class 0 the adversarialloss for 119866 is

119871119866adv (Y) = 119871 sce (119863 (Y) 1) (2)

4 Mathematical Problems in Engineering

where 119871 sce is the sigmoid cross-entropy loss defined as

119871 sce (AB) = minussum119894

119861119894 log (sigmoid (119860 119894))+ (1 minus 119861119894) log (1 minus sigmoid (119860 119894))

(3)

However in practice minimizing adversarial loss alonecannot guarantee satisfying predictions Imagine that119866 couldgenerate samples to ldquoconfuserdquo119863 without being close to 119879+1and then119863will learn to discriminate these samples leading119866to generate other ldquoconfusingrdquo samples and so on To addressthis problem the generative model 119866 ought to decrease theforecast error loss that is 119871119901 loss

119871119901 (Y Y) = 10038171003817100381710038171003817Y minus Y10038171003817100381710038171003817119901 (4)

where 119901 = 1 or 119901 = 2Furthermore as mentioned above stock price direction

prediction is crucial to trading so we define direction pre-diction loss function 119871dpl

119871dpl (Y Y) = 10038161003816100381610038161003816sgn (119879+1 minus 119884119879) minus sgn (119884119879+1 minus 119884119879)10038161003816100381610038161003816 (5)

where sgn represents sign functionCombining all these losses previously defined with differ-

ent parameters 120582adv 120582119901 and 120582dpl we achieve the final loss on119866119871119866 (XY) = 120582adv119871119866adv (Y) + 120582119901119871119901 (Y Y)

+ 120582dpl119871dpl (Y Y) (6)

Then we perform one SGD iteration on 119866 to minimize119871119866(XY) while keeping the weights of119863 fixed

Training 119863 (let (XY) be a different data sample) Since therole of 119863 is just to determine whether the input sequence isY or Y the target loss is equal to the adversarial loss on DWhile keeping the weights of 119866 fixed we perform one SGDstep on119863 to minimize the target loss

119871119863 (XY) = 119871119863adv (Y Y)= 119871 sce (119863 (Y) 0) + 119871 sce (119863 (Y) 1) (7)

We train the generator and discriminator iteratively Theentire process is summarized in Algorithm 1 withminibatch-es of size 119870

(1) Set the learning rates 120588119863 and 120588119866 and parameters120582adv 120582119901 120582dpl(2) Initialize weights119882119863 and119882119866(3) while not converged do(4) Update the generator 119866(5) Get 119870 new data samples (X(1) Y(1)) (X(2)

Y(2)) (X(119870) Y(119870))(6) 119882119866 = 119882119866 minus 120588119866 119870sum

119894

120597119871119866(X(119894)Y(119894))120597119882119866(7) Update the discriminator 119863(8) Get 119870 new data samples (X(1) Y(1)) (X(2)

Y(2)) (X(119870) Y(119870))(9) 119882119863 = 119882119863 minus 120588119863 119870sum

119894

120597119871119863(X(119894)Y(119894))120597119882119863(10) end while

Algorithm 1 Training GAN-FD

4 Experiments

41 Dataset Next we evaluate the performance of the pro-posed method based on the China stock market rangingfrom January 1 2016 to December 31 2016 There are totally244 trading days and each day contains 242-minute intervalscorresponding to 59048 time points These stocks selectedfor the experiment should conform to three criteria firstthey should be the constituent stock of 119862119878119868 300 (the CSI300 is a capitalization-weighted stock market index designedto replicate the performance of 300 stocks traded in theShanghai and Shenzhen stock exchanges) second they werenot suspended during the period we just mentioned in caseaccidental events bring about significant impact on their priceand affect forecast results third their closing prices in thestart time that is January 1 2016 are above 30 to ensurethe volatility for high-frequency exchange This leaves 42stocks in the sample which are listed in Table 1 The numberof increasing directions and decreasing directions for eachstockrsquos closing price per minute is also shown in Table 1 andtheir numbers are relatively close The historical data wasobtained from the Wind Financial Terminal produced byWind Information Inc (the Wind Financial Terminal can bedownloaded from httpwwwwindcomcn)

Many fund managers and investors in the stock marketgenerally accept and use certain criteria for technical indi-cators as the signal of future market trends [12 41] Thiswork selects 13 technical indicators as feature subsets bythe review of domain experts and prior researches that isthe input data X at each moment (eg X119879) consists of 13basic indicators that can be obtained directly from almost alltrading software These basic indicators are listed in Table 2and their parameters are using the default value of the WindFinancial Terminal As mentioned above Y is defined as theclosing price at each moment

Most of the related articles use the traditional datapartitioning method that is the entire dataset is directly splitinto training set and testing set [12 22 40 42] However

Mathematical Problems in Engineering 5

Table 1 The sample stocks and their number of increasing direc-tions and decreasing directions

ID Stock code Increase Decrease1 000156SZ 28927 301202 000432SZ 28879 301683 000783SZ 28310 307374 000938SZ 28537 305105 000963SZ 29192 298556 002007SZ 28933 301147 002027SZ 28623 304248 002153SZ 28566 304819 002183SZ 28795 3025210 002195SZ 28861 3018611 002241SZ 29084 2996312 002241SZ 28737 3031013 002252SZ 28696 3035114 002292SZ 28385 3066215 002304SZ 28914 3013316 002415SZ 29036 3001117 002456SZ 28671 3037618 002475SZ 28837 3021019 002594SZ 28525 3052220 300017SZ 28528 3051921 300024SZ 28411 3063622 300072SZ 28884 3016323 300124SZ 28632 3041524 300146SZ 29137 2991025 600038SH 28428 3061926 600085SH 28856 3019127 600118SH 28456 3059128 600150SH 28537 3051029 600332SH 29174 2987330 600340SH 28773 3027431 600519SH 29118 2992932 600535SH 29013 3003433 600570SH 28053 3099434 600588SH 28483 3056435 600685SH 28627 3042036 600718SH 28881 3016637 600754SH 28307 3074038 600783SH 28680 3036739 601318SH 28979 3006840 601336SH 28643 3040441 601888SH 28919 3012842 603885SH 28817 30230

the trading style of the stock market changes frequentlyfor example investors sometimes prefer stocks with highvolatility and sometimes tend to invest in technology stocksTherefore we should update the model parameters regularlyto adapt to the change of market style In order to makeexperiments closer to real transactions we carry out rolling

Table 2 Basic indicators for prediction

IndicatorsOpening priceMaximum priceMinimum priceTrading volumeTurnoverBiasBollinger bandsDirectional movement indexExponential moving averagesStochastic indexMoving averagesMACDRelative strength index

Dataset

M

M

M

N

N

N

Figure 2 Rolling segmentation on training set and testing set Thegreen bar represents the entire dataset the blue bar represents thetraining set for a round experiment and the yellow bar representsthe corresponding testing set

segmentation on training set and testing set of the experi-mental data As Figure 2 shows in the beginning we selectthe first119872 days as training set and the next119873 days play therole of testing set After the first round of experiments weroll forward the time window for 119873 days that is choosingthe (119873+1)th day to the (119872+119873)th day as training set and the(119872+119873+1)th day to the (119872+2119873)th day as testing set Repeatuntil all the data has been experimented In other words this119873 can be regarded as the model update cycle and119872 is thesize of the corresponding training data

42 Network Architecture Given that the LSTM generatortakes on the role of prediction and requires more accuratecalculations of values than the CNN discriminator we set thelearning rate 120588119866 to 00004 and 120588119863 to 002 The LSTM cell in119866 contains 121 internal (hidden) units and the parametersare initialized following the normal distribution N(0 1)The architecture of discriminative model 119863 is presented inTable 3 We train GAN-FD with 119901 = 2 weighted by 120582adv =120582119901 = 120582dpl = 143 Benchmark Methods To evaluate the performance ofour proposed method we include three baseline meth-ods for comparison The first model is ARIMA (1 1 1)-GARCH(1 1) a fitted ARIMA model that forecasts future

6 Mathematical Problems in Engineering

Table 3 Network architecture of discriminative model 119863Layer ConfigurationConvolution 1 Filter 32 times 4 times 1 strides 2 LReLUConvolution 2 Filter 64 times 4 times 1 strides 2 LReLU BNConvolution 3 Filter 128 times 4 times 1 strides 2 LReLU BNFC 1 128 leaky ReLUFC 2 2 sigmoidOptimizer SGD batch size 121 iterations 10000 LReLU slope 001

Table 4 Summary of RMSRE with different (M N) These figures are the average values over the 42 stocks

119873 = 5 119873 = 10 119873 = 20119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60ARIMA-GARCH 00419 00406 00425 00529 00529 00516 00733 00657 00739ANN 00419 00485 00531 00522 00522 00510 00739 00631 00631SVM 00512 00450 00487 00539 00507 00527 00616 00666 00639GAN-F 00151 00155 00157 00300 00243 00277 00326 00313 00299GAN-D 00422 00304 00503 00625 00419 00405 00514 00598 00420LSTM-FD 00200 00194 00180 00324 00230 00245 00321 00335 00357GAN-FD 00098 00079 00101 00218 00111 00144 00333 00323 00296

values of stock time series and the GARCH model forecastsfuture volatilities [20] The second one is artificial neuralnetworks (ANN) The parameter optimization method andmodel architectural is setting as in [21] except that the inputlayer node is changed to 13 and the network outputs thepredicted value instead of two patterns (0 or 1)The third oneis support vectormachines (SVM)AnRBF kernel is used andthe parameter is setting as in [25]

We also inspect our GAN-FD model from several waysThe GAN-F model is using a GAN architectural for mini-mizing forecast error loss with 120582adv = 120582119901 = 1 and 120582dpl= 0 The GAN-D model is using a GAN architectural forminimizing direction prediction loss with 120582adv = 120582dpl = 1and 120582119901 = 0 The LSTM-FD model is a LSTM model aimingat minimizing forecast error loss and direction predictionloss with 121 internal units in LSTM Obviously the maindifference between LSTM-FD and GAN-FD is the presenceof adversarial training

44 Evaluation Metrics For each stock at each time 119905 aprediction is made for the next time point 119905 + 1 based ona specific method Assume the total number of time pointsbeing tested is 1198790 we used the following criteria to evaluatethe performance of different models

(1) Root Mean Squared Relative Error (RMSRE)

RMSRE = radic 111987901198790sum119905=1

(119905+1 minus 119884119905+1119884119905+1 )2 (8)

RMSRE is employed as an indicator for the predictive poweror prediction agreement A low RMSRE indicates that theprediction agreeswith the real data (the reasonwhy this paperuses RMSRE instead of RMSE is that RMSRE facilitates auniform comparison of the results of 42 stocks)

(2) Direction Prediction Accuracy (DPA)

DPA = 10011987901198790sum119905=1

119868119905 (9)

where

119868119905 = 1 if (119884119905+1 minus 119884119905) (119905+1 minus 119884119905) gt 00 otherwise

(10)

DPA measures the percentage of accuracy relating to theseries trend A high DPA promises more winning trades

45 Results In order to investigate the effect of the modelupdate cycle on the predictive performance let119872 isin 10 2060 and 119873 isin 5 10 20 In China stock exchange market5 10 20 60 days represent one week two weeks onemonth and one quarter

Tables 4 and 5 show the average values of RMSRE andDPAwith different (119872119873)The numbers clearly indicate thatGAN-FD and its related methods perform better than threebaseline methods in terms of RMSRE and DPAThis targetedmethod GAN-F brings some improvement in RMSRE butit does not outperform three baseline methods in DPAContrary to GAN-F GAN-D achieves better results in DPAbut failed in RMSRE LSTM-FD improves the results sinceit combines forecast error loss with direction prediction lossfor training Finally the combination of the forecast error lossdirection prediction loss and adversarial training that isGAN-FD achieves the best RMSRE and DPA in the majorityof scenarios

Let us take a look at the effects of different (M N) on theexperiment GAN-FD obtains the maximum average DPA(06956) and the minimum average RMSRE (00079) when

Mathematical Problems in Engineering 7

Table 5 Summary of DPA with different (M N) These figures are the average values over the 42 stocks

119873 = 5 119873 = 10 119873 = 20119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60ARIMA-GARCH 05464 05479 05264 05280 05315 05245 05007 05214 05296ANN 05456 05978 05738 05473 05629 05575 05205 05280 05394SVM 05715 05490 05839 05377 05514 05576 05147 05144 05318GAN-F 05347 05507 05281 04930 05115 05265 04880 05008 05116GAN-D 06220 06399 06409 06117 06245 06437 05217 05517 05498LSTM-FD 06340 06506 06509 06124 06236 06256 05546 05635 05719GAN-FD 06761 06956 06793 06233 06651 06687 05535 05583 05753

Table 6 The number of times about the minimum RMSRE

119873 = 5 119873 = 10 119873 = 20119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60ARIMA-GARCH 0 0 0 0 0 0 0 0 0ANN 0 0 0 0 0 0 0 0 0SVM 0 0 0 0 0 0 0 0 0GAN-F 11 2 4 6 6 4 13 18 11GAN-D 0 0 0 0 0 0 2 0 7LSTM-FD 0 0 5 6 3 3 16 10 5GAN-FD 31 40 33 30 33 35 11 14 19

Table 7 The number of times about the maximum DPA

119873 = 5 119873 = 10 119873 = 20119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60ARIMA-GARCH 0 0 0 0 0 0 0 6 5ANN 0 0 0 0 0 0 2 0 3SVM 0 0 0 0 0 0 3 1 1GAN-F 0 0 0 0 0 0 0 0 0GAN-D 0 1 6 5 1 7 2 6 2LSTM-FD 1 3 4 11 4 0 18 15 12GAN-FD 41 38 32 26 37 35 17 14 19

(M N) is (20 5) It is interesting to note that all thesemethods work better when 119873 is 5 than when 119873 is 10 or 20with smaller RMSRE and higher DPA This implies that veryshort-term trends are best for predicting the next minutersquosprice Therefore a shorter model update cycle (eg 119873 is 5)is preferred On the other hand for the same 119873 different119872 will bring about some changes to the prediction resultsFrom the experimental results we suggest that119872 should takethe value greater than 119873 This makes intuitive sense If thetraining sample is inadequate it would fail to train themodelespecially in the volatile stockmarketsWe should also noticethat when the training set is small while the testing set islarge (ie (M N) is (10 20)) most of these methods performthe worst and the DPA of these methods are no better thanrandom guessing (ie 50)

Table 6 shows the number of times for each methodto achieve the minimum RMSRE over the 42 stocks It isnoticeable that the results of these three baseline methods areall zero GAN-FDwith its related methods is obviously betterthan these three baseline methods in RMSRE Meanwhile

GAN-FD obtains the minimum RMSRE 246 times account-ing for 6508 in these 378 scenarios (42 stocks and 9 groups(M N)) The best performance appeared when (M N) is (205) with 40 stocksrsquo minimumRMSRE coming fromGAN-FD

Table 7 shows the number of times for each method toachieve the maximum DPA over the 42 stocks Comparedwith the other six methods GAN-FD achieves the maximumDPA 269 times accounting for 7116 in all scenarios When(M N) is (10 5) the maximum DPA of 41 stocks in all 42stocks comes from GAN-FD Even when (M N) is (20 20)that is the worst performance of GAN-FD cases GAN-FDstill obtains maximum DPA in 14 stocks From the aboveanalyses the performance of the GAN-FD is significantlybetter than the other six ways

The results of each representation are reported in Figures3ndash11 We just focus on GAN-FD As shown in Figures 3ndash5the DPA of GAN-FD ranges around 6459ndash7224 when119873is 5 and it slumps to 5201ndash6271 when 119873 is 20 whichis presented in Figures 9ndash11 When 119873 is 5 the RMSRE ofGAN-FD over the 42 stocks varies between 048 and 149

8 Mathematical Problems in Engineering

0 0010203040506070809

DPA

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

00100200300400500600700800901

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 3 DPA and RMSRE of each stock when (M N) is (10 5) and 119909-axis represents the stock ID

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

0

01

02

03

04

05

06

07

08

09

DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

421 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 4 DPA and RMSRE of each stock when (M N) is (20 5) and 119909-axis represents the stock ID

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

0010203040506070809

DPA

000100200300400500600700800901

RMSR

E

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 5 DPA and RMSRE of each stock when (M N) is (60 5) and 119909-axis represents the stock ID

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

0

01

02

03

04

05

06

07

08

09

DPA

001

0

002

003

004

005

006

007

008

009

01

RMSR

E

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

421 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 6 DPA and RMSRE of each stock when (M N) is (10 10) and 119909-axis represents the stock ID

Mathematical Problems in Engineering 9

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

0010203040506070809

DPA

000100200300400500600700800901

RMSR

E

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 7 DPA and RMSRE of each stock when (M N) is (20 10) and 119909-axis represents the stock ID

0

01

02

03

04

05

06

07

08

09

DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 8 DPA and RMSRE of each stock when (M N) is (60 10) and 119909-axis represents the stock ID

0

01

02

03

04

05

06

07

08

09

DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 9 DPA and RMSRE of each stock when (M N) is (10 20) and 119909-axis represents the stock ID

0

01

02

03

04

05

06

07

08

09

DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 10 DPA and RMSRE of each stock when (M N) is (20 20) and 119909-axis represents the stock ID

10 Mathematical Problems in Engineering

0

01

02

03

04

05

06

07

08

09DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 11 DPA and RMSRE of each stock when (M N) is (60 20) and 119909-axis represents the stock ID

which is lower than other six methods in most cases whilethe volatility is smaller However the RMSRE of GAN-FDincreases dramatically and fluctuates violently when119873 is 20and it varies between 121 and 496 This further showsthat we should reduce the model update cycle 119873 and revisethe model parameters regularly to adapt to the change ofmarket style

5 Conclusion

In this paper we propose an easy-to-use stock forecastingmodel called GAN-FD to assist more and more nonfinancialprofessional ordinary investors making decisions GAN-FDadopts 13 simple technical indexes as input data to avoidcomplicated input data preprocessing Based on the deeplearning network thismodel achieves prediction ability supe-rior to other benchmark methods by means of adversarialtraining minimizing direction prediction loss and forecasterror loss Moreover the effects of themodel update cycles onthe predictive capability are analyzed and the experimentalresults show that the smaller model update cycle can obtainbetter prediction performance In the future we will attemptto integrate predictive models under multiscale conditions

Conflicts of Interest

The authors declare that there are no conflicts of interestregarding the publication of this paper

Acknowledgments

This work is supported by the National Key ResearchDevelopment Program of China (2017YFB0802800) andthe National Natural Science Foundation of China (no61473149)

References

[1] R Al-Hmouz W Pedrycz and A Balamash ldquoDescription andprediction of time series a general framework of GranularComputingrdquo Expert Systems with Applications vol 42 no 10pp 4830ndash4839 2015

[2] S Barak and M Modarres ldquoDeveloping an approach to eval-uate stocks by forecasting effective features with data miningmethodsrdquo Expert Systems with Applications vol 42 no 3 pp1325ndash1339 2015

[3] A Booth E Gerding and F McGroarty ldquoAutomated tradingwith performance weighted random forests and seasonalityrdquoExpert Systems with Applications vol 41 no 8 pp 3651ndash36612014

[4] A Bagheri HMohammadi Peyhani andM Akbari ldquoFinancialforecasting usingANFIS networkswithQuantum-behaved Par-ticle Swarm Optimizationrdquo Expert Systems with Applicationsvol 41 no 14 pp 6235ndash6250 2014

[5] Y Son D-J Noh and J Lee ldquoForecasting trends of high-frequency KOSPI200 index data using learning classifiersrdquoExpert Systems with Applications vol 39 no 14 pp 11607ndash116152012

[6] I Aldridge and S Krawciw ldquoReal-Time Risk What InvestorsShould Know About FinTechrdquo in High-Frequency Trading andFlash Crashes JohnWileyamp Sons Inc HobokenNJ USA 2017

[7] F A De Oliveira C N Nobre and L E Zarate ldquoApplyingArtificial Neural Networks to prediction of stock price andimprovement of the directional prediction index - Case studyof PETR4 Petrobras Brazilrdquo Expert Systems with Applicationsvol 40 no 18 pp 7596ndash7606 2013

[8] J H Nino-Pena and G J Hernandez-Perez ldquoPrice directionprediction on high frequency data using deep belief networksrdquoCommunications in Computer and Information Science vol 657pp 74ndash83 2016

[9] A Marszałek and T Burczynrsquoski ldquoModeling and forecastingfinancial time series with ordered fuzzy candlesticksrdquo Informa-tion Sciences vol 273 pp 144ndash155 2014

[10] X Li X Huang X Deng and S Zhu ldquoEnhancing quantitativeintra-day stock return prediction by integrating both marketnews and stock prices informationrdquo Neurocomputing vol 142pp 228ndash238 2014

[11] X Wang S Bao and J Chen ldquoHigh-frequency stock linkageand multi-dimensional stationary processesrdquo Physica A Statis-tical Mechanics and its Applications vol 468 pp 70ndash83 2017

[12] E Chong C Han and F C Park ldquoDeep learning networks forstock market analysis and prediction Methodology data repre-sentations and case studiesrdquo Expert Systems with Applicationsvol 83 pp 187ndash205 2017

[13] I J Goodfellow J Pouget-Abadie M Mirza et al ldquoGenerativeadversarial netsrdquo in Proceedings of the 28th Annual Conference

Mathematical Problems in Engineering 11

on Neural Information Processing Systems 2014 NIPS 2014 pp2672ndash2680 can December 2014

[14] S Iizuka E Simo-Serra and H Ishikawa ldquoGlobally and locallyconsistent image completionrdquo ACM Transactions on Graphicsvol 36 no 4 article no 107 2017

[15] P Luc C Couprie S Chintala and J Verbeek Semanticsegmentation using adversarial networks arXiv preprint arXiv161108408 2016 arXiv161108408

[16] M Mathieu C Couprie and Y LeCun Deep multi-scale videoprediction beyond mean square error arXiv preprint arXiv151105440 2015 arXiv151105440

[17] J D HamiltonTime Series Analysis vol 2 PrincetonUniversityPress 1994

[18] R H Shumway and D S Stoffer Time series analysis and itsapplications Springer Texts in Statistics Springer New YorkNY USA 3rd edition 2011

[19] P J Brockwell and R ADavisTimE SeriesTheory andMethodsSpringer Science amp Business Media 2013

[20] S Pellegrini E Ruiz and A Espasa ldquoPrediction intervalsin conditionally heteroscedastic time series with stochasticcomponentsrdquo International Journal of Forecasting vol 27 no 2pp 308ndash319 2011

[21] Y Kara M Acar Boyacioglu and O K Baykan ldquoPredictingdirection of stock price index movement using artificial neuralnetworks and support vector machines The sample of theIstanbul Stock Exchangerdquo Expert Systems with Applications vol38 no 5 pp 5311ndash5319 2011

[22] M Ghiassi J Skinner andD Zimbra ldquoTwitter brand sentimentanalysis a hybrid system using n-gram analysis and dynamicartificial neural networkrdquo Expert Systems with Applications vol40 no 16 pp 6266ndash6282 2013

[23] M R Hassan ldquoA combination of hidden Markov model andfuzzymodel for stockmarket forecastingrdquoNeurocomputing vol72 no 16-18 pp 3439ndash3446 2009

[24] W Huang Y Nakamori and S-Y Wang ldquoForecasting stockmarket movement direction with support vector machinerdquoComputers ampOperations Research vol 32 no 10 pp 2513ndash25222005

[25] A F S Elsir and H Faris ldquoA Comparison between Regres-sion Artificial Neural Networks and Support Vector Machinesfor Predicting Stock Market Indexrdquo International Journal ofAdvanced Research in Artificial Intelligence vol 4 no 7 2015

[26] R Majhi G Panda G Sahoo A Panda and A ChoubeyldquoPrediction of SampP 500 and DJIA stock indices using particleswarm optimization techniquerdquo in Proceedings of the Proceedingof the IEEE Congress on Evolutionary Computation (CEC rsquo08)pp 1276ndash1282 Hong Kong China June 2008

[27] S S Appadoo Pricing Financial Derivatives with Fuzzy Alge-braic Models ATheoretical and Computational Approach [PhDthesis] University of Manitoba Winnipeg 2006

[28] A Thavaneswaran K Thiagarajah and S S Appadoo ldquoFuzzycoefficient volatility (FCV) models with applicationsrdquo Mathe-matical and Computer Modelling vol 45 no 7-8 pp 777ndash7862007

[29] C Carlsson and R Fuller ldquoOn possibilistic mean value andvariance of fuzzy numbersrdquo Fuzzy Sets and Systems vol 122 no2 pp 315ndash326 2001

[30] A Thavaneswaran S S Appadoo and A Paseka ldquoWeightedpossibilistic moments of fuzzy numbers with applications toGARCH modeling and option pricingrdquo Mathematical andComputer Modelling vol 49 no 1-2 pp 352ndash368 2009

[31] N Srivastava G Hinton A Krizhevsky I Sutskever and RSalakhutdinov ldquoDropout a simple way to prevent neural net-works from overfittingrdquo Journal of Machine Learning Researchvol 15 no 1 pp 1929ndash1958 2014

[32] A M Rather A Agarwal and V N Sastry ldquoRecurrent neuralnetwork and a hybrid model for prediction of stock returnsrdquoExpert Systems with Applications vol 42 no 6 pp 3234ndash32412015

[33] R D A Araujo A L I Oliveira and S Meira ldquoA hybrid modelfor high-frequency stock market forecastingrdquo Expert Systemswith Applications vol 42 no 8 pp 4081ndash4096 2015

[34] H Chen K Xiao J Sun and S Wu ldquoA double-layer neu-ral network framework for high-frequency forecastingrdquo ACMTransactions on Management Information Systems (TMIS) vol7 no 4 article no 11 2017

[35] A Yoshihara K Fujikawa K Seki and K Uehara ldquoPredictingStock Market Trends by Recurrent Deep Neural Networksrdquo inPRICAI 2014 Trends inArtificial Intelligence vol 8862 ofLectureNotes in Computer Science pp 759ndash769 Springer InternationalPublishing Cham 2014

[36] XDing Y Zhang T Liu and J Duan ldquoDeep learning for event-driven stock predictionrdquo in Proceedings of the 24th InternationalJoint Conference on Artificial Intelligence IJCAI 2015 pp 2327ndash2333 arg July 2015

[37] Z Zhou J Zhao and K Xu ldquoCan online emotions predictthe stock market in Chinardquo in Proceedings of the InternationalConference on Web Information Systems Engineering pp 328ndash342 2016

[38] S Hochreiter and J Schmidhuber ldquoLong short-term memoryrdquoNeural Computation vol 9 no 8 pp 1735ndash1780 1997

[39] Y LeCun L Bottou Y Bengio and P Haffner ldquoGradient-basedlearning applied to document recognitionrdquo Proceedings of theIEEE vol 86 no 11 pp 2278ndash2323 1998

[40] A Arevalo J Nino G Hernandez and J Sandoval ldquoHigh-frequency trading strategy based on deep neural networksrdquoin Proceedings of the International conference on intelligentcomputing pp 424ndash436 2016

[41] K-J Kim ldquoFinancial time series forecasting using supportvector machinesrdquo Neurocomputing vol 55 no 1-2 pp 307ndash3192003

[42] S Madge Predicting Stock Price Direction using SupportVector Machines Independent Work Report Spring 2015

Hindawiwwwhindawicom Volume 2018

MathematicsJournal of

Hindawiwwwhindawicom Volume 2018

Mathematical Problems in Engineering

Applied MathematicsJournal of

Hindawiwwwhindawicom Volume 2018

Probability and StatisticsHindawiwwwhindawicom Volume 2018

Journal of

Hindawiwwwhindawicom Volume 2018

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawiwwwhindawicom Volume 2018

OptimizationJournal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Engineering Mathematics

International Journal of

Hindawiwwwhindawicom Volume 2018

Operations ResearchAdvances in

Journal of

Hindawiwwwhindawicom Volume 2018

Function SpacesAbstract and Applied AnalysisHindawiwwwhindawicom Volume 2018

International Journal of Mathematics and Mathematical Sciences

Hindawiwwwhindawicom Volume 2018

Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom

The Scientific World Journal

Volume 2018

Hindawiwwwhindawicom Volume 2018Volume 2018

Numerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisAdvances inAdvances in Discrete Dynamics in

Nature and SocietyHindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom

Dierential EquationsInternational Journal of

Volume 2018

Hindawiwwwhindawicom Volume 2018

Decision SciencesAdvances in

Hindawiwwwhindawicom Volume 2018

AnalysisInternational Journal of

Hindawiwwwhindawicom Volume 2018

Stochastic AnalysisInternational Journal of

Submit your manuscripts atwwwhindawicom

Page 2: Stock Market Prediction on High-Frequency Data Using Generative Adversarial Netsdownloads.hindawi.com/journals/mpe/2018/4907423.pdf · 2018-11-12 · ResearchArticle Stock Market

2 Mathematical Problems in Engineering

semantic segmentation and video prediction [14ndash16] as faras we know it has not been used for stock forecasting

This work uses basic technical index data as an inputvariable which can be acquired directly from trading soft-ware so that people outside the financial field can predictstock price through our method easily This study introducesforecast error loss and direction prediction loss and showsthat generative adversarial training [13] may be successfullyemployed for combining these losses to produce satisfyingpredict results and we call this prediction architecture GAN-FD (GAN for minimizing forecast error loss and directionprediction loss) For the purpose of conforming to thepractice of actual transactions this work carries out rollingsegmentation on training set and testing set of the raw dataand we will illustrate it in detail in the experimental section

Overall our main contributions are twofold (1) weadapted generative adversarial network for the purpose ofprice prediction which constitutes to our knowledge thefirst application of adversarial training to stock market andextensive experiments show that our prediction model canachieve remarkable results and (2) we carry out rollingsegmentation on training set and testing set of the raw data toinvestigate the effect the of model parameter update cycle onthe stock forecast performance and the experimental resultsshow that smaller model update cycle can advance predictionperformance

In the remainder of this paper we begin with a reviewof the literature on which algorithms have been used for thefinancial market prediction Then we formulate the problemand propose our general adversarial network frameworkFurthermore in the experiments section we presented theexperimental analysis with the proposed model as well as acomparison between the obtained results with those given byclassical prediction models Finally conclusions and possibleextensions are discussed

2 Related Work

This section introduce the relatedwork from the stockmarketprediction method and the generative adversarial network

21 Stock Market Prediction Method According to the re-search developed in this field we can classify the techniquesused to solve the stock market prediction problems totwofold

The first category of related work is econometric modelswhich includes classical econometric models for forecastingCommon methods are the autoregressive method (AR) themoving average model (MA) the autoregressive movingaverage model (ARMA) and the autoregressive integratedmoving average (ARIMA) [17ndash19] Roughly speaking thesemodels take each new signal as a noisy linear combination ofthe last few signals and independent noise terms Howevermost of them rely on some strong assumptions with respectto the noise terms (such as iid assumption 119905-distribution)and loss functions while real financial data may not fullysatisfy these assumptions By introducing a generalizedautoregressive conditional heteroscedastic (GARCH) model

for conditional variances Pellegrini et al [20] apply ARIMA-GARCHmodel to the prediction of financial time series

The second category involves soft computing based mod-els Soft computing is a term that covers artificial intelligencewhich mimics biological processes These techniques includeartificial neural networks (ANN) [21 22] fuzzy logic (FL)[23] support vectormachines (SVM) [24 25] particle swarmoptimization (PSO) [26] and many others Many authorshave tried to deal with fuzziness along with randomness inoption pricing models [27 28] Carlsson and Fuller [29] werethe first to study the fuzzy real options and Thavaneswaranet al [30] demonstrated the superiority of the fuzzy fore-casts and then derived the membership function for theEuropean call price by fuzzifying the interest rate volatilityand the initial value of the stock price Recently there hasbeen a resurgence of interest in deep learning whose basicstructure is best described as a multilayer neural network[31] Some literatures have established various models basedon deep neural networks to improve the prediction abilityof high-frequency financial time series [32 33] The abilityof deep neural networks to extract abstract features fromdata is also attractive Chong et al [12] applied a deepfeature learning-based stockmarket predictionmodel whichextract information from the stock return time series withoutrelying on prior knowledge of the predictors and testedit on high-frequency data from the Korean stock marketChen et al [34] proposed a double-layer neural network forhigh-frequency forecasting with links specially designed tocapture dependence structures among stock returns withindifferent business sectors There also exist a few studiesthat apply deep learning to identification of the relationshipbetween past news events and stock market movements [35ndash37]

However to our knowledge most of these methodsrequire expertise to impose specific restrictions on the inputvariables such as combining related stocks together as entrydata [12] inputting different index data to different layersof the deep neural network [34] and converting news textinto structured representation as input [36] In contrast ourproposed forecasting model directly uses the data providedby the trading software as input which reduce the barrier forordinary investors

22 Generative Adversarial Network Generative adversarialnetwork (GAN) is a framework for estimating generativemodels via an adversarial process in which we simultane-ously train twomodels a generativemodel119866 that captures thedata distribution and a discriminativemodel119863 that estimatesthe probability that a sample came from the training datarather than 119866 The training procedure for 119866 is to maximizethe probability of 119863 making a mistake This frameworkcorresponds to a minimax two-player game In the space ofarbitrary functions 119866 and D a unique solution exists with119866 recovering the training data distribution and 119863 equal to05 everywhere [13] While119866 and119863 are defined bymultilayerperceptrons in [13] most researches recently constructed 119866and 119863 on the basis of Long Short-Term Memory (LSTM)[38] or convolutional neural network (CNN) [39] for a largevariety of application

Mathematical Problems in Engineering 3

XG

Y Y

YX1 X2 XT

LSTMinternalunit

LSTMinternalunit

LSTMinternalunit

Y1 Y2 YTYT+1

Y1 Y2 YTY1 Y2 YT YT+1

D

Inputsequence

ConvConv Conv FC

FCReal

Predicted

Figure 1 GAN-FD architectureThe generator (119866) is founded on LSTM which applies to predicting 119879+1 The discriminator (119863) is based onCNN for the purpose of estimating the probability whether a sequence is real (Y) or being predicted (Y) Conv means convolutional layerFC is an abbreviation for fully connected layer The structure of 119866 and119863 can be adjusted according to the specific application

LSTM is a basic deep learning model and capable oflearning long-term dependencies A LSTM internal unit iscomposed of a cell an input gate an output gate and aforget gate LSTM internal units have hidden state augmentedwith nonlinear mechanisms to allow state to propagatewithout modification be updated or be reset using simplelearned gating functions LSTM work tremendously well onvarious problems such as natural language text compressionhandwriting recognition and electric load forecasting

CNN is a class of deep feed-forward artificial neural net-works that has successfully been applied to analyzing visualimagery A CNN consists of an input layer and an outputlayer as well as multiple hidden layers The hidden layers of aCNN typically consist of convolutional layers pooling layersfully connected layers and normalization layers CNN alsohas many applications such as image and video recognitionrecommender systems and natural language processing

Although there are a lot of literatures forecast stock priceby using LSTM model to the best of our knowledge thispaper is the first to adopt GAN to predict stock pricesThe experimental part (Section 42) compares the predictionperformances between GAN-FC and LSTM

3 Forecasting with High-Frequency Data

In this section we illuminate the details of the generativeadversarial network framework for stock market forecastingwith high-frequency data

31 Problem Statement Under the high-frequency tradingenvironment high-quality one-step forecasting is usuallyof great concern to algorithmic traders providing signifi-cant information to market makers for risk assessment andmanagement In this article we aim to forecast the pricemovement of individual stocks or the market index one stepahead based solely on their historical price information Ourproblem can be mathematically formalized as follows

Let X119905 represent a set of basic indicators and 119884119905 denotethe closing price of one stock for a 1-minute interval attime 119905 (119905 = 1 2 119879) where 119879 is the maximum lagof time Given the historical basic indicators informationX (X = X1X2 X119879) and the past closing price Y (Y =1198841 1198842 119884119879) our goal is to predict the closing price 119884119879+1for the next 1-minute time interval There are literatures thatexamined the effects of different119879 [7 12 40] but in thiswork

we just set 119879 to 242 because each trading day contains 242-minute intervals in the China stock exchanges

32 Prediction Model The deep architecture of the proposedGAN-FD model is illustrated as in Figure 1 Since the stockdata is a typical time series we choose LSTM model whichis widely applied to time series prediction as the generativemodel 119866 to predict output 119879+1 based on the input data Xthat is

119879+1 = 119866 (X) (1)

The discriminative model 119863 is based on the CNNarchitecture and performs convolution operations on theone-dimensional input sequence in order to estimate theprobability whether a sequence comes from the dataset (Y =1198841 1198842 119884119879 119884119879+1) or being produced by a generativemodel 119866 (Y = 1198841 1198842 119884119879 119879+1)

Our main intuition on why to use an adversarial lossis that it can simulate the operating habits of financialtraders An experienced trader usually predicts stock pricethrough the available indicator data which is the work of thegenerative model 119866 and then judges the correct probabilityof his own forecast with the previous stock price as thediscriminative model119863 does

It is noteworthy that the structure of 119866 and 119863 in GAN-FD can be adjusted according to specific application andthe experimental part in this paper just proposed simple 119866and 119863 framework (Section 42) for stock prediction It isreasonable to believe that fine-tuning the structure of 119866 and119863 can improve the predictive performance

33 Adversarial Training The training of the pair (119866 119863)consists of two alternated steps described below For the sakeof clarity we assume that we use pure SGD (minibatches ofsize 1) but there is no difficulty to generalize the algorithmto minibatches of size 119870 by summing the losses over thesamples

Training 119866 (let (XY) be a sample from the dataset) In ordertomake the discriminativemodel119863 as ldquoconfusedrdquo as possiblethe generative model 119866 should reduce the adversarial loss inthe sense that119863will not discriminate the prediction correctlyClassifying Y into class 1 and Y into class 0 the adversarialloss for 119866 is

119871119866adv (Y) = 119871 sce (119863 (Y) 1) (2)

4 Mathematical Problems in Engineering

where 119871 sce is the sigmoid cross-entropy loss defined as

119871 sce (AB) = minussum119894

119861119894 log (sigmoid (119860 119894))+ (1 minus 119861119894) log (1 minus sigmoid (119860 119894))

(3)

However in practice minimizing adversarial loss alonecannot guarantee satisfying predictions Imagine that119866 couldgenerate samples to ldquoconfuserdquo119863 without being close to 119879+1and then119863will learn to discriminate these samples leading119866to generate other ldquoconfusingrdquo samples and so on To addressthis problem the generative model 119866 ought to decrease theforecast error loss that is 119871119901 loss

119871119901 (Y Y) = 10038171003817100381710038171003817Y minus Y10038171003817100381710038171003817119901 (4)

where 119901 = 1 or 119901 = 2Furthermore as mentioned above stock price direction

prediction is crucial to trading so we define direction pre-diction loss function 119871dpl

119871dpl (Y Y) = 10038161003816100381610038161003816sgn (119879+1 minus 119884119879) minus sgn (119884119879+1 minus 119884119879)10038161003816100381610038161003816 (5)

where sgn represents sign functionCombining all these losses previously defined with differ-

ent parameters 120582adv 120582119901 and 120582dpl we achieve the final loss on119866119871119866 (XY) = 120582adv119871119866adv (Y) + 120582119901119871119901 (Y Y)

+ 120582dpl119871dpl (Y Y) (6)

Then we perform one SGD iteration on 119866 to minimize119871119866(XY) while keeping the weights of119863 fixed

Training 119863 (let (XY) be a different data sample) Since therole of 119863 is just to determine whether the input sequence isY or Y the target loss is equal to the adversarial loss on DWhile keeping the weights of 119866 fixed we perform one SGDstep on119863 to minimize the target loss

119871119863 (XY) = 119871119863adv (Y Y)= 119871 sce (119863 (Y) 0) + 119871 sce (119863 (Y) 1) (7)

We train the generator and discriminator iteratively Theentire process is summarized in Algorithm 1 withminibatch-es of size 119870

(1) Set the learning rates 120588119863 and 120588119866 and parameters120582adv 120582119901 120582dpl(2) Initialize weights119882119863 and119882119866(3) while not converged do(4) Update the generator 119866(5) Get 119870 new data samples (X(1) Y(1)) (X(2)

Y(2)) (X(119870) Y(119870))(6) 119882119866 = 119882119866 minus 120588119866 119870sum

119894

120597119871119866(X(119894)Y(119894))120597119882119866(7) Update the discriminator 119863(8) Get 119870 new data samples (X(1) Y(1)) (X(2)

Y(2)) (X(119870) Y(119870))(9) 119882119863 = 119882119863 minus 120588119863 119870sum

119894

120597119871119863(X(119894)Y(119894))120597119882119863(10) end while

Algorithm 1 Training GAN-FD

4 Experiments

41 Dataset Next we evaluate the performance of the pro-posed method based on the China stock market rangingfrom January 1 2016 to December 31 2016 There are totally244 trading days and each day contains 242-minute intervalscorresponding to 59048 time points These stocks selectedfor the experiment should conform to three criteria firstthey should be the constituent stock of 119862119878119868 300 (the CSI300 is a capitalization-weighted stock market index designedto replicate the performance of 300 stocks traded in theShanghai and Shenzhen stock exchanges) second they werenot suspended during the period we just mentioned in caseaccidental events bring about significant impact on their priceand affect forecast results third their closing prices in thestart time that is January 1 2016 are above 30 to ensurethe volatility for high-frequency exchange This leaves 42stocks in the sample which are listed in Table 1 The numberof increasing directions and decreasing directions for eachstockrsquos closing price per minute is also shown in Table 1 andtheir numbers are relatively close The historical data wasobtained from the Wind Financial Terminal produced byWind Information Inc (the Wind Financial Terminal can bedownloaded from httpwwwwindcomcn)

Many fund managers and investors in the stock marketgenerally accept and use certain criteria for technical indi-cators as the signal of future market trends [12 41] Thiswork selects 13 technical indicators as feature subsets bythe review of domain experts and prior researches that isthe input data X at each moment (eg X119879) consists of 13basic indicators that can be obtained directly from almost alltrading software These basic indicators are listed in Table 2and their parameters are using the default value of the WindFinancial Terminal As mentioned above Y is defined as theclosing price at each moment

Most of the related articles use the traditional datapartitioning method that is the entire dataset is directly splitinto training set and testing set [12 22 40 42] However

Mathematical Problems in Engineering 5

Table 1 The sample stocks and their number of increasing direc-tions and decreasing directions

ID Stock code Increase Decrease1 000156SZ 28927 301202 000432SZ 28879 301683 000783SZ 28310 307374 000938SZ 28537 305105 000963SZ 29192 298556 002007SZ 28933 301147 002027SZ 28623 304248 002153SZ 28566 304819 002183SZ 28795 3025210 002195SZ 28861 3018611 002241SZ 29084 2996312 002241SZ 28737 3031013 002252SZ 28696 3035114 002292SZ 28385 3066215 002304SZ 28914 3013316 002415SZ 29036 3001117 002456SZ 28671 3037618 002475SZ 28837 3021019 002594SZ 28525 3052220 300017SZ 28528 3051921 300024SZ 28411 3063622 300072SZ 28884 3016323 300124SZ 28632 3041524 300146SZ 29137 2991025 600038SH 28428 3061926 600085SH 28856 3019127 600118SH 28456 3059128 600150SH 28537 3051029 600332SH 29174 2987330 600340SH 28773 3027431 600519SH 29118 2992932 600535SH 29013 3003433 600570SH 28053 3099434 600588SH 28483 3056435 600685SH 28627 3042036 600718SH 28881 3016637 600754SH 28307 3074038 600783SH 28680 3036739 601318SH 28979 3006840 601336SH 28643 3040441 601888SH 28919 3012842 603885SH 28817 30230

the trading style of the stock market changes frequentlyfor example investors sometimes prefer stocks with highvolatility and sometimes tend to invest in technology stocksTherefore we should update the model parameters regularlyto adapt to the change of market style In order to makeexperiments closer to real transactions we carry out rolling

Table 2 Basic indicators for prediction

IndicatorsOpening priceMaximum priceMinimum priceTrading volumeTurnoverBiasBollinger bandsDirectional movement indexExponential moving averagesStochastic indexMoving averagesMACDRelative strength index

Dataset

M

M

M

N

N

N

Figure 2 Rolling segmentation on training set and testing set Thegreen bar represents the entire dataset the blue bar represents thetraining set for a round experiment and the yellow bar representsthe corresponding testing set

segmentation on training set and testing set of the experi-mental data As Figure 2 shows in the beginning we selectthe first119872 days as training set and the next119873 days play therole of testing set After the first round of experiments weroll forward the time window for 119873 days that is choosingthe (119873+1)th day to the (119872+119873)th day as training set and the(119872+119873+1)th day to the (119872+2119873)th day as testing set Repeatuntil all the data has been experimented In other words this119873 can be regarded as the model update cycle and119872 is thesize of the corresponding training data

42 Network Architecture Given that the LSTM generatortakes on the role of prediction and requires more accuratecalculations of values than the CNN discriminator we set thelearning rate 120588119866 to 00004 and 120588119863 to 002 The LSTM cell in119866 contains 121 internal (hidden) units and the parametersare initialized following the normal distribution N(0 1)The architecture of discriminative model 119863 is presented inTable 3 We train GAN-FD with 119901 = 2 weighted by 120582adv =120582119901 = 120582dpl = 143 Benchmark Methods To evaluate the performance ofour proposed method we include three baseline meth-ods for comparison The first model is ARIMA (1 1 1)-GARCH(1 1) a fitted ARIMA model that forecasts future

6 Mathematical Problems in Engineering

Table 3 Network architecture of discriminative model 119863Layer ConfigurationConvolution 1 Filter 32 times 4 times 1 strides 2 LReLUConvolution 2 Filter 64 times 4 times 1 strides 2 LReLU BNConvolution 3 Filter 128 times 4 times 1 strides 2 LReLU BNFC 1 128 leaky ReLUFC 2 2 sigmoidOptimizer SGD batch size 121 iterations 10000 LReLU slope 001

Table 4 Summary of RMSRE with different (M N) These figures are the average values over the 42 stocks

119873 = 5 119873 = 10 119873 = 20119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60ARIMA-GARCH 00419 00406 00425 00529 00529 00516 00733 00657 00739ANN 00419 00485 00531 00522 00522 00510 00739 00631 00631SVM 00512 00450 00487 00539 00507 00527 00616 00666 00639GAN-F 00151 00155 00157 00300 00243 00277 00326 00313 00299GAN-D 00422 00304 00503 00625 00419 00405 00514 00598 00420LSTM-FD 00200 00194 00180 00324 00230 00245 00321 00335 00357GAN-FD 00098 00079 00101 00218 00111 00144 00333 00323 00296

values of stock time series and the GARCH model forecastsfuture volatilities [20] The second one is artificial neuralnetworks (ANN) The parameter optimization method andmodel architectural is setting as in [21] except that the inputlayer node is changed to 13 and the network outputs thepredicted value instead of two patterns (0 or 1)The third oneis support vectormachines (SVM)AnRBF kernel is used andthe parameter is setting as in [25]

We also inspect our GAN-FD model from several waysThe GAN-F model is using a GAN architectural for mini-mizing forecast error loss with 120582adv = 120582119901 = 1 and 120582dpl= 0 The GAN-D model is using a GAN architectural forminimizing direction prediction loss with 120582adv = 120582dpl = 1and 120582119901 = 0 The LSTM-FD model is a LSTM model aimingat minimizing forecast error loss and direction predictionloss with 121 internal units in LSTM Obviously the maindifference between LSTM-FD and GAN-FD is the presenceof adversarial training

44 Evaluation Metrics For each stock at each time 119905 aprediction is made for the next time point 119905 + 1 based ona specific method Assume the total number of time pointsbeing tested is 1198790 we used the following criteria to evaluatethe performance of different models

(1) Root Mean Squared Relative Error (RMSRE)

RMSRE = radic 111987901198790sum119905=1

(119905+1 minus 119884119905+1119884119905+1 )2 (8)

RMSRE is employed as an indicator for the predictive poweror prediction agreement A low RMSRE indicates that theprediction agreeswith the real data (the reasonwhy this paperuses RMSRE instead of RMSE is that RMSRE facilitates auniform comparison of the results of 42 stocks)

(2) Direction Prediction Accuracy (DPA)

DPA = 10011987901198790sum119905=1

119868119905 (9)

where

119868119905 = 1 if (119884119905+1 minus 119884119905) (119905+1 minus 119884119905) gt 00 otherwise

(10)

DPA measures the percentage of accuracy relating to theseries trend A high DPA promises more winning trades

45 Results In order to investigate the effect of the modelupdate cycle on the predictive performance let119872 isin 10 2060 and 119873 isin 5 10 20 In China stock exchange market5 10 20 60 days represent one week two weeks onemonth and one quarter

Tables 4 and 5 show the average values of RMSRE andDPAwith different (119872119873)The numbers clearly indicate thatGAN-FD and its related methods perform better than threebaseline methods in terms of RMSRE and DPAThis targetedmethod GAN-F brings some improvement in RMSRE butit does not outperform three baseline methods in DPAContrary to GAN-F GAN-D achieves better results in DPAbut failed in RMSRE LSTM-FD improves the results sinceit combines forecast error loss with direction prediction lossfor training Finally the combination of the forecast error lossdirection prediction loss and adversarial training that isGAN-FD achieves the best RMSRE and DPA in the majorityof scenarios

Let us take a look at the effects of different (M N) on theexperiment GAN-FD obtains the maximum average DPA(06956) and the minimum average RMSRE (00079) when

Mathematical Problems in Engineering 7

Table 5 Summary of DPA with different (M N) These figures are the average values over the 42 stocks

119873 = 5 119873 = 10 119873 = 20119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60ARIMA-GARCH 05464 05479 05264 05280 05315 05245 05007 05214 05296ANN 05456 05978 05738 05473 05629 05575 05205 05280 05394SVM 05715 05490 05839 05377 05514 05576 05147 05144 05318GAN-F 05347 05507 05281 04930 05115 05265 04880 05008 05116GAN-D 06220 06399 06409 06117 06245 06437 05217 05517 05498LSTM-FD 06340 06506 06509 06124 06236 06256 05546 05635 05719GAN-FD 06761 06956 06793 06233 06651 06687 05535 05583 05753

Table 6 The number of times about the minimum RMSRE

119873 = 5 119873 = 10 119873 = 20119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60ARIMA-GARCH 0 0 0 0 0 0 0 0 0ANN 0 0 0 0 0 0 0 0 0SVM 0 0 0 0 0 0 0 0 0GAN-F 11 2 4 6 6 4 13 18 11GAN-D 0 0 0 0 0 0 2 0 7LSTM-FD 0 0 5 6 3 3 16 10 5GAN-FD 31 40 33 30 33 35 11 14 19

Table 7 The number of times about the maximum DPA

119873 = 5 119873 = 10 119873 = 20119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60ARIMA-GARCH 0 0 0 0 0 0 0 6 5ANN 0 0 0 0 0 0 2 0 3SVM 0 0 0 0 0 0 3 1 1GAN-F 0 0 0 0 0 0 0 0 0GAN-D 0 1 6 5 1 7 2 6 2LSTM-FD 1 3 4 11 4 0 18 15 12GAN-FD 41 38 32 26 37 35 17 14 19

(M N) is (20 5) It is interesting to note that all thesemethods work better when 119873 is 5 than when 119873 is 10 or 20with smaller RMSRE and higher DPA This implies that veryshort-term trends are best for predicting the next minutersquosprice Therefore a shorter model update cycle (eg 119873 is 5)is preferred On the other hand for the same 119873 different119872 will bring about some changes to the prediction resultsFrom the experimental results we suggest that119872 should takethe value greater than 119873 This makes intuitive sense If thetraining sample is inadequate it would fail to train themodelespecially in the volatile stockmarketsWe should also noticethat when the training set is small while the testing set islarge (ie (M N) is (10 20)) most of these methods performthe worst and the DPA of these methods are no better thanrandom guessing (ie 50)

Table 6 shows the number of times for each methodto achieve the minimum RMSRE over the 42 stocks It isnoticeable that the results of these three baseline methods areall zero GAN-FDwith its related methods is obviously betterthan these three baseline methods in RMSRE Meanwhile

GAN-FD obtains the minimum RMSRE 246 times account-ing for 6508 in these 378 scenarios (42 stocks and 9 groups(M N)) The best performance appeared when (M N) is (205) with 40 stocksrsquo minimumRMSRE coming fromGAN-FD

Table 7 shows the number of times for each method toachieve the maximum DPA over the 42 stocks Comparedwith the other six methods GAN-FD achieves the maximumDPA 269 times accounting for 7116 in all scenarios When(M N) is (10 5) the maximum DPA of 41 stocks in all 42stocks comes from GAN-FD Even when (M N) is (20 20)that is the worst performance of GAN-FD cases GAN-FDstill obtains maximum DPA in 14 stocks From the aboveanalyses the performance of the GAN-FD is significantlybetter than the other six ways

The results of each representation are reported in Figures3ndash11 We just focus on GAN-FD As shown in Figures 3ndash5the DPA of GAN-FD ranges around 6459ndash7224 when119873is 5 and it slumps to 5201ndash6271 when 119873 is 20 whichis presented in Figures 9ndash11 When 119873 is 5 the RMSRE ofGAN-FD over the 42 stocks varies between 048 and 149

8 Mathematical Problems in Engineering

0 0010203040506070809

DPA

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

00100200300400500600700800901

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 3 DPA and RMSRE of each stock when (M N) is (10 5) and 119909-axis represents the stock ID

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

0

01

02

03

04

05

06

07

08

09

DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

421 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 4 DPA and RMSRE of each stock when (M N) is (20 5) and 119909-axis represents the stock ID

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

0010203040506070809

DPA

000100200300400500600700800901

RMSR

E

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 5 DPA and RMSRE of each stock when (M N) is (60 5) and 119909-axis represents the stock ID

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

0

01

02

03

04

05

06

07

08

09

DPA

001

0

002

003

004

005

006

007

008

009

01

RMSR

E

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

421 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 6 DPA and RMSRE of each stock when (M N) is (10 10) and 119909-axis represents the stock ID

Mathematical Problems in Engineering 9

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

0010203040506070809

DPA

000100200300400500600700800901

RMSR

E

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 7 DPA and RMSRE of each stock when (M N) is (20 10) and 119909-axis represents the stock ID

0

01

02

03

04

05

06

07

08

09

DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 8 DPA and RMSRE of each stock when (M N) is (60 10) and 119909-axis represents the stock ID

0

01

02

03

04

05

06

07

08

09

DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 9 DPA and RMSRE of each stock when (M N) is (10 20) and 119909-axis represents the stock ID

0

01

02

03

04

05

06

07

08

09

DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 10 DPA and RMSRE of each stock when (M N) is (20 20) and 119909-axis represents the stock ID

10 Mathematical Problems in Engineering

0

01

02

03

04

05

06

07

08

09DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 11 DPA and RMSRE of each stock when (M N) is (60 20) and 119909-axis represents the stock ID

which is lower than other six methods in most cases whilethe volatility is smaller However the RMSRE of GAN-FDincreases dramatically and fluctuates violently when119873 is 20and it varies between 121 and 496 This further showsthat we should reduce the model update cycle 119873 and revisethe model parameters regularly to adapt to the change ofmarket style

5 Conclusion

In this paper we propose an easy-to-use stock forecastingmodel called GAN-FD to assist more and more nonfinancialprofessional ordinary investors making decisions GAN-FDadopts 13 simple technical indexes as input data to avoidcomplicated input data preprocessing Based on the deeplearning network thismodel achieves prediction ability supe-rior to other benchmark methods by means of adversarialtraining minimizing direction prediction loss and forecasterror loss Moreover the effects of themodel update cycles onthe predictive capability are analyzed and the experimentalresults show that the smaller model update cycle can obtainbetter prediction performance In the future we will attemptto integrate predictive models under multiscale conditions

Conflicts of Interest

The authors declare that there are no conflicts of interestregarding the publication of this paper

Acknowledgments

This work is supported by the National Key ResearchDevelopment Program of China (2017YFB0802800) andthe National Natural Science Foundation of China (no61473149)

References

[1] R Al-Hmouz W Pedrycz and A Balamash ldquoDescription andprediction of time series a general framework of GranularComputingrdquo Expert Systems with Applications vol 42 no 10pp 4830ndash4839 2015

[2] S Barak and M Modarres ldquoDeveloping an approach to eval-uate stocks by forecasting effective features with data miningmethodsrdquo Expert Systems with Applications vol 42 no 3 pp1325ndash1339 2015

[3] A Booth E Gerding and F McGroarty ldquoAutomated tradingwith performance weighted random forests and seasonalityrdquoExpert Systems with Applications vol 41 no 8 pp 3651ndash36612014

[4] A Bagheri HMohammadi Peyhani andM Akbari ldquoFinancialforecasting usingANFIS networkswithQuantum-behaved Par-ticle Swarm Optimizationrdquo Expert Systems with Applicationsvol 41 no 14 pp 6235ndash6250 2014

[5] Y Son D-J Noh and J Lee ldquoForecasting trends of high-frequency KOSPI200 index data using learning classifiersrdquoExpert Systems with Applications vol 39 no 14 pp 11607ndash116152012

[6] I Aldridge and S Krawciw ldquoReal-Time Risk What InvestorsShould Know About FinTechrdquo in High-Frequency Trading andFlash Crashes JohnWileyamp Sons Inc HobokenNJ USA 2017

[7] F A De Oliveira C N Nobre and L E Zarate ldquoApplyingArtificial Neural Networks to prediction of stock price andimprovement of the directional prediction index - Case studyof PETR4 Petrobras Brazilrdquo Expert Systems with Applicationsvol 40 no 18 pp 7596ndash7606 2013

[8] J H Nino-Pena and G J Hernandez-Perez ldquoPrice directionprediction on high frequency data using deep belief networksrdquoCommunications in Computer and Information Science vol 657pp 74ndash83 2016

[9] A Marszałek and T Burczynrsquoski ldquoModeling and forecastingfinancial time series with ordered fuzzy candlesticksrdquo Informa-tion Sciences vol 273 pp 144ndash155 2014

[10] X Li X Huang X Deng and S Zhu ldquoEnhancing quantitativeintra-day stock return prediction by integrating both marketnews and stock prices informationrdquo Neurocomputing vol 142pp 228ndash238 2014

[11] X Wang S Bao and J Chen ldquoHigh-frequency stock linkageand multi-dimensional stationary processesrdquo Physica A Statis-tical Mechanics and its Applications vol 468 pp 70ndash83 2017

[12] E Chong C Han and F C Park ldquoDeep learning networks forstock market analysis and prediction Methodology data repre-sentations and case studiesrdquo Expert Systems with Applicationsvol 83 pp 187ndash205 2017

[13] I J Goodfellow J Pouget-Abadie M Mirza et al ldquoGenerativeadversarial netsrdquo in Proceedings of the 28th Annual Conference

Mathematical Problems in Engineering 11

on Neural Information Processing Systems 2014 NIPS 2014 pp2672ndash2680 can December 2014

[14] S Iizuka E Simo-Serra and H Ishikawa ldquoGlobally and locallyconsistent image completionrdquo ACM Transactions on Graphicsvol 36 no 4 article no 107 2017

[15] P Luc C Couprie S Chintala and J Verbeek Semanticsegmentation using adversarial networks arXiv preprint arXiv161108408 2016 arXiv161108408

[16] M Mathieu C Couprie and Y LeCun Deep multi-scale videoprediction beyond mean square error arXiv preprint arXiv151105440 2015 arXiv151105440

[17] J D HamiltonTime Series Analysis vol 2 PrincetonUniversityPress 1994

[18] R H Shumway and D S Stoffer Time series analysis and itsapplications Springer Texts in Statistics Springer New YorkNY USA 3rd edition 2011

[19] P J Brockwell and R ADavisTimE SeriesTheory andMethodsSpringer Science amp Business Media 2013

[20] S Pellegrini E Ruiz and A Espasa ldquoPrediction intervalsin conditionally heteroscedastic time series with stochasticcomponentsrdquo International Journal of Forecasting vol 27 no 2pp 308ndash319 2011

[21] Y Kara M Acar Boyacioglu and O K Baykan ldquoPredictingdirection of stock price index movement using artificial neuralnetworks and support vector machines The sample of theIstanbul Stock Exchangerdquo Expert Systems with Applications vol38 no 5 pp 5311ndash5319 2011

[22] M Ghiassi J Skinner andD Zimbra ldquoTwitter brand sentimentanalysis a hybrid system using n-gram analysis and dynamicartificial neural networkrdquo Expert Systems with Applications vol40 no 16 pp 6266ndash6282 2013

[23] M R Hassan ldquoA combination of hidden Markov model andfuzzymodel for stockmarket forecastingrdquoNeurocomputing vol72 no 16-18 pp 3439ndash3446 2009

[24] W Huang Y Nakamori and S-Y Wang ldquoForecasting stockmarket movement direction with support vector machinerdquoComputers ampOperations Research vol 32 no 10 pp 2513ndash25222005

[25] A F S Elsir and H Faris ldquoA Comparison between Regres-sion Artificial Neural Networks and Support Vector Machinesfor Predicting Stock Market Indexrdquo International Journal ofAdvanced Research in Artificial Intelligence vol 4 no 7 2015

[26] R Majhi G Panda G Sahoo A Panda and A ChoubeyldquoPrediction of SampP 500 and DJIA stock indices using particleswarm optimization techniquerdquo in Proceedings of the Proceedingof the IEEE Congress on Evolutionary Computation (CEC rsquo08)pp 1276ndash1282 Hong Kong China June 2008

[27] S S Appadoo Pricing Financial Derivatives with Fuzzy Alge-braic Models ATheoretical and Computational Approach [PhDthesis] University of Manitoba Winnipeg 2006

[28] A Thavaneswaran K Thiagarajah and S S Appadoo ldquoFuzzycoefficient volatility (FCV) models with applicationsrdquo Mathe-matical and Computer Modelling vol 45 no 7-8 pp 777ndash7862007

[29] C Carlsson and R Fuller ldquoOn possibilistic mean value andvariance of fuzzy numbersrdquo Fuzzy Sets and Systems vol 122 no2 pp 315ndash326 2001

[30] A Thavaneswaran S S Appadoo and A Paseka ldquoWeightedpossibilistic moments of fuzzy numbers with applications toGARCH modeling and option pricingrdquo Mathematical andComputer Modelling vol 49 no 1-2 pp 352ndash368 2009

[31] N Srivastava G Hinton A Krizhevsky I Sutskever and RSalakhutdinov ldquoDropout a simple way to prevent neural net-works from overfittingrdquo Journal of Machine Learning Researchvol 15 no 1 pp 1929ndash1958 2014

[32] A M Rather A Agarwal and V N Sastry ldquoRecurrent neuralnetwork and a hybrid model for prediction of stock returnsrdquoExpert Systems with Applications vol 42 no 6 pp 3234ndash32412015

[33] R D A Araujo A L I Oliveira and S Meira ldquoA hybrid modelfor high-frequency stock market forecastingrdquo Expert Systemswith Applications vol 42 no 8 pp 4081ndash4096 2015

[34] H Chen K Xiao J Sun and S Wu ldquoA double-layer neu-ral network framework for high-frequency forecastingrdquo ACMTransactions on Management Information Systems (TMIS) vol7 no 4 article no 11 2017

[35] A Yoshihara K Fujikawa K Seki and K Uehara ldquoPredictingStock Market Trends by Recurrent Deep Neural Networksrdquo inPRICAI 2014 Trends inArtificial Intelligence vol 8862 ofLectureNotes in Computer Science pp 759ndash769 Springer InternationalPublishing Cham 2014

[36] XDing Y Zhang T Liu and J Duan ldquoDeep learning for event-driven stock predictionrdquo in Proceedings of the 24th InternationalJoint Conference on Artificial Intelligence IJCAI 2015 pp 2327ndash2333 arg July 2015

[37] Z Zhou J Zhao and K Xu ldquoCan online emotions predictthe stock market in Chinardquo in Proceedings of the InternationalConference on Web Information Systems Engineering pp 328ndash342 2016

[38] S Hochreiter and J Schmidhuber ldquoLong short-term memoryrdquoNeural Computation vol 9 no 8 pp 1735ndash1780 1997

[39] Y LeCun L Bottou Y Bengio and P Haffner ldquoGradient-basedlearning applied to document recognitionrdquo Proceedings of theIEEE vol 86 no 11 pp 2278ndash2323 1998

[40] A Arevalo J Nino G Hernandez and J Sandoval ldquoHigh-frequency trading strategy based on deep neural networksrdquoin Proceedings of the International conference on intelligentcomputing pp 424ndash436 2016

[41] K-J Kim ldquoFinancial time series forecasting using supportvector machinesrdquo Neurocomputing vol 55 no 1-2 pp 307ndash3192003

[42] S Madge Predicting Stock Price Direction using SupportVector Machines Independent Work Report Spring 2015

Hindawiwwwhindawicom Volume 2018

MathematicsJournal of

Hindawiwwwhindawicom Volume 2018

Mathematical Problems in Engineering

Applied MathematicsJournal of

Hindawiwwwhindawicom Volume 2018

Probability and StatisticsHindawiwwwhindawicom Volume 2018

Journal of

Hindawiwwwhindawicom Volume 2018

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawiwwwhindawicom Volume 2018

OptimizationJournal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Engineering Mathematics

International Journal of

Hindawiwwwhindawicom Volume 2018

Operations ResearchAdvances in

Journal of

Hindawiwwwhindawicom Volume 2018

Function SpacesAbstract and Applied AnalysisHindawiwwwhindawicom Volume 2018

International Journal of Mathematics and Mathematical Sciences

Hindawiwwwhindawicom Volume 2018

Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom

The Scientific World Journal

Volume 2018

Hindawiwwwhindawicom Volume 2018Volume 2018

Numerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisAdvances inAdvances in Discrete Dynamics in

Nature and SocietyHindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom

Dierential EquationsInternational Journal of

Volume 2018

Hindawiwwwhindawicom Volume 2018

Decision SciencesAdvances in

Hindawiwwwhindawicom Volume 2018

AnalysisInternational Journal of

Hindawiwwwhindawicom Volume 2018

Stochastic AnalysisInternational Journal of

Submit your manuscripts atwwwhindawicom

Page 3: Stock Market Prediction on High-Frequency Data Using Generative Adversarial Netsdownloads.hindawi.com/journals/mpe/2018/4907423.pdf · 2018-11-12 · ResearchArticle Stock Market

Mathematical Problems in Engineering 3

XG

Y Y

YX1 X2 XT

LSTMinternalunit

LSTMinternalunit

LSTMinternalunit

Y1 Y2 YTYT+1

Y1 Y2 YTY1 Y2 YT YT+1

D

Inputsequence

ConvConv Conv FC

FCReal

Predicted

Figure 1 GAN-FD architectureThe generator (119866) is founded on LSTM which applies to predicting 119879+1 The discriminator (119863) is based onCNN for the purpose of estimating the probability whether a sequence is real (Y) or being predicted (Y) Conv means convolutional layerFC is an abbreviation for fully connected layer The structure of 119866 and119863 can be adjusted according to the specific application

LSTM is a basic deep learning model and capable oflearning long-term dependencies A LSTM internal unit iscomposed of a cell an input gate an output gate and aforget gate LSTM internal units have hidden state augmentedwith nonlinear mechanisms to allow state to propagatewithout modification be updated or be reset using simplelearned gating functions LSTM work tremendously well onvarious problems such as natural language text compressionhandwriting recognition and electric load forecasting

CNN is a class of deep feed-forward artificial neural net-works that has successfully been applied to analyzing visualimagery A CNN consists of an input layer and an outputlayer as well as multiple hidden layers The hidden layers of aCNN typically consist of convolutional layers pooling layersfully connected layers and normalization layers CNN alsohas many applications such as image and video recognitionrecommender systems and natural language processing

Although there are a lot of literatures forecast stock priceby using LSTM model to the best of our knowledge thispaper is the first to adopt GAN to predict stock pricesThe experimental part (Section 42) compares the predictionperformances between GAN-FC and LSTM

3 Forecasting with High-Frequency Data

In this section we illuminate the details of the generativeadversarial network framework for stock market forecastingwith high-frequency data

31 Problem Statement Under the high-frequency tradingenvironment high-quality one-step forecasting is usuallyof great concern to algorithmic traders providing signifi-cant information to market makers for risk assessment andmanagement In this article we aim to forecast the pricemovement of individual stocks or the market index one stepahead based solely on their historical price information Ourproblem can be mathematically formalized as follows

Let X119905 represent a set of basic indicators and 119884119905 denotethe closing price of one stock for a 1-minute interval attime 119905 (119905 = 1 2 119879) where 119879 is the maximum lagof time Given the historical basic indicators informationX (X = X1X2 X119879) and the past closing price Y (Y =1198841 1198842 119884119879) our goal is to predict the closing price 119884119879+1for the next 1-minute time interval There are literatures thatexamined the effects of different119879 [7 12 40] but in thiswork

we just set 119879 to 242 because each trading day contains 242-minute intervals in the China stock exchanges

32 Prediction Model The deep architecture of the proposedGAN-FD model is illustrated as in Figure 1 Since the stockdata is a typical time series we choose LSTM model whichis widely applied to time series prediction as the generativemodel 119866 to predict output 119879+1 based on the input data Xthat is

119879+1 = 119866 (X) (1)

The discriminative model 119863 is based on the CNNarchitecture and performs convolution operations on theone-dimensional input sequence in order to estimate theprobability whether a sequence comes from the dataset (Y =1198841 1198842 119884119879 119884119879+1) or being produced by a generativemodel 119866 (Y = 1198841 1198842 119884119879 119879+1)

Our main intuition on why to use an adversarial lossis that it can simulate the operating habits of financialtraders An experienced trader usually predicts stock pricethrough the available indicator data which is the work of thegenerative model 119866 and then judges the correct probabilityof his own forecast with the previous stock price as thediscriminative model119863 does

It is noteworthy that the structure of 119866 and 119863 in GAN-FD can be adjusted according to specific application andthe experimental part in this paper just proposed simple 119866and 119863 framework (Section 42) for stock prediction It isreasonable to believe that fine-tuning the structure of 119866 and119863 can improve the predictive performance

33 Adversarial Training The training of the pair (119866 119863)consists of two alternated steps described below For the sakeof clarity we assume that we use pure SGD (minibatches ofsize 1) but there is no difficulty to generalize the algorithmto minibatches of size 119870 by summing the losses over thesamples

Training 119866 (let (XY) be a sample from the dataset) In ordertomake the discriminativemodel119863 as ldquoconfusedrdquo as possiblethe generative model 119866 should reduce the adversarial loss inthe sense that119863will not discriminate the prediction correctlyClassifying Y into class 1 and Y into class 0 the adversarialloss for 119866 is

119871119866adv (Y) = 119871 sce (119863 (Y) 1) (2)

4 Mathematical Problems in Engineering

where 119871 sce is the sigmoid cross-entropy loss defined as

119871 sce (AB) = minussum119894

119861119894 log (sigmoid (119860 119894))+ (1 minus 119861119894) log (1 minus sigmoid (119860 119894))

(3)

However in practice minimizing adversarial loss alonecannot guarantee satisfying predictions Imagine that119866 couldgenerate samples to ldquoconfuserdquo119863 without being close to 119879+1and then119863will learn to discriminate these samples leading119866to generate other ldquoconfusingrdquo samples and so on To addressthis problem the generative model 119866 ought to decrease theforecast error loss that is 119871119901 loss

119871119901 (Y Y) = 10038171003817100381710038171003817Y minus Y10038171003817100381710038171003817119901 (4)

where 119901 = 1 or 119901 = 2Furthermore as mentioned above stock price direction

prediction is crucial to trading so we define direction pre-diction loss function 119871dpl

119871dpl (Y Y) = 10038161003816100381610038161003816sgn (119879+1 minus 119884119879) minus sgn (119884119879+1 minus 119884119879)10038161003816100381610038161003816 (5)

where sgn represents sign functionCombining all these losses previously defined with differ-

ent parameters 120582adv 120582119901 and 120582dpl we achieve the final loss on119866119871119866 (XY) = 120582adv119871119866adv (Y) + 120582119901119871119901 (Y Y)

+ 120582dpl119871dpl (Y Y) (6)

Then we perform one SGD iteration on 119866 to minimize119871119866(XY) while keeping the weights of119863 fixed

Training 119863 (let (XY) be a different data sample) Since therole of 119863 is just to determine whether the input sequence isY or Y the target loss is equal to the adversarial loss on DWhile keeping the weights of 119866 fixed we perform one SGDstep on119863 to minimize the target loss

119871119863 (XY) = 119871119863adv (Y Y)= 119871 sce (119863 (Y) 0) + 119871 sce (119863 (Y) 1) (7)

We train the generator and discriminator iteratively Theentire process is summarized in Algorithm 1 withminibatch-es of size 119870

(1) Set the learning rates 120588119863 and 120588119866 and parameters120582adv 120582119901 120582dpl(2) Initialize weights119882119863 and119882119866(3) while not converged do(4) Update the generator 119866(5) Get 119870 new data samples (X(1) Y(1)) (X(2)

Y(2)) (X(119870) Y(119870))(6) 119882119866 = 119882119866 minus 120588119866 119870sum

119894

120597119871119866(X(119894)Y(119894))120597119882119866(7) Update the discriminator 119863(8) Get 119870 new data samples (X(1) Y(1)) (X(2)

Y(2)) (X(119870) Y(119870))(9) 119882119863 = 119882119863 minus 120588119863 119870sum

119894

120597119871119863(X(119894)Y(119894))120597119882119863(10) end while

Algorithm 1 Training GAN-FD

4 Experiments

41 Dataset Next we evaluate the performance of the pro-posed method based on the China stock market rangingfrom January 1 2016 to December 31 2016 There are totally244 trading days and each day contains 242-minute intervalscorresponding to 59048 time points These stocks selectedfor the experiment should conform to three criteria firstthey should be the constituent stock of 119862119878119868 300 (the CSI300 is a capitalization-weighted stock market index designedto replicate the performance of 300 stocks traded in theShanghai and Shenzhen stock exchanges) second they werenot suspended during the period we just mentioned in caseaccidental events bring about significant impact on their priceand affect forecast results third their closing prices in thestart time that is January 1 2016 are above 30 to ensurethe volatility for high-frequency exchange This leaves 42stocks in the sample which are listed in Table 1 The numberof increasing directions and decreasing directions for eachstockrsquos closing price per minute is also shown in Table 1 andtheir numbers are relatively close The historical data wasobtained from the Wind Financial Terminal produced byWind Information Inc (the Wind Financial Terminal can bedownloaded from httpwwwwindcomcn)

Many fund managers and investors in the stock marketgenerally accept and use certain criteria for technical indi-cators as the signal of future market trends [12 41] Thiswork selects 13 technical indicators as feature subsets bythe review of domain experts and prior researches that isthe input data X at each moment (eg X119879) consists of 13basic indicators that can be obtained directly from almost alltrading software These basic indicators are listed in Table 2and their parameters are using the default value of the WindFinancial Terminal As mentioned above Y is defined as theclosing price at each moment

Most of the related articles use the traditional datapartitioning method that is the entire dataset is directly splitinto training set and testing set [12 22 40 42] However

Mathematical Problems in Engineering 5

Table 1 The sample stocks and their number of increasing direc-tions and decreasing directions

ID Stock code Increase Decrease1 000156SZ 28927 301202 000432SZ 28879 301683 000783SZ 28310 307374 000938SZ 28537 305105 000963SZ 29192 298556 002007SZ 28933 301147 002027SZ 28623 304248 002153SZ 28566 304819 002183SZ 28795 3025210 002195SZ 28861 3018611 002241SZ 29084 2996312 002241SZ 28737 3031013 002252SZ 28696 3035114 002292SZ 28385 3066215 002304SZ 28914 3013316 002415SZ 29036 3001117 002456SZ 28671 3037618 002475SZ 28837 3021019 002594SZ 28525 3052220 300017SZ 28528 3051921 300024SZ 28411 3063622 300072SZ 28884 3016323 300124SZ 28632 3041524 300146SZ 29137 2991025 600038SH 28428 3061926 600085SH 28856 3019127 600118SH 28456 3059128 600150SH 28537 3051029 600332SH 29174 2987330 600340SH 28773 3027431 600519SH 29118 2992932 600535SH 29013 3003433 600570SH 28053 3099434 600588SH 28483 3056435 600685SH 28627 3042036 600718SH 28881 3016637 600754SH 28307 3074038 600783SH 28680 3036739 601318SH 28979 3006840 601336SH 28643 3040441 601888SH 28919 3012842 603885SH 28817 30230

the trading style of the stock market changes frequentlyfor example investors sometimes prefer stocks with highvolatility and sometimes tend to invest in technology stocksTherefore we should update the model parameters regularlyto adapt to the change of market style In order to makeexperiments closer to real transactions we carry out rolling

Table 2 Basic indicators for prediction

IndicatorsOpening priceMaximum priceMinimum priceTrading volumeTurnoverBiasBollinger bandsDirectional movement indexExponential moving averagesStochastic indexMoving averagesMACDRelative strength index

Dataset

M

M

M

N

N

N

Figure 2 Rolling segmentation on training set and testing set Thegreen bar represents the entire dataset the blue bar represents thetraining set for a round experiment and the yellow bar representsthe corresponding testing set

segmentation on training set and testing set of the experi-mental data As Figure 2 shows in the beginning we selectthe first119872 days as training set and the next119873 days play therole of testing set After the first round of experiments weroll forward the time window for 119873 days that is choosingthe (119873+1)th day to the (119872+119873)th day as training set and the(119872+119873+1)th day to the (119872+2119873)th day as testing set Repeatuntil all the data has been experimented In other words this119873 can be regarded as the model update cycle and119872 is thesize of the corresponding training data

42 Network Architecture Given that the LSTM generatortakes on the role of prediction and requires more accuratecalculations of values than the CNN discriminator we set thelearning rate 120588119866 to 00004 and 120588119863 to 002 The LSTM cell in119866 contains 121 internal (hidden) units and the parametersare initialized following the normal distribution N(0 1)The architecture of discriminative model 119863 is presented inTable 3 We train GAN-FD with 119901 = 2 weighted by 120582adv =120582119901 = 120582dpl = 143 Benchmark Methods To evaluate the performance ofour proposed method we include three baseline meth-ods for comparison The first model is ARIMA (1 1 1)-GARCH(1 1) a fitted ARIMA model that forecasts future

6 Mathematical Problems in Engineering

Table 3 Network architecture of discriminative model 119863Layer ConfigurationConvolution 1 Filter 32 times 4 times 1 strides 2 LReLUConvolution 2 Filter 64 times 4 times 1 strides 2 LReLU BNConvolution 3 Filter 128 times 4 times 1 strides 2 LReLU BNFC 1 128 leaky ReLUFC 2 2 sigmoidOptimizer SGD batch size 121 iterations 10000 LReLU slope 001

Table 4 Summary of RMSRE with different (M N) These figures are the average values over the 42 stocks

119873 = 5 119873 = 10 119873 = 20119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60ARIMA-GARCH 00419 00406 00425 00529 00529 00516 00733 00657 00739ANN 00419 00485 00531 00522 00522 00510 00739 00631 00631SVM 00512 00450 00487 00539 00507 00527 00616 00666 00639GAN-F 00151 00155 00157 00300 00243 00277 00326 00313 00299GAN-D 00422 00304 00503 00625 00419 00405 00514 00598 00420LSTM-FD 00200 00194 00180 00324 00230 00245 00321 00335 00357GAN-FD 00098 00079 00101 00218 00111 00144 00333 00323 00296

values of stock time series and the GARCH model forecastsfuture volatilities [20] The second one is artificial neuralnetworks (ANN) The parameter optimization method andmodel architectural is setting as in [21] except that the inputlayer node is changed to 13 and the network outputs thepredicted value instead of two patterns (0 or 1)The third oneis support vectormachines (SVM)AnRBF kernel is used andthe parameter is setting as in [25]

We also inspect our GAN-FD model from several waysThe GAN-F model is using a GAN architectural for mini-mizing forecast error loss with 120582adv = 120582119901 = 1 and 120582dpl= 0 The GAN-D model is using a GAN architectural forminimizing direction prediction loss with 120582adv = 120582dpl = 1and 120582119901 = 0 The LSTM-FD model is a LSTM model aimingat minimizing forecast error loss and direction predictionloss with 121 internal units in LSTM Obviously the maindifference between LSTM-FD and GAN-FD is the presenceof adversarial training

44 Evaluation Metrics For each stock at each time 119905 aprediction is made for the next time point 119905 + 1 based ona specific method Assume the total number of time pointsbeing tested is 1198790 we used the following criteria to evaluatethe performance of different models

(1) Root Mean Squared Relative Error (RMSRE)

RMSRE = radic 111987901198790sum119905=1

(119905+1 minus 119884119905+1119884119905+1 )2 (8)

RMSRE is employed as an indicator for the predictive poweror prediction agreement A low RMSRE indicates that theprediction agreeswith the real data (the reasonwhy this paperuses RMSRE instead of RMSE is that RMSRE facilitates auniform comparison of the results of 42 stocks)

(2) Direction Prediction Accuracy (DPA)

DPA = 10011987901198790sum119905=1

119868119905 (9)

where

119868119905 = 1 if (119884119905+1 minus 119884119905) (119905+1 minus 119884119905) gt 00 otherwise

(10)

DPA measures the percentage of accuracy relating to theseries trend A high DPA promises more winning trades

45 Results In order to investigate the effect of the modelupdate cycle on the predictive performance let119872 isin 10 2060 and 119873 isin 5 10 20 In China stock exchange market5 10 20 60 days represent one week two weeks onemonth and one quarter

Tables 4 and 5 show the average values of RMSRE andDPAwith different (119872119873)The numbers clearly indicate thatGAN-FD and its related methods perform better than threebaseline methods in terms of RMSRE and DPAThis targetedmethod GAN-F brings some improvement in RMSRE butit does not outperform three baseline methods in DPAContrary to GAN-F GAN-D achieves better results in DPAbut failed in RMSRE LSTM-FD improves the results sinceit combines forecast error loss with direction prediction lossfor training Finally the combination of the forecast error lossdirection prediction loss and adversarial training that isGAN-FD achieves the best RMSRE and DPA in the majorityof scenarios

Let us take a look at the effects of different (M N) on theexperiment GAN-FD obtains the maximum average DPA(06956) and the minimum average RMSRE (00079) when

Mathematical Problems in Engineering 7

Table 5 Summary of DPA with different (M N) These figures are the average values over the 42 stocks

119873 = 5 119873 = 10 119873 = 20119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60ARIMA-GARCH 05464 05479 05264 05280 05315 05245 05007 05214 05296ANN 05456 05978 05738 05473 05629 05575 05205 05280 05394SVM 05715 05490 05839 05377 05514 05576 05147 05144 05318GAN-F 05347 05507 05281 04930 05115 05265 04880 05008 05116GAN-D 06220 06399 06409 06117 06245 06437 05217 05517 05498LSTM-FD 06340 06506 06509 06124 06236 06256 05546 05635 05719GAN-FD 06761 06956 06793 06233 06651 06687 05535 05583 05753

Table 6 The number of times about the minimum RMSRE

119873 = 5 119873 = 10 119873 = 20119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60ARIMA-GARCH 0 0 0 0 0 0 0 0 0ANN 0 0 0 0 0 0 0 0 0SVM 0 0 0 0 0 0 0 0 0GAN-F 11 2 4 6 6 4 13 18 11GAN-D 0 0 0 0 0 0 2 0 7LSTM-FD 0 0 5 6 3 3 16 10 5GAN-FD 31 40 33 30 33 35 11 14 19

Table 7 The number of times about the maximum DPA

119873 = 5 119873 = 10 119873 = 20119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60ARIMA-GARCH 0 0 0 0 0 0 0 6 5ANN 0 0 0 0 0 0 2 0 3SVM 0 0 0 0 0 0 3 1 1GAN-F 0 0 0 0 0 0 0 0 0GAN-D 0 1 6 5 1 7 2 6 2LSTM-FD 1 3 4 11 4 0 18 15 12GAN-FD 41 38 32 26 37 35 17 14 19

(M N) is (20 5) It is interesting to note that all thesemethods work better when 119873 is 5 than when 119873 is 10 or 20with smaller RMSRE and higher DPA This implies that veryshort-term trends are best for predicting the next minutersquosprice Therefore a shorter model update cycle (eg 119873 is 5)is preferred On the other hand for the same 119873 different119872 will bring about some changes to the prediction resultsFrom the experimental results we suggest that119872 should takethe value greater than 119873 This makes intuitive sense If thetraining sample is inadequate it would fail to train themodelespecially in the volatile stockmarketsWe should also noticethat when the training set is small while the testing set islarge (ie (M N) is (10 20)) most of these methods performthe worst and the DPA of these methods are no better thanrandom guessing (ie 50)

Table 6 shows the number of times for each methodto achieve the minimum RMSRE over the 42 stocks It isnoticeable that the results of these three baseline methods areall zero GAN-FDwith its related methods is obviously betterthan these three baseline methods in RMSRE Meanwhile

GAN-FD obtains the minimum RMSRE 246 times account-ing for 6508 in these 378 scenarios (42 stocks and 9 groups(M N)) The best performance appeared when (M N) is (205) with 40 stocksrsquo minimumRMSRE coming fromGAN-FD

Table 7 shows the number of times for each method toachieve the maximum DPA over the 42 stocks Comparedwith the other six methods GAN-FD achieves the maximumDPA 269 times accounting for 7116 in all scenarios When(M N) is (10 5) the maximum DPA of 41 stocks in all 42stocks comes from GAN-FD Even when (M N) is (20 20)that is the worst performance of GAN-FD cases GAN-FDstill obtains maximum DPA in 14 stocks From the aboveanalyses the performance of the GAN-FD is significantlybetter than the other six ways

The results of each representation are reported in Figures3ndash11 We just focus on GAN-FD As shown in Figures 3ndash5the DPA of GAN-FD ranges around 6459ndash7224 when119873is 5 and it slumps to 5201ndash6271 when 119873 is 20 whichis presented in Figures 9ndash11 When 119873 is 5 the RMSRE ofGAN-FD over the 42 stocks varies between 048 and 149

8 Mathematical Problems in Engineering

0 0010203040506070809

DPA

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

00100200300400500600700800901

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 3 DPA and RMSRE of each stock when (M N) is (10 5) and 119909-axis represents the stock ID

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

0

01

02

03

04

05

06

07

08

09

DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

421 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 4 DPA and RMSRE of each stock when (M N) is (20 5) and 119909-axis represents the stock ID

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

0010203040506070809

DPA

000100200300400500600700800901

RMSR

E

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 5 DPA and RMSRE of each stock when (M N) is (60 5) and 119909-axis represents the stock ID

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

0

01

02

03

04

05

06

07

08

09

DPA

001

0

002

003

004

005

006

007

008

009

01

RMSR

E

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

421 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 6 DPA and RMSRE of each stock when (M N) is (10 10) and 119909-axis represents the stock ID

Mathematical Problems in Engineering 9

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

0010203040506070809

DPA

000100200300400500600700800901

RMSR

E

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 7 DPA and RMSRE of each stock when (M N) is (20 10) and 119909-axis represents the stock ID

0

01

02

03

04

05

06

07

08

09

DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 8 DPA and RMSRE of each stock when (M N) is (60 10) and 119909-axis represents the stock ID

0

01

02

03

04

05

06

07

08

09

DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 9 DPA and RMSRE of each stock when (M N) is (10 20) and 119909-axis represents the stock ID

0

01

02

03

04

05

06

07

08

09

DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 10 DPA and RMSRE of each stock when (M N) is (20 20) and 119909-axis represents the stock ID

10 Mathematical Problems in Engineering

0

01

02

03

04

05

06

07

08

09DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 11 DPA and RMSRE of each stock when (M N) is (60 20) and 119909-axis represents the stock ID

which is lower than other six methods in most cases whilethe volatility is smaller However the RMSRE of GAN-FDincreases dramatically and fluctuates violently when119873 is 20and it varies between 121 and 496 This further showsthat we should reduce the model update cycle 119873 and revisethe model parameters regularly to adapt to the change ofmarket style

5 Conclusion

In this paper we propose an easy-to-use stock forecastingmodel called GAN-FD to assist more and more nonfinancialprofessional ordinary investors making decisions GAN-FDadopts 13 simple technical indexes as input data to avoidcomplicated input data preprocessing Based on the deeplearning network thismodel achieves prediction ability supe-rior to other benchmark methods by means of adversarialtraining minimizing direction prediction loss and forecasterror loss Moreover the effects of themodel update cycles onthe predictive capability are analyzed and the experimentalresults show that the smaller model update cycle can obtainbetter prediction performance In the future we will attemptto integrate predictive models under multiscale conditions

Conflicts of Interest

The authors declare that there are no conflicts of interestregarding the publication of this paper

Acknowledgments

This work is supported by the National Key ResearchDevelopment Program of China (2017YFB0802800) andthe National Natural Science Foundation of China (no61473149)

References

[1] R Al-Hmouz W Pedrycz and A Balamash ldquoDescription andprediction of time series a general framework of GranularComputingrdquo Expert Systems with Applications vol 42 no 10pp 4830ndash4839 2015

[2] S Barak and M Modarres ldquoDeveloping an approach to eval-uate stocks by forecasting effective features with data miningmethodsrdquo Expert Systems with Applications vol 42 no 3 pp1325ndash1339 2015

[3] A Booth E Gerding and F McGroarty ldquoAutomated tradingwith performance weighted random forests and seasonalityrdquoExpert Systems with Applications vol 41 no 8 pp 3651ndash36612014

[4] A Bagheri HMohammadi Peyhani andM Akbari ldquoFinancialforecasting usingANFIS networkswithQuantum-behaved Par-ticle Swarm Optimizationrdquo Expert Systems with Applicationsvol 41 no 14 pp 6235ndash6250 2014

[5] Y Son D-J Noh and J Lee ldquoForecasting trends of high-frequency KOSPI200 index data using learning classifiersrdquoExpert Systems with Applications vol 39 no 14 pp 11607ndash116152012

[6] I Aldridge and S Krawciw ldquoReal-Time Risk What InvestorsShould Know About FinTechrdquo in High-Frequency Trading andFlash Crashes JohnWileyamp Sons Inc HobokenNJ USA 2017

[7] F A De Oliveira C N Nobre and L E Zarate ldquoApplyingArtificial Neural Networks to prediction of stock price andimprovement of the directional prediction index - Case studyof PETR4 Petrobras Brazilrdquo Expert Systems with Applicationsvol 40 no 18 pp 7596ndash7606 2013

[8] J H Nino-Pena and G J Hernandez-Perez ldquoPrice directionprediction on high frequency data using deep belief networksrdquoCommunications in Computer and Information Science vol 657pp 74ndash83 2016

[9] A Marszałek and T Burczynrsquoski ldquoModeling and forecastingfinancial time series with ordered fuzzy candlesticksrdquo Informa-tion Sciences vol 273 pp 144ndash155 2014

[10] X Li X Huang X Deng and S Zhu ldquoEnhancing quantitativeintra-day stock return prediction by integrating both marketnews and stock prices informationrdquo Neurocomputing vol 142pp 228ndash238 2014

[11] X Wang S Bao and J Chen ldquoHigh-frequency stock linkageand multi-dimensional stationary processesrdquo Physica A Statis-tical Mechanics and its Applications vol 468 pp 70ndash83 2017

[12] E Chong C Han and F C Park ldquoDeep learning networks forstock market analysis and prediction Methodology data repre-sentations and case studiesrdquo Expert Systems with Applicationsvol 83 pp 187ndash205 2017

[13] I J Goodfellow J Pouget-Abadie M Mirza et al ldquoGenerativeadversarial netsrdquo in Proceedings of the 28th Annual Conference

Mathematical Problems in Engineering 11

on Neural Information Processing Systems 2014 NIPS 2014 pp2672ndash2680 can December 2014

[14] S Iizuka E Simo-Serra and H Ishikawa ldquoGlobally and locallyconsistent image completionrdquo ACM Transactions on Graphicsvol 36 no 4 article no 107 2017

[15] P Luc C Couprie S Chintala and J Verbeek Semanticsegmentation using adversarial networks arXiv preprint arXiv161108408 2016 arXiv161108408

[16] M Mathieu C Couprie and Y LeCun Deep multi-scale videoprediction beyond mean square error arXiv preprint arXiv151105440 2015 arXiv151105440

[17] J D HamiltonTime Series Analysis vol 2 PrincetonUniversityPress 1994

[18] R H Shumway and D S Stoffer Time series analysis and itsapplications Springer Texts in Statistics Springer New YorkNY USA 3rd edition 2011

[19] P J Brockwell and R ADavisTimE SeriesTheory andMethodsSpringer Science amp Business Media 2013

[20] S Pellegrini E Ruiz and A Espasa ldquoPrediction intervalsin conditionally heteroscedastic time series with stochasticcomponentsrdquo International Journal of Forecasting vol 27 no 2pp 308ndash319 2011

[21] Y Kara M Acar Boyacioglu and O K Baykan ldquoPredictingdirection of stock price index movement using artificial neuralnetworks and support vector machines The sample of theIstanbul Stock Exchangerdquo Expert Systems with Applications vol38 no 5 pp 5311ndash5319 2011

[22] M Ghiassi J Skinner andD Zimbra ldquoTwitter brand sentimentanalysis a hybrid system using n-gram analysis and dynamicartificial neural networkrdquo Expert Systems with Applications vol40 no 16 pp 6266ndash6282 2013

[23] M R Hassan ldquoA combination of hidden Markov model andfuzzymodel for stockmarket forecastingrdquoNeurocomputing vol72 no 16-18 pp 3439ndash3446 2009

[24] W Huang Y Nakamori and S-Y Wang ldquoForecasting stockmarket movement direction with support vector machinerdquoComputers ampOperations Research vol 32 no 10 pp 2513ndash25222005

[25] A F S Elsir and H Faris ldquoA Comparison between Regres-sion Artificial Neural Networks and Support Vector Machinesfor Predicting Stock Market Indexrdquo International Journal ofAdvanced Research in Artificial Intelligence vol 4 no 7 2015

[26] R Majhi G Panda G Sahoo A Panda and A ChoubeyldquoPrediction of SampP 500 and DJIA stock indices using particleswarm optimization techniquerdquo in Proceedings of the Proceedingof the IEEE Congress on Evolutionary Computation (CEC rsquo08)pp 1276ndash1282 Hong Kong China June 2008

[27] S S Appadoo Pricing Financial Derivatives with Fuzzy Alge-braic Models ATheoretical and Computational Approach [PhDthesis] University of Manitoba Winnipeg 2006

[28] A Thavaneswaran K Thiagarajah and S S Appadoo ldquoFuzzycoefficient volatility (FCV) models with applicationsrdquo Mathe-matical and Computer Modelling vol 45 no 7-8 pp 777ndash7862007

[29] C Carlsson and R Fuller ldquoOn possibilistic mean value andvariance of fuzzy numbersrdquo Fuzzy Sets and Systems vol 122 no2 pp 315ndash326 2001

[30] A Thavaneswaran S S Appadoo and A Paseka ldquoWeightedpossibilistic moments of fuzzy numbers with applications toGARCH modeling and option pricingrdquo Mathematical andComputer Modelling vol 49 no 1-2 pp 352ndash368 2009

[31] N Srivastava G Hinton A Krizhevsky I Sutskever and RSalakhutdinov ldquoDropout a simple way to prevent neural net-works from overfittingrdquo Journal of Machine Learning Researchvol 15 no 1 pp 1929ndash1958 2014

[32] A M Rather A Agarwal and V N Sastry ldquoRecurrent neuralnetwork and a hybrid model for prediction of stock returnsrdquoExpert Systems with Applications vol 42 no 6 pp 3234ndash32412015

[33] R D A Araujo A L I Oliveira and S Meira ldquoA hybrid modelfor high-frequency stock market forecastingrdquo Expert Systemswith Applications vol 42 no 8 pp 4081ndash4096 2015

[34] H Chen K Xiao J Sun and S Wu ldquoA double-layer neu-ral network framework for high-frequency forecastingrdquo ACMTransactions on Management Information Systems (TMIS) vol7 no 4 article no 11 2017

[35] A Yoshihara K Fujikawa K Seki and K Uehara ldquoPredictingStock Market Trends by Recurrent Deep Neural Networksrdquo inPRICAI 2014 Trends inArtificial Intelligence vol 8862 ofLectureNotes in Computer Science pp 759ndash769 Springer InternationalPublishing Cham 2014

[36] XDing Y Zhang T Liu and J Duan ldquoDeep learning for event-driven stock predictionrdquo in Proceedings of the 24th InternationalJoint Conference on Artificial Intelligence IJCAI 2015 pp 2327ndash2333 arg July 2015

[37] Z Zhou J Zhao and K Xu ldquoCan online emotions predictthe stock market in Chinardquo in Proceedings of the InternationalConference on Web Information Systems Engineering pp 328ndash342 2016

[38] S Hochreiter and J Schmidhuber ldquoLong short-term memoryrdquoNeural Computation vol 9 no 8 pp 1735ndash1780 1997

[39] Y LeCun L Bottou Y Bengio and P Haffner ldquoGradient-basedlearning applied to document recognitionrdquo Proceedings of theIEEE vol 86 no 11 pp 2278ndash2323 1998

[40] A Arevalo J Nino G Hernandez and J Sandoval ldquoHigh-frequency trading strategy based on deep neural networksrdquoin Proceedings of the International conference on intelligentcomputing pp 424ndash436 2016

[41] K-J Kim ldquoFinancial time series forecasting using supportvector machinesrdquo Neurocomputing vol 55 no 1-2 pp 307ndash3192003

[42] S Madge Predicting Stock Price Direction using SupportVector Machines Independent Work Report Spring 2015

Hindawiwwwhindawicom Volume 2018

MathematicsJournal of

Hindawiwwwhindawicom Volume 2018

Mathematical Problems in Engineering

Applied MathematicsJournal of

Hindawiwwwhindawicom Volume 2018

Probability and StatisticsHindawiwwwhindawicom Volume 2018

Journal of

Hindawiwwwhindawicom Volume 2018

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawiwwwhindawicom Volume 2018

OptimizationJournal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Engineering Mathematics

International Journal of

Hindawiwwwhindawicom Volume 2018

Operations ResearchAdvances in

Journal of

Hindawiwwwhindawicom Volume 2018

Function SpacesAbstract and Applied AnalysisHindawiwwwhindawicom Volume 2018

International Journal of Mathematics and Mathematical Sciences

Hindawiwwwhindawicom Volume 2018

Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom

The Scientific World Journal

Volume 2018

Hindawiwwwhindawicom Volume 2018Volume 2018

Numerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisAdvances inAdvances in Discrete Dynamics in

Nature and SocietyHindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom

Dierential EquationsInternational Journal of

Volume 2018

Hindawiwwwhindawicom Volume 2018

Decision SciencesAdvances in

Hindawiwwwhindawicom Volume 2018

AnalysisInternational Journal of

Hindawiwwwhindawicom Volume 2018

Stochastic AnalysisInternational Journal of

Submit your manuscripts atwwwhindawicom

Page 4: Stock Market Prediction on High-Frequency Data Using Generative Adversarial Netsdownloads.hindawi.com/journals/mpe/2018/4907423.pdf · 2018-11-12 · ResearchArticle Stock Market

4 Mathematical Problems in Engineering

where 119871 sce is the sigmoid cross-entropy loss defined as

119871 sce (AB) = minussum119894

119861119894 log (sigmoid (119860 119894))+ (1 minus 119861119894) log (1 minus sigmoid (119860 119894))

(3)

However in practice minimizing adversarial loss alonecannot guarantee satisfying predictions Imagine that119866 couldgenerate samples to ldquoconfuserdquo119863 without being close to 119879+1and then119863will learn to discriminate these samples leading119866to generate other ldquoconfusingrdquo samples and so on To addressthis problem the generative model 119866 ought to decrease theforecast error loss that is 119871119901 loss

119871119901 (Y Y) = 10038171003817100381710038171003817Y minus Y10038171003817100381710038171003817119901 (4)

where 119901 = 1 or 119901 = 2Furthermore as mentioned above stock price direction

prediction is crucial to trading so we define direction pre-diction loss function 119871dpl

119871dpl (Y Y) = 10038161003816100381610038161003816sgn (119879+1 minus 119884119879) minus sgn (119884119879+1 minus 119884119879)10038161003816100381610038161003816 (5)

where sgn represents sign functionCombining all these losses previously defined with differ-

ent parameters 120582adv 120582119901 and 120582dpl we achieve the final loss on119866119871119866 (XY) = 120582adv119871119866adv (Y) + 120582119901119871119901 (Y Y)

+ 120582dpl119871dpl (Y Y) (6)

Then we perform one SGD iteration on 119866 to minimize119871119866(XY) while keeping the weights of119863 fixed

Training 119863 (let (XY) be a different data sample) Since therole of 119863 is just to determine whether the input sequence isY or Y the target loss is equal to the adversarial loss on DWhile keeping the weights of 119866 fixed we perform one SGDstep on119863 to minimize the target loss

119871119863 (XY) = 119871119863adv (Y Y)= 119871 sce (119863 (Y) 0) + 119871 sce (119863 (Y) 1) (7)

We train the generator and discriminator iteratively Theentire process is summarized in Algorithm 1 withminibatch-es of size 119870

(1) Set the learning rates 120588119863 and 120588119866 and parameters120582adv 120582119901 120582dpl(2) Initialize weights119882119863 and119882119866(3) while not converged do(4) Update the generator 119866(5) Get 119870 new data samples (X(1) Y(1)) (X(2)

Y(2)) (X(119870) Y(119870))(6) 119882119866 = 119882119866 minus 120588119866 119870sum

119894

120597119871119866(X(119894)Y(119894))120597119882119866(7) Update the discriminator 119863(8) Get 119870 new data samples (X(1) Y(1)) (X(2)

Y(2)) (X(119870) Y(119870))(9) 119882119863 = 119882119863 minus 120588119863 119870sum

119894

120597119871119863(X(119894)Y(119894))120597119882119863(10) end while

Algorithm 1 Training GAN-FD

4 Experiments

41 Dataset Next we evaluate the performance of the pro-posed method based on the China stock market rangingfrom January 1 2016 to December 31 2016 There are totally244 trading days and each day contains 242-minute intervalscorresponding to 59048 time points These stocks selectedfor the experiment should conform to three criteria firstthey should be the constituent stock of 119862119878119868 300 (the CSI300 is a capitalization-weighted stock market index designedto replicate the performance of 300 stocks traded in theShanghai and Shenzhen stock exchanges) second they werenot suspended during the period we just mentioned in caseaccidental events bring about significant impact on their priceand affect forecast results third their closing prices in thestart time that is January 1 2016 are above 30 to ensurethe volatility for high-frequency exchange This leaves 42stocks in the sample which are listed in Table 1 The numberof increasing directions and decreasing directions for eachstockrsquos closing price per minute is also shown in Table 1 andtheir numbers are relatively close The historical data wasobtained from the Wind Financial Terminal produced byWind Information Inc (the Wind Financial Terminal can bedownloaded from httpwwwwindcomcn)

Many fund managers and investors in the stock marketgenerally accept and use certain criteria for technical indi-cators as the signal of future market trends [12 41] Thiswork selects 13 technical indicators as feature subsets bythe review of domain experts and prior researches that isthe input data X at each moment (eg X119879) consists of 13basic indicators that can be obtained directly from almost alltrading software These basic indicators are listed in Table 2and their parameters are using the default value of the WindFinancial Terminal As mentioned above Y is defined as theclosing price at each moment

Most of the related articles use the traditional datapartitioning method that is the entire dataset is directly splitinto training set and testing set [12 22 40 42] However

Mathematical Problems in Engineering 5

Table 1 The sample stocks and their number of increasing direc-tions and decreasing directions

ID Stock code Increase Decrease1 000156SZ 28927 301202 000432SZ 28879 301683 000783SZ 28310 307374 000938SZ 28537 305105 000963SZ 29192 298556 002007SZ 28933 301147 002027SZ 28623 304248 002153SZ 28566 304819 002183SZ 28795 3025210 002195SZ 28861 3018611 002241SZ 29084 2996312 002241SZ 28737 3031013 002252SZ 28696 3035114 002292SZ 28385 3066215 002304SZ 28914 3013316 002415SZ 29036 3001117 002456SZ 28671 3037618 002475SZ 28837 3021019 002594SZ 28525 3052220 300017SZ 28528 3051921 300024SZ 28411 3063622 300072SZ 28884 3016323 300124SZ 28632 3041524 300146SZ 29137 2991025 600038SH 28428 3061926 600085SH 28856 3019127 600118SH 28456 3059128 600150SH 28537 3051029 600332SH 29174 2987330 600340SH 28773 3027431 600519SH 29118 2992932 600535SH 29013 3003433 600570SH 28053 3099434 600588SH 28483 3056435 600685SH 28627 3042036 600718SH 28881 3016637 600754SH 28307 3074038 600783SH 28680 3036739 601318SH 28979 3006840 601336SH 28643 3040441 601888SH 28919 3012842 603885SH 28817 30230

the trading style of the stock market changes frequentlyfor example investors sometimes prefer stocks with highvolatility and sometimes tend to invest in technology stocksTherefore we should update the model parameters regularlyto adapt to the change of market style In order to makeexperiments closer to real transactions we carry out rolling

Table 2 Basic indicators for prediction

IndicatorsOpening priceMaximum priceMinimum priceTrading volumeTurnoverBiasBollinger bandsDirectional movement indexExponential moving averagesStochastic indexMoving averagesMACDRelative strength index

Dataset

M

M

M

N

N

N

Figure 2 Rolling segmentation on training set and testing set Thegreen bar represents the entire dataset the blue bar represents thetraining set for a round experiment and the yellow bar representsthe corresponding testing set

segmentation on training set and testing set of the experi-mental data As Figure 2 shows in the beginning we selectthe first119872 days as training set and the next119873 days play therole of testing set After the first round of experiments weroll forward the time window for 119873 days that is choosingthe (119873+1)th day to the (119872+119873)th day as training set and the(119872+119873+1)th day to the (119872+2119873)th day as testing set Repeatuntil all the data has been experimented In other words this119873 can be regarded as the model update cycle and119872 is thesize of the corresponding training data

42 Network Architecture Given that the LSTM generatortakes on the role of prediction and requires more accuratecalculations of values than the CNN discriminator we set thelearning rate 120588119866 to 00004 and 120588119863 to 002 The LSTM cell in119866 contains 121 internal (hidden) units and the parametersare initialized following the normal distribution N(0 1)The architecture of discriminative model 119863 is presented inTable 3 We train GAN-FD with 119901 = 2 weighted by 120582adv =120582119901 = 120582dpl = 143 Benchmark Methods To evaluate the performance ofour proposed method we include three baseline meth-ods for comparison The first model is ARIMA (1 1 1)-GARCH(1 1) a fitted ARIMA model that forecasts future

6 Mathematical Problems in Engineering

Table 3 Network architecture of discriminative model 119863Layer ConfigurationConvolution 1 Filter 32 times 4 times 1 strides 2 LReLUConvolution 2 Filter 64 times 4 times 1 strides 2 LReLU BNConvolution 3 Filter 128 times 4 times 1 strides 2 LReLU BNFC 1 128 leaky ReLUFC 2 2 sigmoidOptimizer SGD batch size 121 iterations 10000 LReLU slope 001

Table 4 Summary of RMSRE with different (M N) These figures are the average values over the 42 stocks

119873 = 5 119873 = 10 119873 = 20119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60ARIMA-GARCH 00419 00406 00425 00529 00529 00516 00733 00657 00739ANN 00419 00485 00531 00522 00522 00510 00739 00631 00631SVM 00512 00450 00487 00539 00507 00527 00616 00666 00639GAN-F 00151 00155 00157 00300 00243 00277 00326 00313 00299GAN-D 00422 00304 00503 00625 00419 00405 00514 00598 00420LSTM-FD 00200 00194 00180 00324 00230 00245 00321 00335 00357GAN-FD 00098 00079 00101 00218 00111 00144 00333 00323 00296

values of stock time series and the GARCH model forecastsfuture volatilities [20] The second one is artificial neuralnetworks (ANN) The parameter optimization method andmodel architectural is setting as in [21] except that the inputlayer node is changed to 13 and the network outputs thepredicted value instead of two patterns (0 or 1)The third oneis support vectormachines (SVM)AnRBF kernel is used andthe parameter is setting as in [25]

We also inspect our GAN-FD model from several waysThe GAN-F model is using a GAN architectural for mini-mizing forecast error loss with 120582adv = 120582119901 = 1 and 120582dpl= 0 The GAN-D model is using a GAN architectural forminimizing direction prediction loss with 120582adv = 120582dpl = 1and 120582119901 = 0 The LSTM-FD model is a LSTM model aimingat minimizing forecast error loss and direction predictionloss with 121 internal units in LSTM Obviously the maindifference between LSTM-FD and GAN-FD is the presenceof adversarial training

44 Evaluation Metrics For each stock at each time 119905 aprediction is made for the next time point 119905 + 1 based ona specific method Assume the total number of time pointsbeing tested is 1198790 we used the following criteria to evaluatethe performance of different models

(1) Root Mean Squared Relative Error (RMSRE)

RMSRE = radic 111987901198790sum119905=1

(119905+1 minus 119884119905+1119884119905+1 )2 (8)

RMSRE is employed as an indicator for the predictive poweror prediction agreement A low RMSRE indicates that theprediction agreeswith the real data (the reasonwhy this paperuses RMSRE instead of RMSE is that RMSRE facilitates auniform comparison of the results of 42 stocks)

(2) Direction Prediction Accuracy (DPA)

DPA = 10011987901198790sum119905=1

119868119905 (9)

where

119868119905 = 1 if (119884119905+1 minus 119884119905) (119905+1 minus 119884119905) gt 00 otherwise

(10)

DPA measures the percentage of accuracy relating to theseries trend A high DPA promises more winning trades

45 Results In order to investigate the effect of the modelupdate cycle on the predictive performance let119872 isin 10 2060 and 119873 isin 5 10 20 In China stock exchange market5 10 20 60 days represent one week two weeks onemonth and one quarter

Tables 4 and 5 show the average values of RMSRE andDPAwith different (119872119873)The numbers clearly indicate thatGAN-FD and its related methods perform better than threebaseline methods in terms of RMSRE and DPAThis targetedmethod GAN-F brings some improvement in RMSRE butit does not outperform three baseline methods in DPAContrary to GAN-F GAN-D achieves better results in DPAbut failed in RMSRE LSTM-FD improves the results sinceit combines forecast error loss with direction prediction lossfor training Finally the combination of the forecast error lossdirection prediction loss and adversarial training that isGAN-FD achieves the best RMSRE and DPA in the majorityof scenarios

Let us take a look at the effects of different (M N) on theexperiment GAN-FD obtains the maximum average DPA(06956) and the minimum average RMSRE (00079) when

Mathematical Problems in Engineering 7

Table 5 Summary of DPA with different (M N) These figures are the average values over the 42 stocks

119873 = 5 119873 = 10 119873 = 20119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60ARIMA-GARCH 05464 05479 05264 05280 05315 05245 05007 05214 05296ANN 05456 05978 05738 05473 05629 05575 05205 05280 05394SVM 05715 05490 05839 05377 05514 05576 05147 05144 05318GAN-F 05347 05507 05281 04930 05115 05265 04880 05008 05116GAN-D 06220 06399 06409 06117 06245 06437 05217 05517 05498LSTM-FD 06340 06506 06509 06124 06236 06256 05546 05635 05719GAN-FD 06761 06956 06793 06233 06651 06687 05535 05583 05753

Table 6 The number of times about the minimum RMSRE

119873 = 5 119873 = 10 119873 = 20119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60ARIMA-GARCH 0 0 0 0 0 0 0 0 0ANN 0 0 0 0 0 0 0 0 0SVM 0 0 0 0 0 0 0 0 0GAN-F 11 2 4 6 6 4 13 18 11GAN-D 0 0 0 0 0 0 2 0 7LSTM-FD 0 0 5 6 3 3 16 10 5GAN-FD 31 40 33 30 33 35 11 14 19

Table 7 The number of times about the maximum DPA

119873 = 5 119873 = 10 119873 = 20119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60ARIMA-GARCH 0 0 0 0 0 0 0 6 5ANN 0 0 0 0 0 0 2 0 3SVM 0 0 0 0 0 0 3 1 1GAN-F 0 0 0 0 0 0 0 0 0GAN-D 0 1 6 5 1 7 2 6 2LSTM-FD 1 3 4 11 4 0 18 15 12GAN-FD 41 38 32 26 37 35 17 14 19

(M N) is (20 5) It is interesting to note that all thesemethods work better when 119873 is 5 than when 119873 is 10 or 20with smaller RMSRE and higher DPA This implies that veryshort-term trends are best for predicting the next minutersquosprice Therefore a shorter model update cycle (eg 119873 is 5)is preferred On the other hand for the same 119873 different119872 will bring about some changes to the prediction resultsFrom the experimental results we suggest that119872 should takethe value greater than 119873 This makes intuitive sense If thetraining sample is inadequate it would fail to train themodelespecially in the volatile stockmarketsWe should also noticethat when the training set is small while the testing set islarge (ie (M N) is (10 20)) most of these methods performthe worst and the DPA of these methods are no better thanrandom guessing (ie 50)

Table 6 shows the number of times for each methodto achieve the minimum RMSRE over the 42 stocks It isnoticeable that the results of these three baseline methods areall zero GAN-FDwith its related methods is obviously betterthan these three baseline methods in RMSRE Meanwhile

GAN-FD obtains the minimum RMSRE 246 times account-ing for 6508 in these 378 scenarios (42 stocks and 9 groups(M N)) The best performance appeared when (M N) is (205) with 40 stocksrsquo minimumRMSRE coming fromGAN-FD

Table 7 shows the number of times for each method toachieve the maximum DPA over the 42 stocks Comparedwith the other six methods GAN-FD achieves the maximumDPA 269 times accounting for 7116 in all scenarios When(M N) is (10 5) the maximum DPA of 41 stocks in all 42stocks comes from GAN-FD Even when (M N) is (20 20)that is the worst performance of GAN-FD cases GAN-FDstill obtains maximum DPA in 14 stocks From the aboveanalyses the performance of the GAN-FD is significantlybetter than the other six ways

The results of each representation are reported in Figures3ndash11 We just focus on GAN-FD As shown in Figures 3ndash5the DPA of GAN-FD ranges around 6459ndash7224 when119873is 5 and it slumps to 5201ndash6271 when 119873 is 20 whichis presented in Figures 9ndash11 When 119873 is 5 the RMSRE ofGAN-FD over the 42 stocks varies between 048 and 149

8 Mathematical Problems in Engineering

0 0010203040506070809

DPA

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

00100200300400500600700800901

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 3 DPA and RMSRE of each stock when (M N) is (10 5) and 119909-axis represents the stock ID

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

0

01

02

03

04

05

06

07

08

09

DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

421 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 4 DPA and RMSRE of each stock when (M N) is (20 5) and 119909-axis represents the stock ID

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

0010203040506070809

DPA

000100200300400500600700800901

RMSR

E

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 5 DPA and RMSRE of each stock when (M N) is (60 5) and 119909-axis represents the stock ID

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

0

01

02

03

04

05

06

07

08

09

DPA

001

0

002

003

004

005

006

007

008

009

01

RMSR

E

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

421 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 6 DPA and RMSRE of each stock when (M N) is (10 10) and 119909-axis represents the stock ID

Mathematical Problems in Engineering 9

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

0010203040506070809

DPA

000100200300400500600700800901

RMSR

E

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 7 DPA and RMSRE of each stock when (M N) is (20 10) and 119909-axis represents the stock ID

0

01

02

03

04

05

06

07

08

09

DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 8 DPA and RMSRE of each stock when (M N) is (60 10) and 119909-axis represents the stock ID

0

01

02

03

04

05

06

07

08

09

DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 9 DPA and RMSRE of each stock when (M N) is (10 20) and 119909-axis represents the stock ID

0

01

02

03

04

05

06

07

08

09

DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 10 DPA and RMSRE of each stock when (M N) is (20 20) and 119909-axis represents the stock ID

10 Mathematical Problems in Engineering

0

01

02

03

04

05

06

07

08

09DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 11 DPA and RMSRE of each stock when (M N) is (60 20) and 119909-axis represents the stock ID

which is lower than other six methods in most cases whilethe volatility is smaller However the RMSRE of GAN-FDincreases dramatically and fluctuates violently when119873 is 20and it varies between 121 and 496 This further showsthat we should reduce the model update cycle 119873 and revisethe model parameters regularly to adapt to the change ofmarket style

5 Conclusion

In this paper we propose an easy-to-use stock forecastingmodel called GAN-FD to assist more and more nonfinancialprofessional ordinary investors making decisions GAN-FDadopts 13 simple technical indexes as input data to avoidcomplicated input data preprocessing Based on the deeplearning network thismodel achieves prediction ability supe-rior to other benchmark methods by means of adversarialtraining minimizing direction prediction loss and forecasterror loss Moreover the effects of themodel update cycles onthe predictive capability are analyzed and the experimentalresults show that the smaller model update cycle can obtainbetter prediction performance In the future we will attemptto integrate predictive models under multiscale conditions

Conflicts of Interest

The authors declare that there are no conflicts of interestregarding the publication of this paper

Acknowledgments

This work is supported by the National Key ResearchDevelopment Program of China (2017YFB0802800) andthe National Natural Science Foundation of China (no61473149)

References

[1] R Al-Hmouz W Pedrycz and A Balamash ldquoDescription andprediction of time series a general framework of GranularComputingrdquo Expert Systems with Applications vol 42 no 10pp 4830ndash4839 2015

[2] S Barak and M Modarres ldquoDeveloping an approach to eval-uate stocks by forecasting effective features with data miningmethodsrdquo Expert Systems with Applications vol 42 no 3 pp1325ndash1339 2015

[3] A Booth E Gerding and F McGroarty ldquoAutomated tradingwith performance weighted random forests and seasonalityrdquoExpert Systems with Applications vol 41 no 8 pp 3651ndash36612014

[4] A Bagheri HMohammadi Peyhani andM Akbari ldquoFinancialforecasting usingANFIS networkswithQuantum-behaved Par-ticle Swarm Optimizationrdquo Expert Systems with Applicationsvol 41 no 14 pp 6235ndash6250 2014

[5] Y Son D-J Noh and J Lee ldquoForecasting trends of high-frequency KOSPI200 index data using learning classifiersrdquoExpert Systems with Applications vol 39 no 14 pp 11607ndash116152012

[6] I Aldridge and S Krawciw ldquoReal-Time Risk What InvestorsShould Know About FinTechrdquo in High-Frequency Trading andFlash Crashes JohnWileyamp Sons Inc HobokenNJ USA 2017

[7] F A De Oliveira C N Nobre and L E Zarate ldquoApplyingArtificial Neural Networks to prediction of stock price andimprovement of the directional prediction index - Case studyof PETR4 Petrobras Brazilrdquo Expert Systems with Applicationsvol 40 no 18 pp 7596ndash7606 2013

[8] J H Nino-Pena and G J Hernandez-Perez ldquoPrice directionprediction on high frequency data using deep belief networksrdquoCommunications in Computer and Information Science vol 657pp 74ndash83 2016

[9] A Marszałek and T Burczynrsquoski ldquoModeling and forecastingfinancial time series with ordered fuzzy candlesticksrdquo Informa-tion Sciences vol 273 pp 144ndash155 2014

[10] X Li X Huang X Deng and S Zhu ldquoEnhancing quantitativeintra-day stock return prediction by integrating both marketnews and stock prices informationrdquo Neurocomputing vol 142pp 228ndash238 2014

[11] X Wang S Bao and J Chen ldquoHigh-frequency stock linkageand multi-dimensional stationary processesrdquo Physica A Statis-tical Mechanics and its Applications vol 468 pp 70ndash83 2017

[12] E Chong C Han and F C Park ldquoDeep learning networks forstock market analysis and prediction Methodology data repre-sentations and case studiesrdquo Expert Systems with Applicationsvol 83 pp 187ndash205 2017

[13] I J Goodfellow J Pouget-Abadie M Mirza et al ldquoGenerativeadversarial netsrdquo in Proceedings of the 28th Annual Conference

Mathematical Problems in Engineering 11

on Neural Information Processing Systems 2014 NIPS 2014 pp2672ndash2680 can December 2014

[14] S Iizuka E Simo-Serra and H Ishikawa ldquoGlobally and locallyconsistent image completionrdquo ACM Transactions on Graphicsvol 36 no 4 article no 107 2017

[15] P Luc C Couprie S Chintala and J Verbeek Semanticsegmentation using adversarial networks arXiv preprint arXiv161108408 2016 arXiv161108408

[16] M Mathieu C Couprie and Y LeCun Deep multi-scale videoprediction beyond mean square error arXiv preprint arXiv151105440 2015 arXiv151105440

[17] J D HamiltonTime Series Analysis vol 2 PrincetonUniversityPress 1994

[18] R H Shumway and D S Stoffer Time series analysis and itsapplications Springer Texts in Statistics Springer New YorkNY USA 3rd edition 2011

[19] P J Brockwell and R ADavisTimE SeriesTheory andMethodsSpringer Science amp Business Media 2013

[20] S Pellegrini E Ruiz and A Espasa ldquoPrediction intervalsin conditionally heteroscedastic time series with stochasticcomponentsrdquo International Journal of Forecasting vol 27 no 2pp 308ndash319 2011

[21] Y Kara M Acar Boyacioglu and O K Baykan ldquoPredictingdirection of stock price index movement using artificial neuralnetworks and support vector machines The sample of theIstanbul Stock Exchangerdquo Expert Systems with Applications vol38 no 5 pp 5311ndash5319 2011

[22] M Ghiassi J Skinner andD Zimbra ldquoTwitter brand sentimentanalysis a hybrid system using n-gram analysis and dynamicartificial neural networkrdquo Expert Systems with Applications vol40 no 16 pp 6266ndash6282 2013

[23] M R Hassan ldquoA combination of hidden Markov model andfuzzymodel for stockmarket forecastingrdquoNeurocomputing vol72 no 16-18 pp 3439ndash3446 2009

[24] W Huang Y Nakamori and S-Y Wang ldquoForecasting stockmarket movement direction with support vector machinerdquoComputers ampOperations Research vol 32 no 10 pp 2513ndash25222005

[25] A F S Elsir and H Faris ldquoA Comparison between Regres-sion Artificial Neural Networks and Support Vector Machinesfor Predicting Stock Market Indexrdquo International Journal ofAdvanced Research in Artificial Intelligence vol 4 no 7 2015

[26] R Majhi G Panda G Sahoo A Panda and A ChoubeyldquoPrediction of SampP 500 and DJIA stock indices using particleswarm optimization techniquerdquo in Proceedings of the Proceedingof the IEEE Congress on Evolutionary Computation (CEC rsquo08)pp 1276ndash1282 Hong Kong China June 2008

[27] S S Appadoo Pricing Financial Derivatives with Fuzzy Alge-braic Models ATheoretical and Computational Approach [PhDthesis] University of Manitoba Winnipeg 2006

[28] A Thavaneswaran K Thiagarajah and S S Appadoo ldquoFuzzycoefficient volatility (FCV) models with applicationsrdquo Mathe-matical and Computer Modelling vol 45 no 7-8 pp 777ndash7862007

[29] C Carlsson and R Fuller ldquoOn possibilistic mean value andvariance of fuzzy numbersrdquo Fuzzy Sets and Systems vol 122 no2 pp 315ndash326 2001

[30] A Thavaneswaran S S Appadoo and A Paseka ldquoWeightedpossibilistic moments of fuzzy numbers with applications toGARCH modeling and option pricingrdquo Mathematical andComputer Modelling vol 49 no 1-2 pp 352ndash368 2009

[31] N Srivastava G Hinton A Krizhevsky I Sutskever and RSalakhutdinov ldquoDropout a simple way to prevent neural net-works from overfittingrdquo Journal of Machine Learning Researchvol 15 no 1 pp 1929ndash1958 2014

[32] A M Rather A Agarwal and V N Sastry ldquoRecurrent neuralnetwork and a hybrid model for prediction of stock returnsrdquoExpert Systems with Applications vol 42 no 6 pp 3234ndash32412015

[33] R D A Araujo A L I Oliveira and S Meira ldquoA hybrid modelfor high-frequency stock market forecastingrdquo Expert Systemswith Applications vol 42 no 8 pp 4081ndash4096 2015

[34] H Chen K Xiao J Sun and S Wu ldquoA double-layer neu-ral network framework for high-frequency forecastingrdquo ACMTransactions on Management Information Systems (TMIS) vol7 no 4 article no 11 2017

[35] A Yoshihara K Fujikawa K Seki and K Uehara ldquoPredictingStock Market Trends by Recurrent Deep Neural Networksrdquo inPRICAI 2014 Trends inArtificial Intelligence vol 8862 ofLectureNotes in Computer Science pp 759ndash769 Springer InternationalPublishing Cham 2014

[36] XDing Y Zhang T Liu and J Duan ldquoDeep learning for event-driven stock predictionrdquo in Proceedings of the 24th InternationalJoint Conference on Artificial Intelligence IJCAI 2015 pp 2327ndash2333 arg July 2015

[37] Z Zhou J Zhao and K Xu ldquoCan online emotions predictthe stock market in Chinardquo in Proceedings of the InternationalConference on Web Information Systems Engineering pp 328ndash342 2016

[38] S Hochreiter and J Schmidhuber ldquoLong short-term memoryrdquoNeural Computation vol 9 no 8 pp 1735ndash1780 1997

[39] Y LeCun L Bottou Y Bengio and P Haffner ldquoGradient-basedlearning applied to document recognitionrdquo Proceedings of theIEEE vol 86 no 11 pp 2278ndash2323 1998

[40] A Arevalo J Nino G Hernandez and J Sandoval ldquoHigh-frequency trading strategy based on deep neural networksrdquoin Proceedings of the International conference on intelligentcomputing pp 424ndash436 2016

[41] K-J Kim ldquoFinancial time series forecasting using supportvector machinesrdquo Neurocomputing vol 55 no 1-2 pp 307ndash3192003

[42] S Madge Predicting Stock Price Direction using SupportVector Machines Independent Work Report Spring 2015

Hindawiwwwhindawicom Volume 2018

MathematicsJournal of

Hindawiwwwhindawicom Volume 2018

Mathematical Problems in Engineering

Applied MathematicsJournal of

Hindawiwwwhindawicom Volume 2018

Probability and StatisticsHindawiwwwhindawicom Volume 2018

Journal of

Hindawiwwwhindawicom Volume 2018

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawiwwwhindawicom Volume 2018

OptimizationJournal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Engineering Mathematics

International Journal of

Hindawiwwwhindawicom Volume 2018

Operations ResearchAdvances in

Journal of

Hindawiwwwhindawicom Volume 2018

Function SpacesAbstract and Applied AnalysisHindawiwwwhindawicom Volume 2018

International Journal of Mathematics and Mathematical Sciences

Hindawiwwwhindawicom Volume 2018

Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom

The Scientific World Journal

Volume 2018

Hindawiwwwhindawicom Volume 2018Volume 2018

Numerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisAdvances inAdvances in Discrete Dynamics in

Nature and SocietyHindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom

Dierential EquationsInternational Journal of

Volume 2018

Hindawiwwwhindawicom Volume 2018

Decision SciencesAdvances in

Hindawiwwwhindawicom Volume 2018

AnalysisInternational Journal of

Hindawiwwwhindawicom Volume 2018

Stochastic AnalysisInternational Journal of

Submit your manuscripts atwwwhindawicom

Page 5: Stock Market Prediction on High-Frequency Data Using Generative Adversarial Netsdownloads.hindawi.com/journals/mpe/2018/4907423.pdf · 2018-11-12 · ResearchArticle Stock Market

Mathematical Problems in Engineering 5

Table 1 The sample stocks and their number of increasing direc-tions and decreasing directions

ID Stock code Increase Decrease1 000156SZ 28927 301202 000432SZ 28879 301683 000783SZ 28310 307374 000938SZ 28537 305105 000963SZ 29192 298556 002007SZ 28933 301147 002027SZ 28623 304248 002153SZ 28566 304819 002183SZ 28795 3025210 002195SZ 28861 3018611 002241SZ 29084 2996312 002241SZ 28737 3031013 002252SZ 28696 3035114 002292SZ 28385 3066215 002304SZ 28914 3013316 002415SZ 29036 3001117 002456SZ 28671 3037618 002475SZ 28837 3021019 002594SZ 28525 3052220 300017SZ 28528 3051921 300024SZ 28411 3063622 300072SZ 28884 3016323 300124SZ 28632 3041524 300146SZ 29137 2991025 600038SH 28428 3061926 600085SH 28856 3019127 600118SH 28456 3059128 600150SH 28537 3051029 600332SH 29174 2987330 600340SH 28773 3027431 600519SH 29118 2992932 600535SH 29013 3003433 600570SH 28053 3099434 600588SH 28483 3056435 600685SH 28627 3042036 600718SH 28881 3016637 600754SH 28307 3074038 600783SH 28680 3036739 601318SH 28979 3006840 601336SH 28643 3040441 601888SH 28919 3012842 603885SH 28817 30230

the trading style of the stock market changes frequentlyfor example investors sometimes prefer stocks with highvolatility and sometimes tend to invest in technology stocksTherefore we should update the model parameters regularlyto adapt to the change of market style In order to makeexperiments closer to real transactions we carry out rolling

Table 2 Basic indicators for prediction

IndicatorsOpening priceMaximum priceMinimum priceTrading volumeTurnoverBiasBollinger bandsDirectional movement indexExponential moving averagesStochastic indexMoving averagesMACDRelative strength index

Dataset

M

M

M

N

N

N

Figure 2 Rolling segmentation on training set and testing set Thegreen bar represents the entire dataset the blue bar represents thetraining set for a round experiment and the yellow bar representsthe corresponding testing set

segmentation on training set and testing set of the experi-mental data As Figure 2 shows in the beginning we selectthe first119872 days as training set and the next119873 days play therole of testing set After the first round of experiments weroll forward the time window for 119873 days that is choosingthe (119873+1)th day to the (119872+119873)th day as training set and the(119872+119873+1)th day to the (119872+2119873)th day as testing set Repeatuntil all the data has been experimented In other words this119873 can be regarded as the model update cycle and119872 is thesize of the corresponding training data

42 Network Architecture Given that the LSTM generatortakes on the role of prediction and requires more accuratecalculations of values than the CNN discriminator we set thelearning rate 120588119866 to 00004 and 120588119863 to 002 The LSTM cell in119866 contains 121 internal (hidden) units and the parametersare initialized following the normal distribution N(0 1)The architecture of discriminative model 119863 is presented inTable 3 We train GAN-FD with 119901 = 2 weighted by 120582adv =120582119901 = 120582dpl = 143 Benchmark Methods To evaluate the performance ofour proposed method we include three baseline meth-ods for comparison The first model is ARIMA (1 1 1)-GARCH(1 1) a fitted ARIMA model that forecasts future

6 Mathematical Problems in Engineering

Table 3 Network architecture of discriminative model 119863Layer ConfigurationConvolution 1 Filter 32 times 4 times 1 strides 2 LReLUConvolution 2 Filter 64 times 4 times 1 strides 2 LReLU BNConvolution 3 Filter 128 times 4 times 1 strides 2 LReLU BNFC 1 128 leaky ReLUFC 2 2 sigmoidOptimizer SGD batch size 121 iterations 10000 LReLU slope 001

Table 4 Summary of RMSRE with different (M N) These figures are the average values over the 42 stocks

119873 = 5 119873 = 10 119873 = 20119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60ARIMA-GARCH 00419 00406 00425 00529 00529 00516 00733 00657 00739ANN 00419 00485 00531 00522 00522 00510 00739 00631 00631SVM 00512 00450 00487 00539 00507 00527 00616 00666 00639GAN-F 00151 00155 00157 00300 00243 00277 00326 00313 00299GAN-D 00422 00304 00503 00625 00419 00405 00514 00598 00420LSTM-FD 00200 00194 00180 00324 00230 00245 00321 00335 00357GAN-FD 00098 00079 00101 00218 00111 00144 00333 00323 00296

values of stock time series and the GARCH model forecastsfuture volatilities [20] The second one is artificial neuralnetworks (ANN) The parameter optimization method andmodel architectural is setting as in [21] except that the inputlayer node is changed to 13 and the network outputs thepredicted value instead of two patterns (0 or 1)The third oneis support vectormachines (SVM)AnRBF kernel is used andthe parameter is setting as in [25]

We also inspect our GAN-FD model from several waysThe GAN-F model is using a GAN architectural for mini-mizing forecast error loss with 120582adv = 120582119901 = 1 and 120582dpl= 0 The GAN-D model is using a GAN architectural forminimizing direction prediction loss with 120582adv = 120582dpl = 1and 120582119901 = 0 The LSTM-FD model is a LSTM model aimingat minimizing forecast error loss and direction predictionloss with 121 internal units in LSTM Obviously the maindifference between LSTM-FD and GAN-FD is the presenceof adversarial training

44 Evaluation Metrics For each stock at each time 119905 aprediction is made for the next time point 119905 + 1 based ona specific method Assume the total number of time pointsbeing tested is 1198790 we used the following criteria to evaluatethe performance of different models

(1) Root Mean Squared Relative Error (RMSRE)

RMSRE = radic 111987901198790sum119905=1

(119905+1 minus 119884119905+1119884119905+1 )2 (8)

RMSRE is employed as an indicator for the predictive poweror prediction agreement A low RMSRE indicates that theprediction agreeswith the real data (the reasonwhy this paperuses RMSRE instead of RMSE is that RMSRE facilitates auniform comparison of the results of 42 stocks)

(2) Direction Prediction Accuracy (DPA)

DPA = 10011987901198790sum119905=1

119868119905 (9)

where

119868119905 = 1 if (119884119905+1 minus 119884119905) (119905+1 minus 119884119905) gt 00 otherwise

(10)

DPA measures the percentage of accuracy relating to theseries trend A high DPA promises more winning trades

45 Results In order to investigate the effect of the modelupdate cycle on the predictive performance let119872 isin 10 2060 and 119873 isin 5 10 20 In China stock exchange market5 10 20 60 days represent one week two weeks onemonth and one quarter

Tables 4 and 5 show the average values of RMSRE andDPAwith different (119872119873)The numbers clearly indicate thatGAN-FD and its related methods perform better than threebaseline methods in terms of RMSRE and DPAThis targetedmethod GAN-F brings some improvement in RMSRE butit does not outperform three baseline methods in DPAContrary to GAN-F GAN-D achieves better results in DPAbut failed in RMSRE LSTM-FD improves the results sinceit combines forecast error loss with direction prediction lossfor training Finally the combination of the forecast error lossdirection prediction loss and adversarial training that isGAN-FD achieves the best RMSRE and DPA in the majorityof scenarios

Let us take a look at the effects of different (M N) on theexperiment GAN-FD obtains the maximum average DPA(06956) and the minimum average RMSRE (00079) when

Mathematical Problems in Engineering 7

Table 5 Summary of DPA with different (M N) These figures are the average values over the 42 stocks

119873 = 5 119873 = 10 119873 = 20119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60ARIMA-GARCH 05464 05479 05264 05280 05315 05245 05007 05214 05296ANN 05456 05978 05738 05473 05629 05575 05205 05280 05394SVM 05715 05490 05839 05377 05514 05576 05147 05144 05318GAN-F 05347 05507 05281 04930 05115 05265 04880 05008 05116GAN-D 06220 06399 06409 06117 06245 06437 05217 05517 05498LSTM-FD 06340 06506 06509 06124 06236 06256 05546 05635 05719GAN-FD 06761 06956 06793 06233 06651 06687 05535 05583 05753

Table 6 The number of times about the minimum RMSRE

119873 = 5 119873 = 10 119873 = 20119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60ARIMA-GARCH 0 0 0 0 0 0 0 0 0ANN 0 0 0 0 0 0 0 0 0SVM 0 0 0 0 0 0 0 0 0GAN-F 11 2 4 6 6 4 13 18 11GAN-D 0 0 0 0 0 0 2 0 7LSTM-FD 0 0 5 6 3 3 16 10 5GAN-FD 31 40 33 30 33 35 11 14 19

Table 7 The number of times about the maximum DPA

119873 = 5 119873 = 10 119873 = 20119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60ARIMA-GARCH 0 0 0 0 0 0 0 6 5ANN 0 0 0 0 0 0 2 0 3SVM 0 0 0 0 0 0 3 1 1GAN-F 0 0 0 0 0 0 0 0 0GAN-D 0 1 6 5 1 7 2 6 2LSTM-FD 1 3 4 11 4 0 18 15 12GAN-FD 41 38 32 26 37 35 17 14 19

(M N) is (20 5) It is interesting to note that all thesemethods work better when 119873 is 5 than when 119873 is 10 or 20with smaller RMSRE and higher DPA This implies that veryshort-term trends are best for predicting the next minutersquosprice Therefore a shorter model update cycle (eg 119873 is 5)is preferred On the other hand for the same 119873 different119872 will bring about some changes to the prediction resultsFrom the experimental results we suggest that119872 should takethe value greater than 119873 This makes intuitive sense If thetraining sample is inadequate it would fail to train themodelespecially in the volatile stockmarketsWe should also noticethat when the training set is small while the testing set islarge (ie (M N) is (10 20)) most of these methods performthe worst and the DPA of these methods are no better thanrandom guessing (ie 50)

Table 6 shows the number of times for each methodto achieve the minimum RMSRE over the 42 stocks It isnoticeable that the results of these three baseline methods areall zero GAN-FDwith its related methods is obviously betterthan these three baseline methods in RMSRE Meanwhile

GAN-FD obtains the minimum RMSRE 246 times account-ing for 6508 in these 378 scenarios (42 stocks and 9 groups(M N)) The best performance appeared when (M N) is (205) with 40 stocksrsquo minimumRMSRE coming fromGAN-FD

Table 7 shows the number of times for each method toachieve the maximum DPA over the 42 stocks Comparedwith the other six methods GAN-FD achieves the maximumDPA 269 times accounting for 7116 in all scenarios When(M N) is (10 5) the maximum DPA of 41 stocks in all 42stocks comes from GAN-FD Even when (M N) is (20 20)that is the worst performance of GAN-FD cases GAN-FDstill obtains maximum DPA in 14 stocks From the aboveanalyses the performance of the GAN-FD is significantlybetter than the other six ways

The results of each representation are reported in Figures3ndash11 We just focus on GAN-FD As shown in Figures 3ndash5the DPA of GAN-FD ranges around 6459ndash7224 when119873is 5 and it slumps to 5201ndash6271 when 119873 is 20 whichis presented in Figures 9ndash11 When 119873 is 5 the RMSRE ofGAN-FD over the 42 stocks varies between 048 and 149

8 Mathematical Problems in Engineering

0 0010203040506070809

DPA

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

00100200300400500600700800901

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 3 DPA and RMSRE of each stock when (M N) is (10 5) and 119909-axis represents the stock ID

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

0

01

02

03

04

05

06

07

08

09

DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

421 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 4 DPA and RMSRE of each stock when (M N) is (20 5) and 119909-axis represents the stock ID

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

0010203040506070809

DPA

000100200300400500600700800901

RMSR

E

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 5 DPA and RMSRE of each stock when (M N) is (60 5) and 119909-axis represents the stock ID

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

0

01

02

03

04

05

06

07

08

09

DPA

001

0

002

003

004

005

006

007

008

009

01

RMSR

E

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

421 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 6 DPA and RMSRE of each stock when (M N) is (10 10) and 119909-axis represents the stock ID

Mathematical Problems in Engineering 9

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

0010203040506070809

DPA

000100200300400500600700800901

RMSR

E

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 7 DPA and RMSRE of each stock when (M N) is (20 10) and 119909-axis represents the stock ID

0

01

02

03

04

05

06

07

08

09

DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 8 DPA and RMSRE of each stock when (M N) is (60 10) and 119909-axis represents the stock ID

0

01

02

03

04

05

06

07

08

09

DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 9 DPA and RMSRE of each stock when (M N) is (10 20) and 119909-axis represents the stock ID

0

01

02

03

04

05

06

07

08

09

DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 10 DPA and RMSRE of each stock when (M N) is (20 20) and 119909-axis represents the stock ID

10 Mathematical Problems in Engineering

0

01

02

03

04

05

06

07

08

09DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 11 DPA and RMSRE of each stock when (M N) is (60 20) and 119909-axis represents the stock ID

which is lower than other six methods in most cases whilethe volatility is smaller However the RMSRE of GAN-FDincreases dramatically and fluctuates violently when119873 is 20and it varies between 121 and 496 This further showsthat we should reduce the model update cycle 119873 and revisethe model parameters regularly to adapt to the change ofmarket style

5 Conclusion

In this paper we propose an easy-to-use stock forecastingmodel called GAN-FD to assist more and more nonfinancialprofessional ordinary investors making decisions GAN-FDadopts 13 simple technical indexes as input data to avoidcomplicated input data preprocessing Based on the deeplearning network thismodel achieves prediction ability supe-rior to other benchmark methods by means of adversarialtraining minimizing direction prediction loss and forecasterror loss Moreover the effects of themodel update cycles onthe predictive capability are analyzed and the experimentalresults show that the smaller model update cycle can obtainbetter prediction performance In the future we will attemptto integrate predictive models under multiscale conditions

Conflicts of Interest

The authors declare that there are no conflicts of interestregarding the publication of this paper

Acknowledgments

This work is supported by the National Key ResearchDevelopment Program of China (2017YFB0802800) andthe National Natural Science Foundation of China (no61473149)

References

[1] R Al-Hmouz W Pedrycz and A Balamash ldquoDescription andprediction of time series a general framework of GranularComputingrdquo Expert Systems with Applications vol 42 no 10pp 4830ndash4839 2015

[2] S Barak and M Modarres ldquoDeveloping an approach to eval-uate stocks by forecasting effective features with data miningmethodsrdquo Expert Systems with Applications vol 42 no 3 pp1325ndash1339 2015

[3] A Booth E Gerding and F McGroarty ldquoAutomated tradingwith performance weighted random forests and seasonalityrdquoExpert Systems with Applications vol 41 no 8 pp 3651ndash36612014

[4] A Bagheri HMohammadi Peyhani andM Akbari ldquoFinancialforecasting usingANFIS networkswithQuantum-behaved Par-ticle Swarm Optimizationrdquo Expert Systems with Applicationsvol 41 no 14 pp 6235ndash6250 2014

[5] Y Son D-J Noh and J Lee ldquoForecasting trends of high-frequency KOSPI200 index data using learning classifiersrdquoExpert Systems with Applications vol 39 no 14 pp 11607ndash116152012

[6] I Aldridge and S Krawciw ldquoReal-Time Risk What InvestorsShould Know About FinTechrdquo in High-Frequency Trading andFlash Crashes JohnWileyamp Sons Inc HobokenNJ USA 2017

[7] F A De Oliveira C N Nobre and L E Zarate ldquoApplyingArtificial Neural Networks to prediction of stock price andimprovement of the directional prediction index - Case studyof PETR4 Petrobras Brazilrdquo Expert Systems with Applicationsvol 40 no 18 pp 7596ndash7606 2013

[8] J H Nino-Pena and G J Hernandez-Perez ldquoPrice directionprediction on high frequency data using deep belief networksrdquoCommunications in Computer and Information Science vol 657pp 74ndash83 2016

[9] A Marszałek and T Burczynrsquoski ldquoModeling and forecastingfinancial time series with ordered fuzzy candlesticksrdquo Informa-tion Sciences vol 273 pp 144ndash155 2014

[10] X Li X Huang X Deng and S Zhu ldquoEnhancing quantitativeintra-day stock return prediction by integrating both marketnews and stock prices informationrdquo Neurocomputing vol 142pp 228ndash238 2014

[11] X Wang S Bao and J Chen ldquoHigh-frequency stock linkageand multi-dimensional stationary processesrdquo Physica A Statis-tical Mechanics and its Applications vol 468 pp 70ndash83 2017

[12] E Chong C Han and F C Park ldquoDeep learning networks forstock market analysis and prediction Methodology data repre-sentations and case studiesrdquo Expert Systems with Applicationsvol 83 pp 187ndash205 2017

[13] I J Goodfellow J Pouget-Abadie M Mirza et al ldquoGenerativeadversarial netsrdquo in Proceedings of the 28th Annual Conference

Mathematical Problems in Engineering 11

on Neural Information Processing Systems 2014 NIPS 2014 pp2672ndash2680 can December 2014

[14] S Iizuka E Simo-Serra and H Ishikawa ldquoGlobally and locallyconsistent image completionrdquo ACM Transactions on Graphicsvol 36 no 4 article no 107 2017

[15] P Luc C Couprie S Chintala and J Verbeek Semanticsegmentation using adversarial networks arXiv preprint arXiv161108408 2016 arXiv161108408

[16] M Mathieu C Couprie and Y LeCun Deep multi-scale videoprediction beyond mean square error arXiv preprint arXiv151105440 2015 arXiv151105440

[17] J D HamiltonTime Series Analysis vol 2 PrincetonUniversityPress 1994

[18] R H Shumway and D S Stoffer Time series analysis and itsapplications Springer Texts in Statistics Springer New YorkNY USA 3rd edition 2011

[19] P J Brockwell and R ADavisTimE SeriesTheory andMethodsSpringer Science amp Business Media 2013

[20] S Pellegrini E Ruiz and A Espasa ldquoPrediction intervalsin conditionally heteroscedastic time series with stochasticcomponentsrdquo International Journal of Forecasting vol 27 no 2pp 308ndash319 2011

[21] Y Kara M Acar Boyacioglu and O K Baykan ldquoPredictingdirection of stock price index movement using artificial neuralnetworks and support vector machines The sample of theIstanbul Stock Exchangerdquo Expert Systems with Applications vol38 no 5 pp 5311ndash5319 2011

[22] M Ghiassi J Skinner andD Zimbra ldquoTwitter brand sentimentanalysis a hybrid system using n-gram analysis and dynamicartificial neural networkrdquo Expert Systems with Applications vol40 no 16 pp 6266ndash6282 2013

[23] M R Hassan ldquoA combination of hidden Markov model andfuzzymodel for stockmarket forecastingrdquoNeurocomputing vol72 no 16-18 pp 3439ndash3446 2009

[24] W Huang Y Nakamori and S-Y Wang ldquoForecasting stockmarket movement direction with support vector machinerdquoComputers ampOperations Research vol 32 no 10 pp 2513ndash25222005

[25] A F S Elsir and H Faris ldquoA Comparison between Regres-sion Artificial Neural Networks and Support Vector Machinesfor Predicting Stock Market Indexrdquo International Journal ofAdvanced Research in Artificial Intelligence vol 4 no 7 2015

[26] R Majhi G Panda G Sahoo A Panda and A ChoubeyldquoPrediction of SampP 500 and DJIA stock indices using particleswarm optimization techniquerdquo in Proceedings of the Proceedingof the IEEE Congress on Evolutionary Computation (CEC rsquo08)pp 1276ndash1282 Hong Kong China June 2008

[27] S S Appadoo Pricing Financial Derivatives with Fuzzy Alge-braic Models ATheoretical and Computational Approach [PhDthesis] University of Manitoba Winnipeg 2006

[28] A Thavaneswaran K Thiagarajah and S S Appadoo ldquoFuzzycoefficient volatility (FCV) models with applicationsrdquo Mathe-matical and Computer Modelling vol 45 no 7-8 pp 777ndash7862007

[29] C Carlsson and R Fuller ldquoOn possibilistic mean value andvariance of fuzzy numbersrdquo Fuzzy Sets and Systems vol 122 no2 pp 315ndash326 2001

[30] A Thavaneswaran S S Appadoo and A Paseka ldquoWeightedpossibilistic moments of fuzzy numbers with applications toGARCH modeling and option pricingrdquo Mathematical andComputer Modelling vol 49 no 1-2 pp 352ndash368 2009

[31] N Srivastava G Hinton A Krizhevsky I Sutskever and RSalakhutdinov ldquoDropout a simple way to prevent neural net-works from overfittingrdquo Journal of Machine Learning Researchvol 15 no 1 pp 1929ndash1958 2014

[32] A M Rather A Agarwal and V N Sastry ldquoRecurrent neuralnetwork and a hybrid model for prediction of stock returnsrdquoExpert Systems with Applications vol 42 no 6 pp 3234ndash32412015

[33] R D A Araujo A L I Oliveira and S Meira ldquoA hybrid modelfor high-frequency stock market forecastingrdquo Expert Systemswith Applications vol 42 no 8 pp 4081ndash4096 2015

[34] H Chen K Xiao J Sun and S Wu ldquoA double-layer neu-ral network framework for high-frequency forecastingrdquo ACMTransactions on Management Information Systems (TMIS) vol7 no 4 article no 11 2017

[35] A Yoshihara K Fujikawa K Seki and K Uehara ldquoPredictingStock Market Trends by Recurrent Deep Neural Networksrdquo inPRICAI 2014 Trends inArtificial Intelligence vol 8862 ofLectureNotes in Computer Science pp 759ndash769 Springer InternationalPublishing Cham 2014

[36] XDing Y Zhang T Liu and J Duan ldquoDeep learning for event-driven stock predictionrdquo in Proceedings of the 24th InternationalJoint Conference on Artificial Intelligence IJCAI 2015 pp 2327ndash2333 arg July 2015

[37] Z Zhou J Zhao and K Xu ldquoCan online emotions predictthe stock market in Chinardquo in Proceedings of the InternationalConference on Web Information Systems Engineering pp 328ndash342 2016

[38] S Hochreiter and J Schmidhuber ldquoLong short-term memoryrdquoNeural Computation vol 9 no 8 pp 1735ndash1780 1997

[39] Y LeCun L Bottou Y Bengio and P Haffner ldquoGradient-basedlearning applied to document recognitionrdquo Proceedings of theIEEE vol 86 no 11 pp 2278ndash2323 1998

[40] A Arevalo J Nino G Hernandez and J Sandoval ldquoHigh-frequency trading strategy based on deep neural networksrdquoin Proceedings of the International conference on intelligentcomputing pp 424ndash436 2016

[41] K-J Kim ldquoFinancial time series forecasting using supportvector machinesrdquo Neurocomputing vol 55 no 1-2 pp 307ndash3192003

[42] S Madge Predicting Stock Price Direction using SupportVector Machines Independent Work Report Spring 2015

Hindawiwwwhindawicom Volume 2018

MathematicsJournal of

Hindawiwwwhindawicom Volume 2018

Mathematical Problems in Engineering

Applied MathematicsJournal of

Hindawiwwwhindawicom Volume 2018

Probability and StatisticsHindawiwwwhindawicom Volume 2018

Journal of

Hindawiwwwhindawicom Volume 2018

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawiwwwhindawicom Volume 2018

OptimizationJournal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Engineering Mathematics

International Journal of

Hindawiwwwhindawicom Volume 2018

Operations ResearchAdvances in

Journal of

Hindawiwwwhindawicom Volume 2018

Function SpacesAbstract and Applied AnalysisHindawiwwwhindawicom Volume 2018

International Journal of Mathematics and Mathematical Sciences

Hindawiwwwhindawicom Volume 2018

Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom

The Scientific World Journal

Volume 2018

Hindawiwwwhindawicom Volume 2018Volume 2018

Numerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisAdvances inAdvances in Discrete Dynamics in

Nature and SocietyHindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom

Dierential EquationsInternational Journal of

Volume 2018

Hindawiwwwhindawicom Volume 2018

Decision SciencesAdvances in

Hindawiwwwhindawicom Volume 2018

AnalysisInternational Journal of

Hindawiwwwhindawicom Volume 2018

Stochastic AnalysisInternational Journal of

Submit your manuscripts atwwwhindawicom

Page 6: Stock Market Prediction on High-Frequency Data Using Generative Adversarial Netsdownloads.hindawi.com/journals/mpe/2018/4907423.pdf · 2018-11-12 · ResearchArticle Stock Market

6 Mathematical Problems in Engineering

Table 3 Network architecture of discriminative model 119863Layer ConfigurationConvolution 1 Filter 32 times 4 times 1 strides 2 LReLUConvolution 2 Filter 64 times 4 times 1 strides 2 LReLU BNConvolution 3 Filter 128 times 4 times 1 strides 2 LReLU BNFC 1 128 leaky ReLUFC 2 2 sigmoidOptimizer SGD batch size 121 iterations 10000 LReLU slope 001

Table 4 Summary of RMSRE with different (M N) These figures are the average values over the 42 stocks

119873 = 5 119873 = 10 119873 = 20119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60ARIMA-GARCH 00419 00406 00425 00529 00529 00516 00733 00657 00739ANN 00419 00485 00531 00522 00522 00510 00739 00631 00631SVM 00512 00450 00487 00539 00507 00527 00616 00666 00639GAN-F 00151 00155 00157 00300 00243 00277 00326 00313 00299GAN-D 00422 00304 00503 00625 00419 00405 00514 00598 00420LSTM-FD 00200 00194 00180 00324 00230 00245 00321 00335 00357GAN-FD 00098 00079 00101 00218 00111 00144 00333 00323 00296

values of stock time series and the GARCH model forecastsfuture volatilities [20] The second one is artificial neuralnetworks (ANN) The parameter optimization method andmodel architectural is setting as in [21] except that the inputlayer node is changed to 13 and the network outputs thepredicted value instead of two patterns (0 or 1)The third oneis support vectormachines (SVM)AnRBF kernel is used andthe parameter is setting as in [25]

We also inspect our GAN-FD model from several waysThe GAN-F model is using a GAN architectural for mini-mizing forecast error loss with 120582adv = 120582119901 = 1 and 120582dpl= 0 The GAN-D model is using a GAN architectural forminimizing direction prediction loss with 120582adv = 120582dpl = 1and 120582119901 = 0 The LSTM-FD model is a LSTM model aimingat minimizing forecast error loss and direction predictionloss with 121 internal units in LSTM Obviously the maindifference between LSTM-FD and GAN-FD is the presenceof adversarial training

44 Evaluation Metrics For each stock at each time 119905 aprediction is made for the next time point 119905 + 1 based ona specific method Assume the total number of time pointsbeing tested is 1198790 we used the following criteria to evaluatethe performance of different models

(1) Root Mean Squared Relative Error (RMSRE)

RMSRE = radic 111987901198790sum119905=1

(119905+1 minus 119884119905+1119884119905+1 )2 (8)

RMSRE is employed as an indicator for the predictive poweror prediction agreement A low RMSRE indicates that theprediction agreeswith the real data (the reasonwhy this paperuses RMSRE instead of RMSE is that RMSRE facilitates auniform comparison of the results of 42 stocks)

(2) Direction Prediction Accuracy (DPA)

DPA = 10011987901198790sum119905=1

119868119905 (9)

where

119868119905 = 1 if (119884119905+1 minus 119884119905) (119905+1 minus 119884119905) gt 00 otherwise

(10)

DPA measures the percentage of accuracy relating to theseries trend A high DPA promises more winning trades

45 Results In order to investigate the effect of the modelupdate cycle on the predictive performance let119872 isin 10 2060 and 119873 isin 5 10 20 In China stock exchange market5 10 20 60 days represent one week two weeks onemonth and one quarter

Tables 4 and 5 show the average values of RMSRE andDPAwith different (119872119873)The numbers clearly indicate thatGAN-FD and its related methods perform better than threebaseline methods in terms of RMSRE and DPAThis targetedmethod GAN-F brings some improvement in RMSRE butit does not outperform three baseline methods in DPAContrary to GAN-F GAN-D achieves better results in DPAbut failed in RMSRE LSTM-FD improves the results sinceit combines forecast error loss with direction prediction lossfor training Finally the combination of the forecast error lossdirection prediction loss and adversarial training that isGAN-FD achieves the best RMSRE and DPA in the majorityof scenarios

Let us take a look at the effects of different (M N) on theexperiment GAN-FD obtains the maximum average DPA(06956) and the minimum average RMSRE (00079) when

Mathematical Problems in Engineering 7

Table 5 Summary of DPA with different (M N) These figures are the average values over the 42 stocks

119873 = 5 119873 = 10 119873 = 20119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60ARIMA-GARCH 05464 05479 05264 05280 05315 05245 05007 05214 05296ANN 05456 05978 05738 05473 05629 05575 05205 05280 05394SVM 05715 05490 05839 05377 05514 05576 05147 05144 05318GAN-F 05347 05507 05281 04930 05115 05265 04880 05008 05116GAN-D 06220 06399 06409 06117 06245 06437 05217 05517 05498LSTM-FD 06340 06506 06509 06124 06236 06256 05546 05635 05719GAN-FD 06761 06956 06793 06233 06651 06687 05535 05583 05753

Table 6 The number of times about the minimum RMSRE

119873 = 5 119873 = 10 119873 = 20119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60ARIMA-GARCH 0 0 0 0 0 0 0 0 0ANN 0 0 0 0 0 0 0 0 0SVM 0 0 0 0 0 0 0 0 0GAN-F 11 2 4 6 6 4 13 18 11GAN-D 0 0 0 0 0 0 2 0 7LSTM-FD 0 0 5 6 3 3 16 10 5GAN-FD 31 40 33 30 33 35 11 14 19

Table 7 The number of times about the maximum DPA

119873 = 5 119873 = 10 119873 = 20119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60ARIMA-GARCH 0 0 0 0 0 0 0 6 5ANN 0 0 0 0 0 0 2 0 3SVM 0 0 0 0 0 0 3 1 1GAN-F 0 0 0 0 0 0 0 0 0GAN-D 0 1 6 5 1 7 2 6 2LSTM-FD 1 3 4 11 4 0 18 15 12GAN-FD 41 38 32 26 37 35 17 14 19

(M N) is (20 5) It is interesting to note that all thesemethods work better when 119873 is 5 than when 119873 is 10 or 20with smaller RMSRE and higher DPA This implies that veryshort-term trends are best for predicting the next minutersquosprice Therefore a shorter model update cycle (eg 119873 is 5)is preferred On the other hand for the same 119873 different119872 will bring about some changes to the prediction resultsFrom the experimental results we suggest that119872 should takethe value greater than 119873 This makes intuitive sense If thetraining sample is inadequate it would fail to train themodelespecially in the volatile stockmarketsWe should also noticethat when the training set is small while the testing set islarge (ie (M N) is (10 20)) most of these methods performthe worst and the DPA of these methods are no better thanrandom guessing (ie 50)

Table 6 shows the number of times for each methodto achieve the minimum RMSRE over the 42 stocks It isnoticeable that the results of these three baseline methods areall zero GAN-FDwith its related methods is obviously betterthan these three baseline methods in RMSRE Meanwhile

GAN-FD obtains the minimum RMSRE 246 times account-ing for 6508 in these 378 scenarios (42 stocks and 9 groups(M N)) The best performance appeared when (M N) is (205) with 40 stocksrsquo minimumRMSRE coming fromGAN-FD

Table 7 shows the number of times for each method toachieve the maximum DPA over the 42 stocks Comparedwith the other six methods GAN-FD achieves the maximumDPA 269 times accounting for 7116 in all scenarios When(M N) is (10 5) the maximum DPA of 41 stocks in all 42stocks comes from GAN-FD Even when (M N) is (20 20)that is the worst performance of GAN-FD cases GAN-FDstill obtains maximum DPA in 14 stocks From the aboveanalyses the performance of the GAN-FD is significantlybetter than the other six ways

The results of each representation are reported in Figures3ndash11 We just focus on GAN-FD As shown in Figures 3ndash5the DPA of GAN-FD ranges around 6459ndash7224 when119873is 5 and it slumps to 5201ndash6271 when 119873 is 20 whichis presented in Figures 9ndash11 When 119873 is 5 the RMSRE ofGAN-FD over the 42 stocks varies between 048 and 149

8 Mathematical Problems in Engineering

0 0010203040506070809

DPA

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

00100200300400500600700800901

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 3 DPA and RMSRE of each stock when (M N) is (10 5) and 119909-axis represents the stock ID

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

0

01

02

03

04

05

06

07

08

09

DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

421 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 4 DPA and RMSRE of each stock when (M N) is (20 5) and 119909-axis represents the stock ID

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

0010203040506070809

DPA

000100200300400500600700800901

RMSR

E

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 5 DPA and RMSRE of each stock when (M N) is (60 5) and 119909-axis represents the stock ID

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

0

01

02

03

04

05

06

07

08

09

DPA

001

0

002

003

004

005

006

007

008

009

01

RMSR

E

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

421 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 6 DPA and RMSRE of each stock when (M N) is (10 10) and 119909-axis represents the stock ID

Mathematical Problems in Engineering 9

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

0010203040506070809

DPA

000100200300400500600700800901

RMSR

E

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 7 DPA and RMSRE of each stock when (M N) is (20 10) and 119909-axis represents the stock ID

0

01

02

03

04

05

06

07

08

09

DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 8 DPA and RMSRE of each stock when (M N) is (60 10) and 119909-axis represents the stock ID

0

01

02

03

04

05

06

07

08

09

DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 9 DPA and RMSRE of each stock when (M N) is (10 20) and 119909-axis represents the stock ID

0

01

02

03

04

05

06

07

08

09

DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 10 DPA and RMSRE of each stock when (M N) is (20 20) and 119909-axis represents the stock ID

10 Mathematical Problems in Engineering

0

01

02

03

04

05

06

07

08

09DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 11 DPA and RMSRE of each stock when (M N) is (60 20) and 119909-axis represents the stock ID

which is lower than other six methods in most cases whilethe volatility is smaller However the RMSRE of GAN-FDincreases dramatically and fluctuates violently when119873 is 20and it varies between 121 and 496 This further showsthat we should reduce the model update cycle 119873 and revisethe model parameters regularly to adapt to the change ofmarket style

5 Conclusion

In this paper we propose an easy-to-use stock forecastingmodel called GAN-FD to assist more and more nonfinancialprofessional ordinary investors making decisions GAN-FDadopts 13 simple technical indexes as input data to avoidcomplicated input data preprocessing Based on the deeplearning network thismodel achieves prediction ability supe-rior to other benchmark methods by means of adversarialtraining minimizing direction prediction loss and forecasterror loss Moreover the effects of themodel update cycles onthe predictive capability are analyzed and the experimentalresults show that the smaller model update cycle can obtainbetter prediction performance In the future we will attemptto integrate predictive models under multiscale conditions

Conflicts of Interest

The authors declare that there are no conflicts of interestregarding the publication of this paper

Acknowledgments

This work is supported by the National Key ResearchDevelopment Program of China (2017YFB0802800) andthe National Natural Science Foundation of China (no61473149)

References

[1] R Al-Hmouz W Pedrycz and A Balamash ldquoDescription andprediction of time series a general framework of GranularComputingrdquo Expert Systems with Applications vol 42 no 10pp 4830ndash4839 2015

[2] S Barak and M Modarres ldquoDeveloping an approach to eval-uate stocks by forecasting effective features with data miningmethodsrdquo Expert Systems with Applications vol 42 no 3 pp1325ndash1339 2015

[3] A Booth E Gerding and F McGroarty ldquoAutomated tradingwith performance weighted random forests and seasonalityrdquoExpert Systems with Applications vol 41 no 8 pp 3651ndash36612014

[4] A Bagheri HMohammadi Peyhani andM Akbari ldquoFinancialforecasting usingANFIS networkswithQuantum-behaved Par-ticle Swarm Optimizationrdquo Expert Systems with Applicationsvol 41 no 14 pp 6235ndash6250 2014

[5] Y Son D-J Noh and J Lee ldquoForecasting trends of high-frequency KOSPI200 index data using learning classifiersrdquoExpert Systems with Applications vol 39 no 14 pp 11607ndash116152012

[6] I Aldridge and S Krawciw ldquoReal-Time Risk What InvestorsShould Know About FinTechrdquo in High-Frequency Trading andFlash Crashes JohnWileyamp Sons Inc HobokenNJ USA 2017

[7] F A De Oliveira C N Nobre and L E Zarate ldquoApplyingArtificial Neural Networks to prediction of stock price andimprovement of the directional prediction index - Case studyof PETR4 Petrobras Brazilrdquo Expert Systems with Applicationsvol 40 no 18 pp 7596ndash7606 2013

[8] J H Nino-Pena and G J Hernandez-Perez ldquoPrice directionprediction on high frequency data using deep belief networksrdquoCommunications in Computer and Information Science vol 657pp 74ndash83 2016

[9] A Marszałek and T Burczynrsquoski ldquoModeling and forecastingfinancial time series with ordered fuzzy candlesticksrdquo Informa-tion Sciences vol 273 pp 144ndash155 2014

[10] X Li X Huang X Deng and S Zhu ldquoEnhancing quantitativeintra-day stock return prediction by integrating both marketnews and stock prices informationrdquo Neurocomputing vol 142pp 228ndash238 2014

[11] X Wang S Bao and J Chen ldquoHigh-frequency stock linkageand multi-dimensional stationary processesrdquo Physica A Statis-tical Mechanics and its Applications vol 468 pp 70ndash83 2017

[12] E Chong C Han and F C Park ldquoDeep learning networks forstock market analysis and prediction Methodology data repre-sentations and case studiesrdquo Expert Systems with Applicationsvol 83 pp 187ndash205 2017

[13] I J Goodfellow J Pouget-Abadie M Mirza et al ldquoGenerativeadversarial netsrdquo in Proceedings of the 28th Annual Conference

Mathematical Problems in Engineering 11

on Neural Information Processing Systems 2014 NIPS 2014 pp2672ndash2680 can December 2014

[14] S Iizuka E Simo-Serra and H Ishikawa ldquoGlobally and locallyconsistent image completionrdquo ACM Transactions on Graphicsvol 36 no 4 article no 107 2017

[15] P Luc C Couprie S Chintala and J Verbeek Semanticsegmentation using adversarial networks arXiv preprint arXiv161108408 2016 arXiv161108408

[16] M Mathieu C Couprie and Y LeCun Deep multi-scale videoprediction beyond mean square error arXiv preprint arXiv151105440 2015 arXiv151105440

[17] J D HamiltonTime Series Analysis vol 2 PrincetonUniversityPress 1994

[18] R H Shumway and D S Stoffer Time series analysis and itsapplications Springer Texts in Statistics Springer New YorkNY USA 3rd edition 2011

[19] P J Brockwell and R ADavisTimE SeriesTheory andMethodsSpringer Science amp Business Media 2013

[20] S Pellegrini E Ruiz and A Espasa ldquoPrediction intervalsin conditionally heteroscedastic time series with stochasticcomponentsrdquo International Journal of Forecasting vol 27 no 2pp 308ndash319 2011

[21] Y Kara M Acar Boyacioglu and O K Baykan ldquoPredictingdirection of stock price index movement using artificial neuralnetworks and support vector machines The sample of theIstanbul Stock Exchangerdquo Expert Systems with Applications vol38 no 5 pp 5311ndash5319 2011

[22] M Ghiassi J Skinner andD Zimbra ldquoTwitter brand sentimentanalysis a hybrid system using n-gram analysis and dynamicartificial neural networkrdquo Expert Systems with Applications vol40 no 16 pp 6266ndash6282 2013

[23] M R Hassan ldquoA combination of hidden Markov model andfuzzymodel for stockmarket forecastingrdquoNeurocomputing vol72 no 16-18 pp 3439ndash3446 2009

[24] W Huang Y Nakamori and S-Y Wang ldquoForecasting stockmarket movement direction with support vector machinerdquoComputers ampOperations Research vol 32 no 10 pp 2513ndash25222005

[25] A F S Elsir and H Faris ldquoA Comparison between Regres-sion Artificial Neural Networks and Support Vector Machinesfor Predicting Stock Market Indexrdquo International Journal ofAdvanced Research in Artificial Intelligence vol 4 no 7 2015

[26] R Majhi G Panda G Sahoo A Panda and A ChoubeyldquoPrediction of SampP 500 and DJIA stock indices using particleswarm optimization techniquerdquo in Proceedings of the Proceedingof the IEEE Congress on Evolutionary Computation (CEC rsquo08)pp 1276ndash1282 Hong Kong China June 2008

[27] S S Appadoo Pricing Financial Derivatives with Fuzzy Alge-braic Models ATheoretical and Computational Approach [PhDthesis] University of Manitoba Winnipeg 2006

[28] A Thavaneswaran K Thiagarajah and S S Appadoo ldquoFuzzycoefficient volatility (FCV) models with applicationsrdquo Mathe-matical and Computer Modelling vol 45 no 7-8 pp 777ndash7862007

[29] C Carlsson and R Fuller ldquoOn possibilistic mean value andvariance of fuzzy numbersrdquo Fuzzy Sets and Systems vol 122 no2 pp 315ndash326 2001

[30] A Thavaneswaran S S Appadoo and A Paseka ldquoWeightedpossibilistic moments of fuzzy numbers with applications toGARCH modeling and option pricingrdquo Mathematical andComputer Modelling vol 49 no 1-2 pp 352ndash368 2009

[31] N Srivastava G Hinton A Krizhevsky I Sutskever and RSalakhutdinov ldquoDropout a simple way to prevent neural net-works from overfittingrdquo Journal of Machine Learning Researchvol 15 no 1 pp 1929ndash1958 2014

[32] A M Rather A Agarwal and V N Sastry ldquoRecurrent neuralnetwork and a hybrid model for prediction of stock returnsrdquoExpert Systems with Applications vol 42 no 6 pp 3234ndash32412015

[33] R D A Araujo A L I Oliveira and S Meira ldquoA hybrid modelfor high-frequency stock market forecastingrdquo Expert Systemswith Applications vol 42 no 8 pp 4081ndash4096 2015

[34] H Chen K Xiao J Sun and S Wu ldquoA double-layer neu-ral network framework for high-frequency forecastingrdquo ACMTransactions on Management Information Systems (TMIS) vol7 no 4 article no 11 2017

[35] A Yoshihara K Fujikawa K Seki and K Uehara ldquoPredictingStock Market Trends by Recurrent Deep Neural Networksrdquo inPRICAI 2014 Trends inArtificial Intelligence vol 8862 ofLectureNotes in Computer Science pp 759ndash769 Springer InternationalPublishing Cham 2014

[36] XDing Y Zhang T Liu and J Duan ldquoDeep learning for event-driven stock predictionrdquo in Proceedings of the 24th InternationalJoint Conference on Artificial Intelligence IJCAI 2015 pp 2327ndash2333 arg July 2015

[37] Z Zhou J Zhao and K Xu ldquoCan online emotions predictthe stock market in Chinardquo in Proceedings of the InternationalConference on Web Information Systems Engineering pp 328ndash342 2016

[38] S Hochreiter and J Schmidhuber ldquoLong short-term memoryrdquoNeural Computation vol 9 no 8 pp 1735ndash1780 1997

[39] Y LeCun L Bottou Y Bengio and P Haffner ldquoGradient-basedlearning applied to document recognitionrdquo Proceedings of theIEEE vol 86 no 11 pp 2278ndash2323 1998

[40] A Arevalo J Nino G Hernandez and J Sandoval ldquoHigh-frequency trading strategy based on deep neural networksrdquoin Proceedings of the International conference on intelligentcomputing pp 424ndash436 2016

[41] K-J Kim ldquoFinancial time series forecasting using supportvector machinesrdquo Neurocomputing vol 55 no 1-2 pp 307ndash3192003

[42] S Madge Predicting Stock Price Direction using SupportVector Machines Independent Work Report Spring 2015

Hindawiwwwhindawicom Volume 2018

MathematicsJournal of

Hindawiwwwhindawicom Volume 2018

Mathematical Problems in Engineering

Applied MathematicsJournal of

Hindawiwwwhindawicom Volume 2018

Probability and StatisticsHindawiwwwhindawicom Volume 2018

Journal of

Hindawiwwwhindawicom Volume 2018

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawiwwwhindawicom Volume 2018

OptimizationJournal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Engineering Mathematics

International Journal of

Hindawiwwwhindawicom Volume 2018

Operations ResearchAdvances in

Journal of

Hindawiwwwhindawicom Volume 2018

Function SpacesAbstract and Applied AnalysisHindawiwwwhindawicom Volume 2018

International Journal of Mathematics and Mathematical Sciences

Hindawiwwwhindawicom Volume 2018

Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom

The Scientific World Journal

Volume 2018

Hindawiwwwhindawicom Volume 2018Volume 2018

Numerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisAdvances inAdvances in Discrete Dynamics in

Nature and SocietyHindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom

Dierential EquationsInternational Journal of

Volume 2018

Hindawiwwwhindawicom Volume 2018

Decision SciencesAdvances in

Hindawiwwwhindawicom Volume 2018

AnalysisInternational Journal of

Hindawiwwwhindawicom Volume 2018

Stochastic AnalysisInternational Journal of

Submit your manuscripts atwwwhindawicom

Page 7: Stock Market Prediction on High-Frequency Data Using Generative Adversarial Netsdownloads.hindawi.com/journals/mpe/2018/4907423.pdf · 2018-11-12 · ResearchArticle Stock Market

Mathematical Problems in Engineering 7

Table 5 Summary of DPA with different (M N) These figures are the average values over the 42 stocks

119873 = 5 119873 = 10 119873 = 20119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60ARIMA-GARCH 05464 05479 05264 05280 05315 05245 05007 05214 05296ANN 05456 05978 05738 05473 05629 05575 05205 05280 05394SVM 05715 05490 05839 05377 05514 05576 05147 05144 05318GAN-F 05347 05507 05281 04930 05115 05265 04880 05008 05116GAN-D 06220 06399 06409 06117 06245 06437 05217 05517 05498LSTM-FD 06340 06506 06509 06124 06236 06256 05546 05635 05719GAN-FD 06761 06956 06793 06233 06651 06687 05535 05583 05753

Table 6 The number of times about the minimum RMSRE

119873 = 5 119873 = 10 119873 = 20119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60ARIMA-GARCH 0 0 0 0 0 0 0 0 0ANN 0 0 0 0 0 0 0 0 0SVM 0 0 0 0 0 0 0 0 0GAN-F 11 2 4 6 6 4 13 18 11GAN-D 0 0 0 0 0 0 2 0 7LSTM-FD 0 0 5 6 3 3 16 10 5GAN-FD 31 40 33 30 33 35 11 14 19

Table 7 The number of times about the maximum DPA

119873 = 5 119873 = 10 119873 = 20119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60 119872 = 10 119872 = 20 119872 = 60ARIMA-GARCH 0 0 0 0 0 0 0 6 5ANN 0 0 0 0 0 0 2 0 3SVM 0 0 0 0 0 0 3 1 1GAN-F 0 0 0 0 0 0 0 0 0GAN-D 0 1 6 5 1 7 2 6 2LSTM-FD 1 3 4 11 4 0 18 15 12GAN-FD 41 38 32 26 37 35 17 14 19

(M N) is (20 5) It is interesting to note that all thesemethods work better when 119873 is 5 than when 119873 is 10 or 20with smaller RMSRE and higher DPA This implies that veryshort-term trends are best for predicting the next minutersquosprice Therefore a shorter model update cycle (eg 119873 is 5)is preferred On the other hand for the same 119873 different119872 will bring about some changes to the prediction resultsFrom the experimental results we suggest that119872 should takethe value greater than 119873 This makes intuitive sense If thetraining sample is inadequate it would fail to train themodelespecially in the volatile stockmarketsWe should also noticethat when the training set is small while the testing set islarge (ie (M N) is (10 20)) most of these methods performthe worst and the DPA of these methods are no better thanrandom guessing (ie 50)

Table 6 shows the number of times for each methodto achieve the minimum RMSRE over the 42 stocks It isnoticeable that the results of these three baseline methods areall zero GAN-FDwith its related methods is obviously betterthan these three baseline methods in RMSRE Meanwhile

GAN-FD obtains the minimum RMSRE 246 times account-ing for 6508 in these 378 scenarios (42 stocks and 9 groups(M N)) The best performance appeared when (M N) is (205) with 40 stocksrsquo minimumRMSRE coming fromGAN-FD

Table 7 shows the number of times for each method toachieve the maximum DPA over the 42 stocks Comparedwith the other six methods GAN-FD achieves the maximumDPA 269 times accounting for 7116 in all scenarios When(M N) is (10 5) the maximum DPA of 41 stocks in all 42stocks comes from GAN-FD Even when (M N) is (20 20)that is the worst performance of GAN-FD cases GAN-FDstill obtains maximum DPA in 14 stocks From the aboveanalyses the performance of the GAN-FD is significantlybetter than the other six ways

The results of each representation are reported in Figures3ndash11 We just focus on GAN-FD As shown in Figures 3ndash5the DPA of GAN-FD ranges around 6459ndash7224 when119873is 5 and it slumps to 5201ndash6271 when 119873 is 20 whichis presented in Figures 9ndash11 When 119873 is 5 the RMSRE ofGAN-FD over the 42 stocks varies between 048 and 149

8 Mathematical Problems in Engineering

0 0010203040506070809

DPA

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

00100200300400500600700800901

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 3 DPA and RMSRE of each stock when (M N) is (10 5) and 119909-axis represents the stock ID

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

0

01

02

03

04

05

06

07

08

09

DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

421 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 4 DPA and RMSRE of each stock when (M N) is (20 5) and 119909-axis represents the stock ID

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

0010203040506070809

DPA

000100200300400500600700800901

RMSR

E

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 5 DPA and RMSRE of each stock when (M N) is (60 5) and 119909-axis represents the stock ID

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

0

01

02

03

04

05

06

07

08

09

DPA

001

0

002

003

004

005

006

007

008

009

01

RMSR

E

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

421 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 6 DPA and RMSRE of each stock when (M N) is (10 10) and 119909-axis represents the stock ID

Mathematical Problems in Engineering 9

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

0010203040506070809

DPA

000100200300400500600700800901

RMSR

E

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 7 DPA and RMSRE of each stock when (M N) is (20 10) and 119909-axis represents the stock ID

0

01

02

03

04

05

06

07

08

09

DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 8 DPA and RMSRE of each stock when (M N) is (60 10) and 119909-axis represents the stock ID

0

01

02

03

04

05

06

07

08

09

DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 9 DPA and RMSRE of each stock when (M N) is (10 20) and 119909-axis represents the stock ID

0

01

02

03

04

05

06

07

08

09

DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 10 DPA and RMSRE of each stock when (M N) is (20 20) and 119909-axis represents the stock ID

10 Mathematical Problems in Engineering

0

01

02

03

04

05

06

07

08

09DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 11 DPA and RMSRE of each stock when (M N) is (60 20) and 119909-axis represents the stock ID

which is lower than other six methods in most cases whilethe volatility is smaller However the RMSRE of GAN-FDincreases dramatically and fluctuates violently when119873 is 20and it varies between 121 and 496 This further showsthat we should reduce the model update cycle 119873 and revisethe model parameters regularly to adapt to the change ofmarket style

5 Conclusion

In this paper we propose an easy-to-use stock forecastingmodel called GAN-FD to assist more and more nonfinancialprofessional ordinary investors making decisions GAN-FDadopts 13 simple technical indexes as input data to avoidcomplicated input data preprocessing Based on the deeplearning network thismodel achieves prediction ability supe-rior to other benchmark methods by means of adversarialtraining minimizing direction prediction loss and forecasterror loss Moreover the effects of themodel update cycles onthe predictive capability are analyzed and the experimentalresults show that the smaller model update cycle can obtainbetter prediction performance In the future we will attemptto integrate predictive models under multiscale conditions

Conflicts of Interest

The authors declare that there are no conflicts of interestregarding the publication of this paper

Acknowledgments

This work is supported by the National Key ResearchDevelopment Program of China (2017YFB0802800) andthe National Natural Science Foundation of China (no61473149)

References

[1] R Al-Hmouz W Pedrycz and A Balamash ldquoDescription andprediction of time series a general framework of GranularComputingrdquo Expert Systems with Applications vol 42 no 10pp 4830ndash4839 2015

[2] S Barak and M Modarres ldquoDeveloping an approach to eval-uate stocks by forecasting effective features with data miningmethodsrdquo Expert Systems with Applications vol 42 no 3 pp1325ndash1339 2015

[3] A Booth E Gerding and F McGroarty ldquoAutomated tradingwith performance weighted random forests and seasonalityrdquoExpert Systems with Applications vol 41 no 8 pp 3651ndash36612014

[4] A Bagheri HMohammadi Peyhani andM Akbari ldquoFinancialforecasting usingANFIS networkswithQuantum-behaved Par-ticle Swarm Optimizationrdquo Expert Systems with Applicationsvol 41 no 14 pp 6235ndash6250 2014

[5] Y Son D-J Noh and J Lee ldquoForecasting trends of high-frequency KOSPI200 index data using learning classifiersrdquoExpert Systems with Applications vol 39 no 14 pp 11607ndash116152012

[6] I Aldridge and S Krawciw ldquoReal-Time Risk What InvestorsShould Know About FinTechrdquo in High-Frequency Trading andFlash Crashes JohnWileyamp Sons Inc HobokenNJ USA 2017

[7] F A De Oliveira C N Nobre and L E Zarate ldquoApplyingArtificial Neural Networks to prediction of stock price andimprovement of the directional prediction index - Case studyof PETR4 Petrobras Brazilrdquo Expert Systems with Applicationsvol 40 no 18 pp 7596ndash7606 2013

[8] J H Nino-Pena and G J Hernandez-Perez ldquoPrice directionprediction on high frequency data using deep belief networksrdquoCommunications in Computer and Information Science vol 657pp 74ndash83 2016

[9] A Marszałek and T Burczynrsquoski ldquoModeling and forecastingfinancial time series with ordered fuzzy candlesticksrdquo Informa-tion Sciences vol 273 pp 144ndash155 2014

[10] X Li X Huang X Deng and S Zhu ldquoEnhancing quantitativeintra-day stock return prediction by integrating both marketnews and stock prices informationrdquo Neurocomputing vol 142pp 228ndash238 2014

[11] X Wang S Bao and J Chen ldquoHigh-frequency stock linkageand multi-dimensional stationary processesrdquo Physica A Statis-tical Mechanics and its Applications vol 468 pp 70ndash83 2017

[12] E Chong C Han and F C Park ldquoDeep learning networks forstock market analysis and prediction Methodology data repre-sentations and case studiesrdquo Expert Systems with Applicationsvol 83 pp 187ndash205 2017

[13] I J Goodfellow J Pouget-Abadie M Mirza et al ldquoGenerativeadversarial netsrdquo in Proceedings of the 28th Annual Conference

Mathematical Problems in Engineering 11

on Neural Information Processing Systems 2014 NIPS 2014 pp2672ndash2680 can December 2014

[14] S Iizuka E Simo-Serra and H Ishikawa ldquoGlobally and locallyconsistent image completionrdquo ACM Transactions on Graphicsvol 36 no 4 article no 107 2017

[15] P Luc C Couprie S Chintala and J Verbeek Semanticsegmentation using adversarial networks arXiv preprint arXiv161108408 2016 arXiv161108408

[16] M Mathieu C Couprie and Y LeCun Deep multi-scale videoprediction beyond mean square error arXiv preprint arXiv151105440 2015 arXiv151105440

[17] J D HamiltonTime Series Analysis vol 2 PrincetonUniversityPress 1994

[18] R H Shumway and D S Stoffer Time series analysis and itsapplications Springer Texts in Statistics Springer New YorkNY USA 3rd edition 2011

[19] P J Brockwell and R ADavisTimE SeriesTheory andMethodsSpringer Science amp Business Media 2013

[20] S Pellegrini E Ruiz and A Espasa ldquoPrediction intervalsin conditionally heteroscedastic time series with stochasticcomponentsrdquo International Journal of Forecasting vol 27 no 2pp 308ndash319 2011

[21] Y Kara M Acar Boyacioglu and O K Baykan ldquoPredictingdirection of stock price index movement using artificial neuralnetworks and support vector machines The sample of theIstanbul Stock Exchangerdquo Expert Systems with Applications vol38 no 5 pp 5311ndash5319 2011

[22] M Ghiassi J Skinner andD Zimbra ldquoTwitter brand sentimentanalysis a hybrid system using n-gram analysis and dynamicartificial neural networkrdquo Expert Systems with Applications vol40 no 16 pp 6266ndash6282 2013

[23] M R Hassan ldquoA combination of hidden Markov model andfuzzymodel for stockmarket forecastingrdquoNeurocomputing vol72 no 16-18 pp 3439ndash3446 2009

[24] W Huang Y Nakamori and S-Y Wang ldquoForecasting stockmarket movement direction with support vector machinerdquoComputers ampOperations Research vol 32 no 10 pp 2513ndash25222005

[25] A F S Elsir and H Faris ldquoA Comparison between Regres-sion Artificial Neural Networks and Support Vector Machinesfor Predicting Stock Market Indexrdquo International Journal ofAdvanced Research in Artificial Intelligence vol 4 no 7 2015

[26] R Majhi G Panda G Sahoo A Panda and A ChoubeyldquoPrediction of SampP 500 and DJIA stock indices using particleswarm optimization techniquerdquo in Proceedings of the Proceedingof the IEEE Congress on Evolutionary Computation (CEC rsquo08)pp 1276ndash1282 Hong Kong China June 2008

[27] S S Appadoo Pricing Financial Derivatives with Fuzzy Alge-braic Models ATheoretical and Computational Approach [PhDthesis] University of Manitoba Winnipeg 2006

[28] A Thavaneswaran K Thiagarajah and S S Appadoo ldquoFuzzycoefficient volatility (FCV) models with applicationsrdquo Mathe-matical and Computer Modelling vol 45 no 7-8 pp 777ndash7862007

[29] C Carlsson and R Fuller ldquoOn possibilistic mean value andvariance of fuzzy numbersrdquo Fuzzy Sets and Systems vol 122 no2 pp 315ndash326 2001

[30] A Thavaneswaran S S Appadoo and A Paseka ldquoWeightedpossibilistic moments of fuzzy numbers with applications toGARCH modeling and option pricingrdquo Mathematical andComputer Modelling vol 49 no 1-2 pp 352ndash368 2009

[31] N Srivastava G Hinton A Krizhevsky I Sutskever and RSalakhutdinov ldquoDropout a simple way to prevent neural net-works from overfittingrdquo Journal of Machine Learning Researchvol 15 no 1 pp 1929ndash1958 2014

[32] A M Rather A Agarwal and V N Sastry ldquoRecurrent neuralnetwork and a hybrid model for prediction of stock returnsrdquoExpert Systems with Applications vol 42 no 6 pp 3234ndash32412015

[33] R D A Araujo A L I Oliveira and S Meira ldquoA hybrid modelfor high-frequency stock market forecastingrdquo Expert Systemswith Applications vol 42 no 8 pp 4081ndash4096 2015

[34] H Chen K Xiao J Sun and S Wu ldquoA double-layer neu-ral network framework for high-frequency forecastingrdquo ACMTransactions on Management Information Systems (TMIS) vol7 no 4 article no 11 2017

[35] A Yoshihara K Fujikawa K Seki and K Uehara ldquoPredictingStock Market Trends by Recurrent Deep Neural Networksrdquo inPRICAI 2014 Trends inArtificial Intelligence vol 8862 ofLectureNotes in Computer Science pp 759ndash769 Springer InternationalPublishing Cham 2014

[36] XDing Y Zhang T Liu and J Duan ldquoDeep learning for event-driven stock predictionrdquo in Proceedings of the 24th InternationalJoint Conference on Artificial Intelligence IJCAI 2015 pp 2327ndash2333 arg July 2015

[37] Z Zhou J Zhao and K Xu ldquoCan online emotions predictthe stock market in Chinardquo in Proceedings of the InternationalConference on Web Information Systems Engineering pp 328ndash342 2016

[38] S Hochreiter and J Schmidhuber ldquoLong short-term memoryrdquoNeural Computation vol 9 no 8 pp 1735ndash1780 1997

[39] Y LeCun L Bottou Y Bengio and P Haffner ldquoGradient-basedlearning applied to document recognitionrdquo Proceedings of theIEEE vol 86 no 11 pp 2278ndash2323 1998

[40] A Arevalo J Nino G Hernandez and J Sandoval ldquoHigh-frequency trading strategy based on deep neural networksrdquoin Proceedings of the International conference on intelligentcomputing pp 424ndash436 2016

[41] K-J Kim ldquoFinancial time series forecasting using supportvector machinesrdquo Neurocomputing vol 55 no 1-2 pp 307ndash3192003

[42] S Madge Predicting Stock Price Direction using SupportVector Machines Independent Work Report Spring 2015

Hindawiwwwhindawicom Volume 2018

MathematicsJournal of

Hindawiwwwhindawicom Volume 2018

Mathematical Problems in Engineering

Applied MathematicsJournal of

Hindawiwwwhindawicom Volume 2018

Probability and StatisticsHindawiwwwhindawicom Volume 2018

Journal of

Hindawiwwwhindawicom Volume 2018

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawiwwwhindawicom Volume 2018

OptimizationJournal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Engineering Mathematics

International Journal of

Hindawiwwwhindawicom Volume 2018

Operations ResearchAdvances in

Journal of

Hindawiwwwhindawicom Volume 2018

Function SpacesAbstract and Applied AnalysisHindawiwwwhindawicom Volume 2018

International Journal of Mathematics and Mathematical Sciences

Hindawiwwwhindawicom Volume 2018

Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom

The Scientific World Journal

Volume 2018

Hindawiwwwhindawicom Volume 2018Volume 2018

Numerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisAdvances inAdvances in Discrete Dynamics in

Nature and SocietyHindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom

Dierential EquationsInternational Journal of

Volume 2018

Hindawiwwwhindawicom Volume 2018

Decision SciencesAdvances in

Hindawiwwwhindawicom Volume 2018

AnalysisInternational Journal of

Hindawiwwwhindawicom Volume 2018

Stochastic AnalysisInternational Journal of

Submit your manuscripts atwwwhindawicom

Page 8: Stock Market Prediction on High-Frequency Data Using Generative Adversarial Netsdownloads.hindawi.com/journals/mpe/2018/4907423.pdf · 2018-11-12 · ResearchArticle Stock Market

8 Mathematical Problems in Engineering

0 0010203040506070809

DPA

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

00100200300400500600700800901

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 3 DPA and RMSRE of each stock when (M N) is (10 5) and 119909-axis represents the stock ID

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

0

01

02

03

04

05

06

07

08

09

DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

421 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 4 DPA and RMSRE of each stock when (M N) is (20 5) and 119909-axis represents the stock ID

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

0010203040506070809

DPA

000100200300400500600700800901

RMSR

E

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 5 DPA and RMSRE of each stock when (M N) is (60 5) and 119909-axis represents the stock ID

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

0

01

02

03

04

05

06

07

08

09

DPA

001

0

002

003

004

005

006

007

008

009

01

RMSR

E

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

421 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 6 DPA and RMSRE of each stock when (M N) is (10 10) and 119909-axis represents the stock ID

Mathematical Problems in Engineering 9

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

0010203040506070809

DPA

000100200300400500600700800901

RMSR

E

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 7 DPA and RMSRE of each stock when (M N) is (20 10) and 119909-axis represents the stock ID

0

01

02

03

04

05

06

07

08

09

DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 8 DPA and RMSRE of each stock when (M N) is (60 10) and 119909-axis represents the stock ID

0

01

02

03

04

05

06

07

08

09

DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 9 DPA and RMSRE of each stock when (M N) is (10 20) and 119909-axis represents the stock ID

0

01

02

03

04

05

06

07

08

09

DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 10 DPA and RMSRE of each stock when (M N) is (20 20) and 119909-axis represents the stock ID

10 Mathematical Problems in Engineering

0

01

02

03

04

05

06

07

08

09DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 11 DPA and RMSRE of each stock when (M N) is (60 20) and 119909-axis represents the stock ID

which is lower than other six methods in most cases whilethe volatility is smaller However the RMSRE of GAN-FDincreases dramatically and fluctuates violently when119873 is 20and it varies between 121 and 496 This further showsthat we should reduce the model update cycle 119873 and revisethe model parameters regularly to adapt to the change ofmarket style

5 Conclusion

In this paper we propose an easy-to-use stock forecastingmodel called GAN-FD to assist more and more nonfinancialprofessional ordinary investors making decisions GAN-FDadopts 13 simple technical indexes as input data to avoidcomplicated input data preprocessing Based on the deeplearning network thismodel achieves prediction ability supe-rior to other benchmark methods by means of adversarialtraining minimizing direction prediction loss and forecasterror loss Moreover the effects of themodel update cycles onthe predictive capability are analyzed and the experimentalresults show that the smaller model update cycle can obtainbetter prediction performance In the future we will attemptto integrate predictive models under multiscale conditions

Conflicts of Interest

The authors declare that there are no conflicts of interestregarding the publication of this paper

Acknowledgments

This work is supported by the National Key ResearchDevelopment Program of China (2017YFB0802800) andthe National Natural Science Foundation of China (no61473149)

References

[1] R Al-Hmouz W Pedrycz and A Balamash ldquoDescription andprediction of time series a general framework of GranularComputingrdquo Expert Systems with Applications vol 42 no 10pp 4830ndash4839 2015

[2] S Barak and M Modarres ldquoDeveloping an approach to eval-uate stocks by forecasting effective features with data miningmethodsrdquo Expert Systems with Applications vol 42 no 3 pp1325ndash1339 2015

[3] A Booth E Gerding and F McGroarty ldquoAutomated tradingwith performance weighted random forests and seasonalityrdquoExpert Systems with Applications vol 41 no 8 pp 3651ndash36612014

[4] A Bagheri HMohammadi Peyhani andM Akbari ldquoFinancialforecasting usingANFIS networkswithQuantum-behaved Par-ticle Swarm Optimizationrdquo Expert Systems with Applicationsvol 41 no 14 pp 6235ndash6250 2014

[5] Y Son D-J Noh and J Lee ldquoForecasting trends of high-frequency KOSPI200 index data using learning classifiersrdquoExpert Systems with Applications vol 39 no 14 pp 11607ndash116152012

[6] I Aldridge and S Krawciw ldquoReal-Time Risk What InvestorsShould Know About FinTechrdquo in High-Frequency Trading andFlash Crashes JohnWileyamp Sons Inc HobokenNJ USA 2017

[7] F A De Oliveira C N Nobre and L E Zarate ldquoApplyingArtificial Neural Networks to prediction of stock price andimprovement of the directional prediction index - Case studyof PETR4 Petrobras Brazilrdquo Expert Systems with Applicationsvol 40 no 18 pp 7596ndash7606 2013

[8] J H Nino-Pena and G J Hernandez-Perez ldquoPrice directionprediction on high frequency data using deep belief networksrdquoCommunications in Computer and Information Science vol 657pp 74ndash83 2016

[9] A Marszałek and T Burczynrsquoski ldquoModeling and forecastingfinancial time series with ordered fuzzy candlesticksrdquo Informa-tion Sciences vol 273 pp 144ndash155 2014

[10] X Li X Huang X Deng and S Zhu ldquoEnhancing quantitativeintra-day stock return prediction by integrating both marketnews and stock prices informationrdquo Neurocomputing vol 142pp 228ndash238 2014

[11] X Wang S Bao and J Chen ldquoHigh-frequency stock linkageand multi-dimensional stationary processesrdquo Physica A Statis-tical Mechanics and its Applications vol 468 pp 70ndash83 2017

[12] E Chong C Han and F C Park ldquoDeep learning networks forstock market analysis and prediction Methodology data repre-sentations and case studiesrdquo Expert Systems with Applicationsvol 83 pp 187ndash205 2017

[13] I J Goodfellow J Pouget-Abadie M Mirza et al ldquoGenerativeadversarial netsrdquo in Proceedings of the 28th Annual Conference

Mathematical Problems in Engineering 11

on Neural Information Processing Systems 2014 NIPS 2014 pp2672ndash2680 can December 2014

[14] S Iizuka E Simo-Serra and H Ishikawa ldquoGlobally and locallyconsistent image completionrdquo ACM Transactions on Graphicsvol 36 no 4 article no 107 2017

[15] P Luc C Couprie S Chintala and J Verbeek Semanticsegmentation using adversarial networks arXiv preprint arXiv161108408 2016 arXiv161108408

[16] M Mathieu C Couprie and Y LeCun Deep multi-scale videoprediction beyond mean square error arXiv preprint arXiv151105440 2015 arXiv151105440

[17] J D HamiltonTime Series Analysis vol 2 PrincetonUniversityPress 1994

[18] R H Shumway and D S Stoffer Time series analysis and itsapplications Springer Texts in Statistics Springer New YorkNY USA 3rd edition 2011

[19] P J Brockwell and R ADavisTimE SeriesTheory andMethodsSpringer Science amp Business Media 2013

[20] S Pellegrini E Ruiz and A Espasa ldquoPrediction intervalsin conditionally heteroscedastic time series with stochasticcomponentsrdquo International Journal of Forecasting vol 27 no 2pp 308ndash319 2011

[21] Y Kara M Acar Boyacioglu and O K Baykan ldquoPredictingdirection of stock price index movement using artificial neuralnetworks and support vector machines The sample of theIstanbul Stock Exchangerdquo Expert Systems with Applications vol38 no 5 pp 5311ndash5319 2011

[22] M Ghiassi J Skinner andD Zimbra ldquoTwitter brand sentimentanalysis a hybrid system using n-gram analysis and dynamicartificial neural networkrdquo Expert Systems with Applications vol40 no 16 pp 6266ndash6282 2013

[23] M R Hassan ldquoA combination of hidden Markov model andfuzzymodel for stockmarket forecastingrdquoNeurocomputing vol72 no 16-18 pp 3439ndash3446 2009

[24] W Huang Y Nakamori and S-Y Wang ldquoForecasting stockmarket movement direction with support vector machinerdquoComputers ampOperations Research vol 32 no 10 pp 2513ndash25222005

[25] A F S Elsir and H Faris ldquoA Comparison between Regres-sion Artificial Neural Networks and Support Vector Machinesfor Predicting Stock Market Indexrdquo International Journal ofAdvanced Research in Artificial Intelligence vol 4 no 7 2015

[26] R Majhi G Panda G Sahoo A Panda and A ChoubeyldquoPrediction of SampP 500 and DJIA stock indices using particleswarm optimization techniquerdquo in Proceedings of the Proceedingof the IEEE Congress on Evolutionary Computation (CEC rsquo08)pp 1276ndash1282 Hong Kong China June 2008

[27] S S Appadoo Pricing Financial Derivatives with Fuzzy Alge-braic Models ATheoretical and Computational Approach [PhDthesis] University of Manitoba Winnipeg 2006

[28] A Thavaneswaran K Thiagarajah and S S Appadoo ldquoFuzzycoefficient volatility (FCV) models with applicationsrdquo Mathe-matical and Computer Modelling vol 45 no 7-8 pp 777ndash7862007

[29] C Carlsson and R Fuller ldquoOn possibilistic mean value andvariance of fuzzy numbersrdquo Fuzzy Sets and Systems vol 122 no2 pp 315ndash326 2001

[30] A Thavaneswaran S S Appadoo and A Paseka ldquoWeightedpossibilistic moments of fuzzy numbers with applications toGARCH modeling and option pricingrdquo Mathematical andComputer Modelling vol 49 no 1-2 pp 352ndash368 2009

[31] N Srivastava G Hinton A Krizhevsky I Sutskever and RSalakhutdinov ldquoDropout a simple way to prevent neural net-works from overfittingrdquo Journal of Machine Learning Researchvol 15 no 1 pp 1929ndash1958 2014

[32] A M Rather A Agarwal and V N Sastry ldquoRecurrent neuralnetwork and a hybrid model for prediction of stock returnsrdquoExpert Systems with Applications vol 42 no 6 pp 3234ndash32412015

[33] R D A Araujo A L I Oliveira and S Meira ldquoA hybrid modelfor high-frequency stock market forecastingrdquo Expert Systemswith Applications vol 42 no 8 pp 4081ndash4096 2015

[34] H Chen K Xiao J Sun and S Wu ldquoA double-layer neu-ral network framework for high-frequency forecastingrdquo ACMTransactions on Management Information Systems (TMIS) vol7 no 4 article no 11 2017

[35] A Yoshihara K Fujikawa K Seki and K Uehara ldquoPredictingStock Market Trends by Recurrent Deep Neural Networksrdquo inPRICAI 2014 Trends inArtificial Intelligence vol 8862 ofLectureNotes in Computer Science pp 759ndash769 Springer InternationalPublishing Cham 2014

[36] XDing Y Zhang T Liu and J Duan ldquoDeep learning for event-driven stock predictionrdquo in Proceedings of the 24th InternationalJoint Conference on Artificial Intelligence IJCAI 2015 pp 2327ndash2333 arg July 2015

[37] Z Zhou J Zhao and K Xu ldquoCan online emotions predictthe stock market in Chinardquo in Proceedings of the InternationalConference on Web Information Systems Engineering pp 328ndash342 2016

[38] S Hochreiter and J Schmidhuber ldquoLong short-term memoryrdquoNeural Computation vol 9 no 8 pp 1735ndash1780 1997

[39] Y LeCun L Bottou Y Bengio and P Haffner ldquoGradient-basedlearning applied to document recognitionrdquo Proceedings of theIEEE vol 86 no 11 pp 2278ndash2323 1998

[40] A Arevalo J Nino G Hernandez and J Sandoval ldquoHigh-frequency trading strategy based on deep neural networksrdquoin Proceedings of the International conference on intelligentcomputing pp 424ndash436 2016

[41] K-J Kim ldquoFinancial time series forecasting using supportvector machinesrdquo Neurocomputing vol 55 no 1-2 pp 307ndash3192003

[42] S Madge Predicting Stock Price Direction using SupportVector Machines Independent Work Report Spring 2015

Hindawiwwwhindawicom Volume 2018

MathematicsJournal of

Hindawiwwwhindawicom Volume 2018

Mathematical Problems in Engineering

Applied MathematicsJournal of

Hindawiwwwhindawicom Volume 2018

Probability and StatisticsHindawiwwwhindawicom Volume 2018

Journal of

Hindawiwwwhindawicom Volume 2018

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawiwwwhindawicom Volume 2018

OptimizationJournal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Engineering Mathematics

International Journal of

Hindawiwwwhindawicom Volume 2018

Operations ResearchAdvances in

Journal of

Hindawiwwwhindawicom Volume 2018

Function SpacesAbstract and Applied AnalysisHindawiwwwhindawicom Volume 2018

International Journal of Mathematics and Mathematical Sciences

Hindawiwwwhindawicom Volume 2018

Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom

The Scientific World Journal

Volume 2018

Hindawiwwwhindawicom Volume 2018Volume 2018

Numerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisAdvances inAdvances in Discrete Dynamics in

Nature and SocietyHindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom

Dierential EquationsInternational Journal of

Volume 2018

Hindawiwwwhindawicom Volume 2018

Decision SciencesAdvances in

Hindawiwwwhindawicom Volume 2018

AnalysisInternational Journal of

Hindawiwwwhindawicom Volume 2018

Stochastic AnalysisInternational Journal of

Submit your manuscripts atwwwhindawicom

Page 9: Stock Market Prediction on High-Frequency Data Using Generative Adversarial Netsdownloads.hindawi.com/journals/mpe/2018/4907423.pdf · 2018-11-12 · ResearchArticle Stock Market

Mathematical Problems in Engineering 9

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

0010203040506070809

DPA

000100200300400500600700800901

RMSR

E

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 7 DPA and RMSRE of each stock when (M N) is (20 10) and 119909-axis represents the stock ID

0

01

02

03

04

05

06

07

08

09

DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 8 DPA and RMSRE of each stock when (M N) is (60 10) and 119909-axis represents the stock ID

0

01

02

03

04

05

06

07

08

09

DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 9 DPA and RMSRE of each stock when (M N) is (10 20) and 119909-axis represents the stock ID

0

01

02

03

04

05

06

07

08

09

DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 10 DPA and RMSRE of each stock when (M N) is (20 20) and 119909-axis represents the stock ID

10 Mathematical Problems in Engineering

0

01

02

03

04

05

06

07

08

09DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 11 DPA and RMSRE of each stock when (M N) is (60 20) and 119909-axis represents the stock ID

which is lower than other six methods in most cases whilethe volatility is smaller However the RMSRE of GAN-FDincreases dramatically and fluctuates violently when119873 is 20and it varies between 121 and 496 This further showsthat we should reduce the model update cycle 119873 and revisethe model parameters regularly to adapt to the change ofmarket style

5 Conclusion

In this paper we propose an easy-to-use stock forecastingmodel called GAN-FD to assist more and more nonfinancialprofessional ordinary investors making decisions GAN-FDadopts 13 simple technical indexes as input data to avoidcomplicated input data preprocessing Based on the deeplearning network thismodel achieves prediction ability supe-rior to other benchmark methods by means of adversarialtraining minimizing direction prediction loss and forecasterror loss Moreover the effects of themodel update cycles onthe predictive capability are analyzed and the experimentalresults show that the smaller model update cycle can obtainbetter prediction performance In the future we will attemptto integrate predictive models under multiscale conditions

Conflicts of Interest

The authors declare that there are no conflicts of interestregarding the publication of this paper

Acknowledgments

This work is supported by the National Key ResearchDevelopment Program of China (2017YFB0802800) andthe National Natural Science Foundation of China (no61473149)

References

[1] R Al-Hmouz W Pedrycz and A Balamash ldquoDescription andprediction of time series a general framework of GranularComputingrdquo Expert Systems with Applications vol 42 no 10pp 4830ndash4839 2015

[2] S Barak and M Modarres ldquoDeveloping an approach to eval-uate stocks by forecasting effective features with data miningmethodsrdquo Expert Systems with Applications vol 42 no 3 pp1325ndash1339 2015

[3] A Booth E Gerding and F McGroarty ldquoAutomated tradingwith performance weighted random forests and seasonalityrdquoExpert Systems with Applications vol 41 no 8 pp 3651ndash36612014

[4] A Bagheri HMohammadi Peyhani andM Akbari ldquoFinancialforecasting usingANFIS networkswithQuantum-behaved Par-ticle Swarm Optimizationrdquo Expert Systems with Applicationsvol 41 no 14 pp 6235ndash6250 2014

[5] Y Son D-J Noh and J Lee ldquoForecasting trends of high-frequency KOSPI200 index data using learning classifiersrdquoExpert Systems with Applications vol 39 no 14 pp 11607ndash116152012

[6] I Aldridge and S Krawciw ldquoReal-Time Risk What InvestorsShould Know About FinTechrdquo in High-Frequency Trading andFlash Crashes JohnWileyamp Sons Inc HobokenNJ USA 2017

[7] F A De Oliveira C N Nobre and L E Zarate ldquoApplyingArtificial Neural Networks to prediction of stock price andimprovement of the directional prediction index - Case studyof PETR4 Petrobras Brazilrdquo Expert Systems with Applicationsvol 40 no 18 pp 7596ndash7606 2013

[8] J H Nino-Pena and G J Hernandez-Perez ldquoPrice directionprediction on high frequency data using deep belief networksrdquoCommunications in Computer and Information Science vol 657pp 74ndash83 2016

[9] A Marszałek and T Burczynrsquoski ldquoModeling and forecastingfinancial time series with ordered fuzzy candlesticksrdquo Informa-tion Sciences vol 273 pp 144ndash155 2014

[10] X Li X Huang X Deng and S Zhu ldquoEnhancing quantitativeintra-day stock return prediction by integrating both marketnews and stock prices informationrdquo Neurocomputing vol 142pp 228ndash238 2014

[11] X Wang S Bao and J Chen ldquoHigh-frequency stock linkageand multi-dimensional stationary processesrdquo Physica A Statis-tical Mechanics and its Applications vol 468 pp 70ndash83 2017

[12] E Chong C Han and F C Park ldquoDeep learning networks forstock market analysis and prediction Methodology data repre-sentations and case studiesrdquo Expert Systems with Applicationsvol 83 pp 187ndash205 2017

[13] I J Goodfellow J Pouget-Abadie M Mirza et al ldquoGenerativeadversarial netsrdquo in Proceedings of the 28th Annual Conference

Mathematical Problems in Engineering 11

on Neural Information Processing Systems 2014 NIPS 2014 pp2672ndash2680 can December 2014

[14] S Iizuka E Simo-Serra and H Ishikawa ldquoGlobally and locallyconsistent image completionrdquo ACM Transactions on Graphicsvol 36 no 4 article no 107 2017

[15] P Luc C Couprie S Chintala and J Verbeek Semanticsegmentation using adversarial networks arXiv preprint arXiv161108408 2016 arXiv161108408

[16] M Mathieu C Couprie and Y LeCun Deep multi-scale videoprediction beyond mean square error arXiv preprint arXiv151105440 2015 arXiv151105440

[17] J D HamiltonTime Series Analysis vol 2 PrincetonUniversityPress 1994

[18] R H Shumway and D S Stoffer Time series analysis and itsapplications Springer Texts in Statistics Springer New YorkNY USA 3rd edition 2011

[19] P J Brockwell and R ADavisTimE SeriesTheory andMethodsSpringer Science amp Business Media 2013

[20] S Pellegrini E Ruiz and A Espasa ldquoPrediction intervalsin conditionally heteroscedastic time series with stochasticcomponentsrdquo International Journal of Forecasting vol 27 no 2pp 308ndash319 2011

[21] Y Kara M Acar Boyacioglu and O K Baykan ldquoPredictingdirection of stock price index movement using artificial neuralnetworks and support vector machines The sample of theIstanbul Stock Exchangerdquo Expert Systems with Applications vol38 no 5 pp 5311ndash5319 2011

[22] M Ghiassi J Skinner andD Zimbra ldquoTwitter brand sentimentanalysis a hybrid system using n-gram analysis and dynamicartificial neural networkrdquo Expert Systems with Applications vol40 no 16 pp 6266ndash6282 2013

[23] M R Hassan ldquoA combination of hidden Markov model andfuzzymodel for stockmarket forecastingrdquoNeurocomputing vol72 no 16-18 pp 3439ndash3446 2009

[24] W Huang Y Nakamori and S-Y Wang ldquoForecasting stockmarket movement direction with support vector machinerdquoComputers ampOperations Research vol 32 no 10 pp 2513ndash25222005

[25] A F S Elsir and H Faris ldquoA Comparison between Regres-sion Artificial Neural Networks and Support Vector Machinesfor Predicting Stock Market Indexrdquo International Journal ofAdvanced Research in Artificial Intelligence vol 4 no 7 2015

[26] R Majhi G Panda G Sahoo A Panda and A ChoubeyldquoPrediction of SampP 500 and DJIA stock indices using particleswarm optimization techniquerdquo in Proceedings of the Proceedingof the IEEE Congress on Evolutionary Computation (CEC rsquo08)pp 1276ndash1282 Hong Kong China June 2008

[27] S S Appadoo Pricing Financial Derivatives with Fuzzy Alge-braic Models ATheoretical and Computational Approach [PhDthesis] University of Manitoba Winnipeg 2006

[28] A Thavaneswaran K Thiagarajah and S S Appadoo ldquoFuzzycoefficient volatility (FCV) models with applicationsrdquo Mathe-matical and Computer Modelling vol 45 no 7-8 pp 777ndash7862007

[29] C Carlsson and R Fuller ldquoOn possibilistic mean value andvariance of fuzzy numbersrdquo Fuzzy Sets and Systems vol 122 no2 pp 315ndash326 2001

[30] A Thavaneswaran S S Appadoo and A Paseka ldquoWeightedpossibilistic moments of fuzzy numbers with applications toGARCH modeling and option pricingrdquo Mathematical andComputer Modelling vol 49 no 1-2 pp 352ndash368 2009

[31] N Srivastava G Hinton A Krizhevsky I Sutskever and RSalakhutdinov ldquoDropout a simple way to prevent neural net-works from overfittingrdquo Journal of Machine Learning Researchvol 15 no 1 pp 1929ndash1958 2014

[32] A M Rather A Agarwal and V N Sastry ldquoRecurrent neuralnetwork and a hybrid model for prediction of stock returnsrdquoExpert Systems with Applications vol 42 no 6 pp 3234ndash32412015

[33] R D A Araujo A L I Oliveira and S Meira ldquoA hybrid modelfor high-frequency stock market forecastingrdquo Expert Systemswith Applications vol 42 no 8 pp 4081ndash4096 2015

[34] H Chen K Xiao J Sun and S Wu ldquoA double-layer neu-ral network framework for high-frequency forecastingrdquo ACMTransactions on Management Information Systems (TMIS) vol7 no 4 article no 11 2017

[35] A Yoshihara K Fujikawa K Seki and K Uehara ldquoPredictingStock Market Trends by Recurrent Deep Neural Networksrdquo inPRICAI 2014 Trends inArtificial Intelligence vol 8862 ofLectureNotes in Computer Science pp 759ndash769 Springer InternationalPublishing Cham 2014

[36] XDing Y Zhang T Liu and J Duan ldquoDeep learning for event-driven stock predictionrdquo in Proceedings of the 24th InternationalJoint Conference on Artificial Intelligence IJCAI 2015 pp 2327ndash2333 arg July 2015

[37] Z Zhou J Zhao and K Xu ldquoCan online emotions predictthe stock market in Chinardquo in Proceedings of the InternationalConference on Web Information Systems Engineering pp 328ndash342 2016

[38] S Hochreiter and J Schmidhuber ldquoLong short-term memoryrdquoNeural Computation vol 9 no 8 pp 1735ndash1780 1997

[39] Y LeCun L Bottou Y Bengio and P Haffner ldquoGradient-basedlearning applied to document recognitionrdquo Proceedings of theIEEE vol 86 no 11 pp 2278ndash2323 1998

[40] A Arevalo J Nino G Hernandez and J Sandoval ldquoHigh-frequency trading strategy based on deep neural networksrdquoin Proceedings of the International conference on intelligentcomputing pp 424ndash436 2016

[41] K-J Kim ldquoFinancial time series forecasting using supportvector machinesrdquo Neurocomputing vol 55 no 1-2 pp 307ndash3192003

[42] S Madge Predicting Stock Price Direction using SupportVector Machines Independent Work Report Spring 2015

Hindawiwwwhindawicom Volume 2018

MathematicsJournal of

Hindawiwwwhindawicom Volume 2018

Mathematical Problems in Engineering

Applied MathematicsJournal of

Hindawiwwwhindawicom Volume 2018

Probability and StatisticsHindawiwwwhindawicom Volume 2018

Journal of

Hindawiwwwhindawicom Volume 2018

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawiwwwhindawicom Volume 2018

OptimizationJournal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Engineering Mathematics

International Journal of

Hindawiwwwhindawicom Volume 2018

Operations ResearchAdvances in

Journal of

Hindawiwwwhindawicom Volume 2018

Function SpacesAbstract and Applied AnalysisHindawiwwwhindawicom Volume 2018

International Journal of Mathematics and Mathematical Sciences

Hindawiwwwhindawicom Volume 2018

Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom

The Scientific World Journal

Volume 2018

Hindawiwwwhindawicom Volume 2018Volume 2018

Numerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisAdvances inAdvances in Discrete Dynamics in

Nature and SocietyHindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom

Dierential EquationsInternational Journal of

Volume 2018

Hindawiwwwhindawicom Volume 2018

Decision SciencesAdvances in

Hindawiwwwhindawicom Volume 2018

AnalysisInternational Journal of

Hindawiwwwhindawicom Volume 2018

Stochastic AnalysisInternational Journal of

Submit your manuscripts atwwwhindawicom

Page 10: Stock Market Prediction on High-Frequency Data Using Generative Adversarial Netsdownloads.hindawi.com/journals/mpe/2018/4907423.pdf · 2018-11-12 · ResearchArticle Stock Market

10 Mathematical Problems in Engineering

0

01

02

03

04

05

06

07

08

09DPA

0

001

002

003

004

005

006

007

008

009

01

RMSR

E

ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD ARIMA-GARCHANNSVM

GAN-FGAN-DLSTM-FD

GAN-FD

1 2 4 6 83 5 7 910

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42 1 2 4 6 83 5 7 9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Figure 11 DPA and RMSRE of each stock when (M N) is (60 20) and 119909-axis represents the stock ID

which is lower than other six methods in most cases whilethe volatility is smaller However the RMSRE of GAN-FDincreases dramatically and fluctuates violently when119873 is 20and it varies between 121 and 496 This further showsthat we should reduce the model update cycle 119873 and revisethe model parameters regularly to adapt to the change ofmarket style

5 Conclusion

In this paper we propose an easy-to-use stock forecastingmodel called GAN-FD to assist more and more nonfinancialprofessional ordinary investors making decisions GAN-FDadopts 13 simple technical indexes as input data to avoidcomplicated input data preprocessing Based on the deeplearning network thismodel achieves prediction ability supe-rior to other benchmark methods by means of adversarialtraining minimizing direction prediction loss and forecasterror loss Moreover the effects of themodel update cycles onthe predictive capability are analyzed and the experimentalresults show that the smaller model update cycle can obtainbetter prediction performance In the future we will attemptto integrate predictive models under multiscale conditions

Conflicts of Interest

The authors declare that there are no conflicts of interestregarding the publication of this paper

Acknowledgments

This work is supported by the National Key ResearchDevelopment Program of China (2017YFB0802800) andthe National Natural Science Foundation of China (no61473149)

References

[1] R Al-Hmouz W Pedrycz and A Balamash ldquoDescription andprediction of time series a general framework of GranularComputingrdquo Expert Systems with Applications vol 42 no 10pp 4830ndash4839 2015

[2] S Barak and M Modarres ldquoDeveloping an approach to eval-uate stocks by forecasting effective features with data miningmethodsrdquo Expert Systems with Applications vol 42 no 3 pp1325ndash1339 2015

[3] A Booth E Gerding and F McGroarty ldquoAutomated tradingwith performance weighted random forests and seasonalityrdquoExpert Systems with Applications vol 41 no 8 pp 3651ndash36612014

[4] A Bagheri HMohammadi Peyhani andM Akbari ldquoFinancialforecasting usingANFIS networkswithQuantum-behaved Par-ticle Swarm Optimizationrdquo Expert Systems with Applicationsvol 41 no 14 pp 6235ndash6250 2014

[5] Y Son D-J Noh and J Lee ldquoForecasting trends of high-frequency KOSPI200 index data using learning classifiersrdquoExpert Systems with Applications vol 39 no 14 pp 11607ndash116152012

[6] I Aldridge and S Krawciw ldquoReal-Time Risk What InvestorsShould Know About FinTechrdquo in High-Frequency Trading andFlash Crashes JohnWileyamp Sons Inc HobokenNJ USA 2017

[7] F A De Oliveira C N Nobre and L E Zarate ldquoApplyingArtificial Neural Networks to prediction of stock price andimprovement of the directional prediction index - Case studyof PETR4 Petrobras Brazilrdquo Expert Systems with Applicationsvol 40 no 18 pp 7596ndash7606 2013

[8] J H Nino-Pena and G J Hernandez-Perez ldquoPrice directionprediction on high frequency data using deep belief networksrdquoCommunications in Computer and Information Science vol 657pp 74ndash83 2016

[9] A Marszałek and T Burczynrsquoski ldquoModeling and forecastingfinancial time series with ordered fuzzy candlesticksrdquo Informa-tion Sciences vol 273 pp 144ndash155 2014

[10] X Li X Huang X Deng and S Zhu ldquoEnhancing quantitativeintra-day stock return prediction by integrating both marketnews and stock prices informationrdquo Neurocomputing vol 142pp 228ndash238 2014

[11] X Wang S Bao and J Chen ldquoHigh-frequency stock linkageand multi-dimensional stationary processesrdquo Physica A Statis-tical Mechanics and its Applications vol 468 pp 70ndash83 2017

[12] E Chong C Han and F C Park ldquoDeep learning networks forstock market analysis and prediction Methodology data repre-sentations and case studiesrdquo Expert Systems with Applicationsvol 83 pp 187ndash205 2017

[13] I J Goodfellow J Pouget-Abadie M Mirza et al ldquoGenerativeadversarial netsrdquo in Proceedings of the 28th Annual Conference

Mathematical Problems in Engineering 11

on Neural Information Processing Systems 2014 NIPS 2014 pp2672ndash2680 can December 2014

[14] S Iizuka E Simo-Serra and H Ishikawa ldquoGlobally and locallyconsistent image completionrdquo ACM Transactions on Graphicsvol 36 no 4 article no 107 2017

[15] P Luc C Couprie S Chintala and J Verbeek Semanticsegmentation using adversarial networks arXiv preprint arXiv161108408 2016 arXiv161108408

[16] M Mathieu C Couprie and Y LeCun Deep multi-scale videoprediction beyond mean square error arXiv preprint arXiv151105440 2015 arXiv151105440

[17] J D HamiltonTime Series Analysis vol 2 PrincetonUniversityPress 1994

[18] R H Shumway and D S Stoffer Time series analysis and itsapplications Springer Texts in Statistics Springer New YorkNY USA 3rd edition 2011

[19] P J Brockwell and R ADavisTimE SeriesTheory andMethodsSpringer Science amp Business Media 2013

[20] S Pellegrini E Ruiz and A Espasa ldquoPrediction intervalsin conditionally heteroscedastic time series with stochasticcomponentsrdquo International Journal of Forecasting vol 27 no 2pp 308ndash319 2011

[21] Y Kara M Acar Boyacioglu and O K Baykan ldquoPredictingdirection of stock price index movement using artificial neuralnetworks and support vector machines The sample of theIstanbul Stock Exchangerdquo Expert Systems with Applications vol38 no 5 pp 5311ndash5319 2011

[22] M Ghiassi J Skinner andD Zimbra ldquoTwitter brand sentimentanalysis a hybrid system using n-gram analysis and dynamicartificial neural networkrdquo Expert Systems with Applications vol40 no 16 pp 6266ndash6282 2013

[23] M R Hassan ldquoA combination of hidden Markov model andfuzzymodel for stockmarket forecastingrdquoNeurocomputing vol72 no 16-18 pp 3439ndash3446 2009

[24] W Huang Y Nakamori and S-Y Wang ldquoForecasting stockmarket movement direction with support vector machinerdquoComputers ampOperations Research vol 32 no 10 pp 2513ndash25222005

[25] A F S Elsir and H Faris ldquoA Comparison between Regres-sion Artificial Neural Networks and Support Vector Machinesfor Predicting Stock Market Indexrdquo International Journal ofAdvanced Research in Artificial Intelligence vol 4 no 7 2015

[26] R Majhi G Panda G Sahoo A Panda and A ChoubeyldquoPrediction of SampP 500 and DJIA stock indices using particleswarm optimization techniquerdquo in Proceedings of the Proceedingof the IEEE Congress on Evolutionary Computation (CEC rsquo08)pp 1276ndash1282 Hong Kong China June 2008

[27] S S Appadoo Pricing Financial Derivatives with Fuzzy Alge-braic Models ATheoretical and Computational Approach [PhDthesis] University of Manitoba Winnipeg 2006

[28] A Thavaneswaran K Thiagarajah and S S Appadoo ldquoFuzzycoefficient volatility (FCV) models with applicationsrdquo Mathe-matical and Computer Modelling vol 45 no 7-8 pp 777ndash7862007

[29] C Carlsson and R Fuller ldquoOn possibilistic mean value andvariance of fuzzy numbersrdquo Fuzzy Sets and Systems vol 122 no2 pp 315ndash326 2001

[30] A Thavaneswaran S S Appadoo and A Paseka ldquoWeightedpossibilistic moments of fuzzy numbers with applications toGARCH modeling and option pricingrdquo Mathematical andComputer Modelling vol 49 no 1-2 pp 352ndash368 2009

[31] N Srivastava G Hinton A Krizhevsky I Sutskever and RSalakhutdinov ldquoDropout a simple way to prevent neural net-works from overfittingrdquo Journal of Machine Learning Researchvol 15 no 1 pp 1929ndash1958 2014

[32] A M Rather A Agarwal and V N Sastry ldquoRecurrent neuralnetwork and a hybrid model for prediction of stock returnsrdquoExpert Systems with Applications vol 42 no 6 pp 3234ndash32412015

[33] R D A Araujo A L I Oliveira and S Meira ldquoA hybrid modelfor high-frequency stock market forecastingrdquo Expert Systemswith Applications vol 42 no 8 pp 4081ndash4096 2015

[34] H Chen K Xiao J Sun and S Wu ldquoA double-layer neu-ral network framework for high-frequency forecastingrdquo ACMTransactions on Management Information Systems (TMIS) vol7 no 4 article no 11 2017

[35] A Yoshihara K Fujikawa K Seki and K Uehara ldquoPredictingStock Market Trends by Recurrent Deep Neural Networksrdquo inPRICAI 2014 Trends inArtificial Intelligence vol 8862 ofLectureNotes in Computer Science pp 759ndash769 Springer InternationalPublishing Cham 2014

[36] XDing Y Zhang T Liu and J Duan ldquoDeep learning for event-driven stock predictionrdquo in Proceedings of the 24th InternationalJoint Conference on Artificial Intelligence IJCAI 2015 pp 2327ndash2333 arg July 2015

[37] Z Zhou J Zhao and K Xu ldquoCan online emotions predictthe stock market in Chinardquo in Proceedings of the InternationalConference on Web Information Systems Engineering pp 328ndash342 2016

[38] S Hochreiter and J Schmidhuber ldquoLong short-term memoryrdquoNeural Computation vol 9 no 8 pp 1735ndash1780 1997

[39] Y LeCun L Bottou Y Bengio and P Haffner ldquoGradient-basedlearning applied to document recognitionrdquo Proceedings of theIEEE vol 86 no 11 pp 2278ndash2323 1998

[40] A Arevalo J Nino G Hernandez and J Sandoval ldquoHigh-frequency trading strategy based on deep neural networksrdquoin Proceedings of the International conference on intelligentcomputing pp 424ndash436 2016

[41] K-J Kim ldquoFinancial time series forecasting using supportvector machinesrdquo Neurocomputing vol 55 no 1-2 pp 307ndash3192003

[42] S Madge Predicting Stock Price Direction using SupportVector Machines Independent Work Report Spring 2015

Hindawiwwwhindawicom Volume 2018

MathematicsJournal of

Hindawiwwwhindawicom Volume 2018

Mathematical Problems in Engineering

Applied MathematicsJournal of

Hindawiwwwhindawicom Volume 2018

Probability and StatisticsHindawiwwwhindawicom Volume 2018

Journal of

Hindawiwwwhindawicom Volume 2018

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawiwwwhindawicom Volume 2018

OptimizationJournal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Engineering Mathematics

International Journal of

Hindawiwwwhindawicom Volume 2018

Operations ResearchAdvances in

Journal of

Hindawiwwwhindawicom Volume 2018

Function SpacesAbstract and Applied AnalysisHindawiwwwhindawicom Volume 2018

International Journal of Mathematics and Mathematical Sciences

Hindawiwwwhindawicom Volume 2018

Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom

The Scientific World Journal

Volume 2018

Hindawiwwwhindawicom Volume 2018Volume 2018

Numerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisAdvances inAdvances in Discrete Dynamics in

Nature and SocietyHindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom

Dierential EquationsInternational Journal of

Volume 2018

Hindawiwwwhindawicom Volume 2018

Decision SciencesAdvances in

Hindawiwwwhindawicom Volume 2018

AnalysisInternational Journal of

Hindawiwwwhindawicom Volume 2018

Stochastic AnalysisInternational Journal of

Submit your manuscripts atwwwhindawicom

Page 11: Stock Market Prediction on High-Frequency Data Using Generative Adversarial Netsdownloads.hindawi.com/journals/mpe/2018/4907423.pdf · 2018-11-12 · ResearchArticle Stock Market

Mathematical Problems in Engineering 11

on Neural Information Processing Systems 2014 NIPS 2014 pp2672ndash2680 can December 2014

[14] S Iizuka E Simo-Serra and H Ishikawa ldquoGlobally and locallyconsistent image completionrdquo ACM Transactions on Graphicsvol 36 no 4 article no 107 2017

[15] P Luc C Couprie S Chintala and J Verbeek Semanticsegmentation using adversarial networks arXiv preprint arXiv161108408 2016 arXiv161108408

[16] M Mathieu C Couprie and Y LeCun Deep multi-scale videoprediction beyond mean square error arXiv preprint arXiv151105440 2015 arXiv151105440

[17] J D HamiltonTime Series Analysis vol 2 PrincetonUniversityPress 1994

[18] R H Shumway and D S Stoffer Time series analysis and itsapplications Springer Texts in Statistics Springer New YorkNY USA 3rd edition 2011

[19] P J Brockwell and R ADavisTimE SeriesTheory andMethodsSpringer Science amp Business Media 2013

[20] S Pellegrini E Ruiz and A Espasa ldquoPrediction intervalsin conditionally heteroscedastic time series with stochasticcomponentsrdquo International Journal of Forecasting vol 27 no 2pp 308ndash319 2011

[21] Y Kara M Acar Boyacioglu and O K Baykan ldquoPredictingdirection of stock price index movement using artificial neuralnetworks and support vector machines The sample of theIstanbul Stock Exchangerdquo Expert Systems with Applications vol38 no 5 pp 5311ndash5319 2011

[22] M Ghiassi J Skinner andD Zimbra ldquoTwitter brand sentimentanalysis a hybrid system using n-gram analysis and dynamicartificial neural networkrdquo Expert Systems with Applications vol40 no 16 pp 6266ndash6282 2013

[23] M R Hassan ldquoA combination of hidden Markov model andfuzzymodel for stockmarket forecastingrdquoNeurocomputing vol72 no 16-18 pp 3439ndash3446 2009

[24] W Huang Y Nakamori and S-Y Wang ldquoForecasting stockmarket movement direction with support vector machinerdquoComputers ampOperations Research vol 32 no 10 pp 2513ndash25222005

[25] A F S Elsir and H Faris ldquoA Comparison between Regres-sion Artificial Neural Networks and Support Vector Machinesfor Predicting Stock Market Indexrdquo International Journal ofAdvanced Research in Artificial Intelligence vol 4 no 7 2015

[26] R Majhi G Panda G Sahoo A Panda and A ChoubeyldquoPrediction of SampP 500 and DJIA stock indices using particleswarm optimization techniquerdquo in Proceedings of the Proceedingof the IEEE Congress on Evolutionary Computation (CEC rsquo08)pp 1276ndash1282 Hong Kong China June 2008

[27] S S Appadoo Pricing Financial Derivatives with Fuzzy Alge-braic Models ATheoretical and Computational Approach [PhDthesis] University of Manitoba Winnipeg 2006

[28] A Thavaneswaran K Thiagarajah and S S Appadoo ldquoFuzzycoefficient volatility (FCV) models with applicationsrdquo Mathe-matical and Computer Modelling vol 45 no 7-8 pp 777ndash7862007

[29] C Carlsson and R Fuller ldquoOn possibilistic mean value andvariance of fuzzy numbersrdquo Fuzzy Sets and Systems vol 122 no2 pp 315ndash326 2001

[30] A Thavaneswaran S S Appadoo and A Paseka ldquoWeightedpossibilistic moments of fuzzy numbers with applications toGARCH modeling and option pricingrdquo Mathematical andComputer Modelling vol 49 no 1-2 pp 352ndash368 2009

[31] N Srivastava G Hinton A Krizhevsky I Sutskever and RSalakhutdinov ldquoDropout a simple way to prevent neural net-works from overfittingrdquo Journal of Machine Learning Researchvol 15 no 1 pp 1929ndash1958 2014

[32] A M Rather A Agarwal and V N Sastry ldquoRecurrent neuralnetwork and a hybrid model for prediction of stock returnsrdquoExpert Systems with Applications vol 42 no 6 pp 3234ndash32412015

[33] R D A Araujo A L I Oliveira and S Meira ldquoA hybrid modelfor high-frequency stock market forecastingrdquo Expert Systemswith Applications vol 42 no 8 pp 4081ndash4096 2015

[34] H Chen K Xiao J Sun and S Wu ldquoA double-layer neu-ral network framework for high-frequency forecastingrdquo ACMTransactions on Management Information Systems (TMIS) vol7 no 4 article no 11 2017

[35] A Yoshihara K Fujikawa K Seki and K Uehara ldquoPredictingStock Market Trends by Recurrent Deep Neural Networksrdquo inPRICAI 2014 Trends inArtificial Intelligence vol 8862 ofLectureNotes in Computer Science pp 759ndash769 Springer InternationalPublishing Cham 2014

[36] XDing Y Zhang T Liu and J Duan ldquoDeep learning for event-driven stock predictionrdquo in Proceedings of the 24th InternationalJoint Conference on Artificial Intelligence IJCAI 2015 pp 2327ndash2333 arg July 2015

[37] Z Zhou J Zhao and K Xu ldquoCan online emotions predictthe stock market in Chinardquo in Proceedings of the InternationalConference on Web Information Systems Engineering pp 328ndash342 2016

[38] S Hochreiter and J Schmidhuber ldquoLong short-term memoryrdquoNeural Computation vol 9 no 8 pp 1735ndash1780 1997

[39] Y LeCun L Bottou Y Bengio and P Haffner ldquoGradient-basedlearning applied to document recognitionrdquo Proceedings of theIEEE vol 86 no 11 pp 2278ndash2323 1998

[40] A Arevalo J Nino G Hernandez and J Sandoval ldquoHigh-frequency trading strategy based on deep neural networksrdquoin Proceedings of the International conference on intelligentcomputing pp 424ndash436 2016

[41] K-J Kim ldquoFinancial time series forecasting using supportvector machinesrdquo Neurocomputing vol 55 no 1-2 pp 307ndash3192003

[42] S Madge Predicting Stock Price Direction using SupportVector Machines Independent Work Report Spring 2015

Hindawiwwwhindawicom Volume 2018

MathematicsJournal of

Hindawiwwwhindawicom Volume 2018

Mathematical Problems in Engineering

Applied MathematicsJournal of

Hindawiwwwhindawicom Volume 2018

Probability and StatisticsHindawiwwwhindawicom Volume 2018

Journal of

Hindawiwwwhindawicom Volume 2018

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawiwwwhindawicom Volume 2018

OptimizationJournal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Engineering Mathematics

International Journal of

Hindawiwwwhindawicom Volume 2018

Operations ResearchAdvances in

Journal of

Hindawiwwwhindawicom Volume 2018

Function SpacesAbstract and Applied AnalysisHindawiwwwhindawicom Volume 2018

International Journal of Mathematics and Mathematical Sciences

Hindawiwwwhindawicom Volume 2018

Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom

The Scientific World Journal

Volume 2018

Hindawiwwwhindawicom Volume 2018Volume 2018

Numerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisAdvances inAdvances in Discrete Dynamics in

Nature and SocietyHindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom

Dierential EquationsInternational Journal of

Volume 2018

Hindawiwwwhindawicom Volume 2018

Decision SciencesAdvances in

Hindawiwwwhindawicom Volume 2018

AnalysisInternational Journal of

Hindawiwwwhindawicom Volume 2018

Stochastic AnalysisInternational Journal of

Submit your manuscripts atwwwhindawicom

Page 12: Stock Market Prediction on High-Frequency Data Using Generative Adversarial Netsdownloads.hindawi.com/journals/mpe/2018/4907423.pdf · 2018-11-12 · ResearchArticle Stock Market

Hindawiwwwhindawicom Volume 2018

MathematicsJournal of

Hindawiwwwhindawicom Volume 2018

Mathematical Problems in Engineering

Applied MathematicsJournal of

Hindawiwwwhindawicom Volume 2018

Probability and StatisticsHindawiwwwhindawicom Volume 2018

Journal of

Hindawiwwwhindawicom Volume 2018

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawiwwwhindawicom Volume 2018

OptimizationJournal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Engineering Mathematics

International Journal of

Hindawiwwwhindawicom Volume 2018

Operations ResearchAdvances in

Journal of

Hindawiwwwhindawicom Volume 2018

Function SpacesAbstract and Applied AnalysisHindawiwwwhindawicom Volume 2018

International Journal of Mathematics and Mathematical Sciences

Hindawiwwwhindawicom Volume 2018

Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom

The Scientific World Journal

Volume 2018

Hindawiwwwhindawicom Volume 2018Volume 2018

Numerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisAdvances inAdvances in Discrete Dynamics in

Nature and SocietyHindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom

Dierential EquationsInternational Journal of

Volume 2018

Hindawiwwwhindawicom Volume 2018

Decision SciencesAdvances in

Hindawiwwwhindawicom Volume 2018

AnalysisInternational Journal of

Hindawiwwwhindawicom Volume 2018

Stochastic AnalysisInternational Journal of

Submit your manuscripts atwwwhindawicom