Sequential optimizing investing strategy with neural networks

Download Sequential optimizing investing strategy with neural networks

Post on 21-Jun-2016

213 views

Category:

Documents

0 download

TRANSCRIPT

  • wngo,53-8

    an iabilest p. Won s.

    vised neural network. With this algorithm the network learns itsinternal structure by updating the paramet

    outputo predr encoboticsn predf neur; Hania

    Vovk (2001). In the game-theoretic probability established by Sha-fer and Vovk, various theorems of probability theory, such as thestrong law of large numbers and the central limit theorem, areproved by consideration of capital processes of betting strategiesin various games such as the coin-tossing game and the boundedforecasting game. In game-theoretic probability a player Investoris regarded as playing against another player Market. In this

    games and showed that the resulting strategy is easy to implement

    4 we evaluate performances of these strategies by Monte Carlosimulation. In Section 5 we apply these strategies to stock pricedata from Tokyo Stock Exchange. Finally we give some concludingremarks in Section 6.

    2. Sequential optimizing strategy with neural networks

    Here we introduce the bounded forecasting game of Shafer andVovk (2001) in Section 2.1 and network models we use in Section2.2. In Section 2.3 we specify the investing ratio by an unsupervised

    Corresponding author.

    Expert Systems with Applications 38 (2011) 1299112998

    Contents lists availab

    w

    .eE-mail address: takemura@stat.t.u-tokyo.ac.jp (A. Takemura).2007; Khoa, Sakakibara, & Nishikawa, 2006; Yoon & Swales, 1991).In these papers authors are concerned with the prediction of

    time series and they do not pay much attention to actual investingstrategies, although the prediction is obviously important indesigning practical investing strategies. A forecast of tomorrowsprice does not immediately tell us how much to invest today. Incontrast to these works, in this paper we directly consider invest-ing strategies for nancial time series based on neural networkmodels and ideas from game-theoretic probability of Shafer and

    The organization of this paper is as follows. In Section 2 we pro-pose sequential optimizing strategy with neural networks. In Sec-tion 3 we present some alternative strategies for the purpose ofcomparison. In Section 3.1 we consider an investing strategy usingsupervised neural network with back propagation algorithm. Thestrategy is closely related to and reects existing researches onstock price prediction with neural networks. In Section 3.2 we con-sider Markovian proportional betting strategies, which are muchsimpler than the strategies based on neural networks. In Sectionit training data containing inputs andnetwork with updated parameterstaining inputs the network has neveis applied in many elds such as roand it shows a good performance iseries. Relevant papers on the use otime series include (Freisleben, 19920957-4174/$ - see front matter 2011 Elsevier Ltd. Adoi:10.1016/j.eswa.2011.04.098er values when we givets. We can then use theict future events con-untered. The algorithmand image processing

    iction of nancial timeal network to nancials, Curtis, & Thalassinos,

    and shows a good performance in comparison to well-known strat-egies such as the universal portfolio (Cover, 1991) developed byThomas Cover and his collaborators. In this paper we proposesequential optimization of parameter values of investing strategiesbased on neural networks. Neural network models give a very ex-ible framework for designing investing strategies. With simulationand with some data from Tokyo Stock Exchange we show that theproposed strategy shows a good performance.ton, and Williams (1986) developed back propagation algorithmin 1986, which is the most commonly used algorithm for super-

    posed sequential optimization of parameter values of a simpleinvesting strategy in multi-dimensional bounded forecastingSequential optimizing investing strategy

    Ryo Adachi a,b, Akimichi Takemura a,aGraduate School of Information Science and Technology, University of Tokyo, 7-3-1 Hob Institute of Industrial Science, University of Tokyo, 4-6-1 Komaba, Meguro-ku, Tokyo 1

    a r t i c l e i n f o

    Keywords:Back propagationForecastingGame-theoretic probabilityTime series

    a b s t r a c t

    In this paper we proposefrom game-theoretic probneural network with the bment in the current roundincluding a strategy baseditive with other strategies

    1. Introduction

    A number of researches have been conducted on prediction ofnancial time series with neural networks since Rumelhart, Hin-

    Expert Systems

    journal homepage: wwwll rights reserved.ith neural networks

    Bunkyo-ku, Tokyo 113-8656, Japan505, Japan

    nvesting strategy based on neural network models combined with ideasity of Shafer and Vovk. Our proposed strategy uses parameter values of aerformance until the previous round (trading day) for deciding the invest-e compare performance of our proposed strategy with various strategiesupervised neural network models and show that our procedure is compet-

    2011 Elsevier Ltd. All rights reserved.

    framework investing strategies of Investor play a prominent role.Prediction is then derived based on strong investing strategies(cf. defensive forecasting in Vovk, Takemura, & Shafer (2005)).

    Recently in Kumon, Takemura, and Takeuchi (2011) we pro-

    lsevier .com/locate /eswale at ScienceDirect

    ith Applications

  • Investors capital is written as

    Kn Kn11 f un1;xxn:We need to specify the number of inputs L and the number of

    neurons M in the hidden layer. It is difcult to specify them in ad-vance. We compare various choices of L and M in Sections 4 and 5.Also in un1 we can include any input which is available before thestart of round n, such as moving averages of past prices, seasonalindicators or past values of other economic time series data. Wegive further discussion on the choice of un1 in Section 6.

    2.3. Sequential optimizing strategy with neural networks

    In this section we propose a strategy which we call sequentialoptimizing strategy with neural networks (SOSNN).

    We rst calculate x xn1 that maximizes

    withn n1 n n k1 k k

    Taking the logarithm of Kn we have

    logKn Xnk1

    log1 akxk: 1

    The behavior of Investors capital in (1) depends on the choice ofak. Specifying a functional form of ak is regarded as an investingstrategy. For example, setting ak to be a constant for all k iscalled the -strategy which is presented in Shafer and Vovk(2001). In this paper we consider various ways to determine akin terms of past values xk1,xk2, . . . , of x and seek better ak in try-ing to maximize the future capital Kn; n > k.

    Let uk1 = (xk1, . . . ,xkL) denote past L values of x and let ak de-pend on uk1 and a parameter x: ak = f(uk1,x). Then

    xk1 argmaxXk1t1

    log1 f ut1;xxt

    is the best parameter value until the previous round. In our sequen-tial optimizing investing strategy, we use xn1 to determine theinvestment Mn at round n:

    Mn Kn1 f un1;xn1:For the function f we employ neural network models for their ex-ibility, which we describe in the next section.

    2.2. Design of the network

    We construct a three-layered neural network shown in Fig. 1.The input layer has L neurons and they just distribute the inputneural network and we propose sequential optimization of param-eter values of the network.

    2.1. Bounded forecasting game

    We present the bounded forecasting game formulated by Shaferand Vovk (Shafer & Vovk, 2001). In the bounded forecasting game,Investors capital at the end of round n is written asKn n 1;2; . . . and initial capital K0 is set to be 1. In each roundInvestor rst announces the amount of money Mn he betsjMnj 6 Kn1 and then Market announces her move xn 2 [1,1].xn represents the change of the price of a unit nancial asset inround n. The bounded forecasting game can be considered as anextension of the classical coin-tossing game since the boundedforecasting game results in the classical coin-tossing game ifxn 2 {1,1}. With Kn; Mn and xn, Investors capital after round nis written as Kn Kn1 Mnxn.

    The protocol of the bounded forecasting game is written asfollows.

    Protocol:K0 1.FOR n = 1,2, . . .:

    Investor announces Mn 2 R.Market announces xn 2 [1,1].Kn Kn1 Mnxn

    END FOR

    We can rewrite Investors capital as Kn Kn1 1 anxn,where an Mn=Kn1 is the ratio of Investors investment Mn tohis capital Kn1 after round n 1. We call an the investing ratioat round n. We restrict an as 1 6 an 6 1 in order to prevent Inves-tor becoming bankrupt. Furthermore we can write Kn asK K 1 a x Pn 1 a x :

    12992 R. Adachi, A. Takemura / Expert Systemsuj (j = 1, . . . ,L) to every neuron in the hidden layer. Also the hiddenlayer has M neurons and we write the input to each neurons as I2iwhich is a weighted sum of ujs.As seen from Fig. 1, I2i is obtained as

    I2i XLj1

    x1;2ij uj;

    wherex1;2ij is called the weight representing the synaptic connectiv-ity between the jth neuron in the input layer and the ith neuron inthe hidden layer. Then the output of the ith neuron in the hiddenlayer is described as

    y2i tanh I2i

    :

    As for activation function we employ hyperbolic tangent function.In a similar way, the input to the neuron in the output layer, whichwe write I3, is obtained as

    I3 XMi1

    x2;3i y2i ;

    where x1i is the weight between the ith neuron in the hidden layerand the neuron in the output layer. Finally, we have

    y3 tanhI3;which is the output of the network. In the following argument weuse y3 as an investment strategy. Thus we can write

    ak y3 f uk1;x;where

    x x1;2;x2;3 x1;2ij

    i1;...;M;j1;...;L; x2;3i i1;...;M

    :

    Fig. 1. Three-layered network.

    Applications 38 (2011) 1299112998/ Xn1k1

    log1 f uk1;xxk: 2

  • n n1 n1 n1 n

    withFor maximization of (2), we employ the gradient descent method.With this method, the weight updating algorithm of x2;3i with theparameter b (called the learning constant) is written as

    x2;3i x2;3i Dx2;3i x2;3i b@/

    @x2;3i;

    where

    @/

    @x2;3i @/

    @f@f

    @x2;3iXn1k1

    @/@f

    @f

    @kI3@kI3

    @x2;3i

    Xn1k1

    xk1 f uk1;xxk 1 tanh

    2kI3ky2i Xn1k1

    kd1ky2i

    and the left superscript k to I3; y2i indexes the round. Thus weobtain

    Dx2;3i b@/

    @x2;3i b

    Xn1k1

    kd1ky2i :

    Similarly, the weight updating algorithm of x1;2ij is expressed as

    x1;2ij x1;2ij Dx1;2ij x1;2ij b@/

    @x1;2ij;

    where

    @/

    @x1;2ijXn1k1

    @/

    @kI2i

    @kI2i@x1;2ij

    Xn1k1

    @/@f

    @f

    @kI3@kI3

    @ky2i

    @ky2i@kI2i

    @kI2i@x1;2ij

    Xn1k1

    kd1x2;3i 1 tanh2 kI2i

    uk1j Xn1k1

    kd2uk1j:

    Thus we obtain

    Dx1;2ij b@/

    @x1;2ij b

    Xn1k1

    kd2uk1j:

    Here we summarize the algorithm of SOSNN at round n.

    1. Given the input vector uk1 = (xk1, . . . ,xkL) (k = 1, . . . ,n 1) andthe value of xn1, we rst evaluate kI

    2i

    PLj1x

    1;2ij uk1j and

    then ky2i tanhkI2i . Also we set the learning constant b.2. We calculate kI3 PMi1x2;3i ky2i and then ky3 = tanh(kI3) with kI2i

    and ky2i of the previous step. Then we update weightx with theweight updating formula x2;3i x2;3i b

    Pn1k1

    kd1ky2i andx1;2ij x1;2ij b

    Pn1k1

    kd2uk1j.3. Go back to step 1 replacing the weight xn1 with updated

    values.

    After sufcient times of iteration, / in (2) converges to a localmaximum with respect to x1;2ij and x

    2;3i and we set x

    1;2ij x1;2ij

    and x2;3i x2;3i, which are elements of xn1. Then we evaluate

    Investors capital after round n as Kn Kn1 1 f un1;xn1

    xn

    .

    3. Alternative investment strategies

    Here we present some strategies that are designed to be com-pared with SOSNN. In Section 3.1 we present a strategy withThis is the best parameter values until the previous round. If Inves-tor uses an f un1;xn1

    as the investing ratio, Investors capital

    after round n is written as

    K K 1 f u ;x x :

    R. Adachi, A. Takemura / Expert Systemsback-propagating neural network. The advantage of back-propa-gating neural network is its predictive ability due to learningas previous researches show. In Section 3.2 we show some sequen-tial optimizing strategies that use rather simple function for f thanSOSNN does.

    3.1. Optimizing strategy with back propagation

    In this section we consider a supervised neural network and itsoptimization by back propagation. We call the strategy NNBP. Itdecides the betting ratio by predicting actual up-and-downs ofstock prices and can be regarded as incorporating existing re-searches on stock price prediction. Thus it is suitable as an alterna-tive to SOSNN.

    For supervised network, we train the network with the datafrom a training period, obtain the best value of the parametersfor the training period and then use it for the investing period.These two periods are distinct. For the training period we needto specify the desired output (target) Tk of the network for eachday k. We propose to specify the target by the direction of Marketscurrent price movement xk. Thus we set

    Tk 1 xk > 0;0 xk 0;1 xk < 0:

    8>:

    Note that this Tk is the best investing ratio if Investor could use thecurrent movement xk of Market for his investment. Therefore it isnatural to use Tk as the target value for investing strategies. Wekeep on updating xk by cycling through the inputoutput pairs ofthe days of the training period and nally obtain x after sufcienttimes of iteration.

    Throughout the investing period we use x and Investors cap-ital after round n in the investing period is expressed as

    Kn Kn11 f un1;xxn:Back propagation is an algorithm which updates weights kx1;2ij

    and kx2;3i so that the error function

    Ek 12 Tk ky32

    decreases, where Tk is the desired output of the network and ky3 isthe actual output of the network. The weight kx2;3i of day k is re-newed to the weight k1x2;3i of day k + 1 as

    k1x2;3i kx2;3i Dkx2;3i kx2;3i b@Ek

    @kx2;3i kx2;3i b

    @Ek@kI3

    @kI3

    @kx2;3i kx2;3i bk1ky2i ;

    where

    k1 @Ek@kI3

    @Ek@ky3

    @ky3

    @kI3 Tk ky31 tanh2kI3:

    Also weight kx1;2ij is renewed as

    k1x1;2ij kx1;2ij Dkx1;2ij kx1;2ij b@Ek

    kx1;2ij

    kx1;2ij b@Ek@kI3

    @kI3

    @ky2i

    @ky2i@kI2i

    @kI2i@kx1;2ij

    kx1;2ij bk2i ~uk1j;

    where

    k2i @Ek

    3

    @kI3

    2

    @ky2i2 k1x2;3i 1 tanh

    2 kI2i

    :

    Applications 38 (2011) 1299112998 12993@kI @kyi @kIi

    At the end of each step we calculate the training error dened as

  • ,1).

    07094945044

    23467

    68

    14

    39780

    withTable 1Log capital processes of SOSNN, NNBP, MKV0, MKV1, MKV2 under AR(1) and ARMA(2

    SOSNN

    LnM 1 2 3 4AR(1) model

    9.890 9.168 10.021 10.01 18.285 17.436 17.241 17.7

    30.151 23.574 29.465 29.97.476 7.132 7.864 8.00

    2 14.983 12.710 15.518 17.326.211 25.785 26.090 32.18.128 9.084 5.427

    3 13.934 12.242 11.166 23.232 19.889 20.013

    NNBP MKV010.118 1.17511.921 0.80024.323 1.647(5.28 103)

    ARMA(2,1) model4.985 5.292 4.350 4.53

    1 10.234 11.108 9.905 8.7911.666 11.460 10.024 9.928.518 10.287 11.052 11.5

    2 18.474 20.177 21.458 20.716.818 25.167 24.979 25.18.511 10.490 7.344 7.88

    3 15.401 18.241 18.120 15.618.047 24.904 23.362 21.2

    NNBP MKV07.813 0.72915.420 0.13225.819 2.422

    12994 R. Adachi, A. Takemura / Expert Systemstraining error 12m

    Xmk1Tk ky32 1m

    Xmk1

    Ek; 3

    where m is the length of the training period. We end the iterationwhen the training error becomes smaller than the threshold l,which is set sufciently small.

    Here let us summarize the algorithm of NNBP in the trainingperiod.

    1. We set k = 1.2. Given the input vector uk1 = (xk1, . . . ,xkL) and the value ofxk,

    we rst evaluate kI2i PL

    j1kx1;2ij uk1j and then ky2i tanh

    kI2i

    . Also we set the learning constant b.

    3. We calculate kI3 PMi1kx2;3i ky2i and then ky3 = tanh(kI3) with kI2iand ky2i of the previous step. Then we update weight xk withthe weight updating formula k1x2;3i kx2;3i bk1ky2i andk1x1;2ij kx1;2ij bk2i uk1j.

    4. Go back to step 2 setting k + 1 k and xk+1 xk while1 6 k 6m. When k =m we set k = 1 and x1 xm+1 andcontinue the algorithm until the training error becomes lessthan l.

    3.2. Markovian proportional betting strategies

    In this section we present some sequential optimizing strategiesthat are rather simple compared to strategies with neural networkin Sections 2 and 3.1. The strategies of this section are generaliza-tions of Markovian strategy in Takeuchi, Kumon, and Takemura(2010) for coin-tossing games to bounded forecasting games. Wepresent these simple strategies for comparison with SOSNN andobserve how complexity in function f increases or decreases Inves-tors capital processes in numerical examples in later sections.

    (2.04 102)5 6 7 8

    9.982 9. 559 10.009 9.82118.480 17.542 18.260 16.99132.483 28. 941 7.267 8.738 6.009 7.77113.914 13.614 12.01621.981 23. 137 19.4922.922 7.291 5.209 5.9898.607 11.539 8.311 10.99416.330 18.807 16.055 20.388

    MKV1 MKV27.831 6.51716.974 15.45232.392 30.875

    4.052 3.563 3. 408 1.52210.012 8.411 8.029 4.74611.781 8.016 5.8829.147 8.483 6.915 5.57913.030 12.042 13.57317. 538 15.074 16.8467.409 7.445 7.011 5.772 12.395 11.961 15.930 14.185

    MKV1 MKV23.160 7.566

    10.483 17.619

    13.375 22.911

    Applications 38 (2011) 1299112998Consider maximizing the logarithm of Investors capital in (1):

    logKn Xnk1

    log1 akxk:

    We rst consider the following simple strategy of Kumon et al.(2011) in which we use an an1, wherean1 argmax Pn1k11 axk:

    In this paper we denote this strategy by MKV0.As a generalization of MKV0 consider using different invest-

    ing ratios depending on whether the price went up or down onthe previous day. Let ak ak when xk1 was positive and ak akwhen it was negative. We denote this strategy by MKV1. In the bet-ting on the nth day we use an an1 and an an1, wherean1

    ;an1

    argmaxPn1k11 f uk1;a;axk;uk1 = (xk1) and

    f uk1;a;a aIfxk1P0g aIfxk1

  • withTable 2Log capital process of SOSNN, NNBP, MKV0, MKV1 and MKV2 for TSE stocks.

    SOSNN

    LnM 1 2 4SONY

    0.339 0.292 0.1441 0.572 0.520 1.438

    0.153 0.220 0.4610.329 0.163 1.273

    2 0.000 0.260 1.8250.565 0.412 2.2740.230 1.448 1.402

    3 0.309 1.823 0.4380.307 2.237 1.333

    NNBP MKV01.039 0.5782.557 0.979

    R. Adachi, A. Takemura / Expert SystemsWe will compare performances of the above Markovian propor-tional betting strategies with strategies based on neural networksin the following sections.

    4. Simulation with linear models

    In this section we give some simulation results for strategiesshown in Sections 2 and 3. We use two linear time series modelsto conrm the behavior of presented strategies. Linear time seriesdata are generated from the BoxJenkins family (Box & Jenkins,1970), autoregressive model of order 1 (AR(1)) and autoregressivemoving average model of order 2 and 1 (ARMA(2,1)) having thesame parameter values as in Zhang (2001). AR(1) data are gener-ated as

    xn 0:6xn1 n 4and ARMA(2,1) data are generated as

    xn 0:6xn1 0:3xn2 n 0:5n1; 5

    3.837 1.260(3.671 102)Nomura

    0.200 0.212 1.3091 1.193 0.754 2.417

    3.326 2.888 2.3330.819 0.338 4.148

    2 0.969 1.030 4.9200.202 1.127 4.9411.066 2.076 1.458

    3 1.111 1.002 5.3073.672 1.599 10.570

    NNBP MKV00.743 0.8838.087 0.75316.051 1.390(2.03 102)NTT

    0.674 0.365 1.8241 0.825 0.411 0.246

    1.115 1.269 6.049 5.476

    2 1.175 8.333 9.5810.498 10.660 0.377 3.131 2.192

    3 0.431 5.861 1.3660.092 5.463

    NNBP MKV04.155 0.9023.161 1.2725.669 1.566(3.73 102)5 7 8 9

    0.832 0.964 0. 896 0.0820.401 0.383 0. 433 2.0120.633 0.762 1. 283 0.5820.675 0.349 2.056 2.5411.420 0.072 1.100 1.2562.006 0.980 2.490 1.9811.232 0.397 0.627 1.4040.695 0.970 0.599 0.2811.843 0.212 1.827 2.749

    MKV1 MKV20.459 1.2851.414 0.482

    Applications 38 (2011) 1299112998 12995where we set n N(0,1). After the series is generated, we divideeach value by the maximum absolute value to normalize the datato the admissible range [1,1].

    Here we discuss some details on calculation of each strategy.First we set the initial values of elements of x as random numbersin [0.1,0.1]. In SOSNN, we use the rst 20 values of xn as initialvalues and the iteration process in gradient descent method is pro-ceeded until Dx1;2ij

    < 104 and Dx2;3i < 104 with the upperbound of 104 steps. As for the learning constant b, we use learn-ing-rate annealing schedules which appear in Section 3.13 of Hay-kin (2008). With annealing schedule called the search-then-converge schedule (Darken, Chang, & Moody, 1992) we put b atthe nth step of iteration as

    bn b01 n=s ;

    where b0 and s are constants and we set b0 = 1.0 and s = 5.0. InNNBP, we train the network with ve different training sets of300 observations generated by (4) and (5). We continue cycling

    0.212 2.297

    0.479 0.839 0.679 0.7260.370 2. 650 0.005 1.2120.581 6.938 4. 979 0.5040.229 4.787 1.662 0.7540.007 11. 478 3.385 10.0467.003 18.795 10.897 22.8610.389 2.926 1.783 2. 4510.198 2.897 5.254 9.5953.885 0.621 8.420 14.021

    MKV1 MKV21.911 3.7891.354 4.9701.952 6.410

    0.880 5.673 0.888 4.7574.248 4.472 7.931 4.386 2.769 7.899 6.606 4.1345.377 11.071 9.206 5.2507.137 13.900 4.449 1.670 10.896 8.6339.349 16.990 10.811 12.31514.584 15.456

    MKV1 MKV22.048 4.7882.642 6.8073.391 8.687

  • 0

    1000

    2000

    3000

    4000

    5000

    6000

    7000

    0 50 100 150 200 250 300

    Clo

    sing

    Pric

    e

    Days

    SonyNomura

    NTT

    Fig. 2. Closing prices.

    -5

    -4

    -3

    -2

    -1

    0

    1

    2

    0 50 100 150 200 250 300

    Log

    Cap

    ital

    Rounds

    SOSNNNNBPMKV1

    Fig. 3. SONY.

    -5

    -4

    -3

    -2

    -1

    0

    1

    2

    0 50 100 150 200 250 300

    Log

    Cap

    ital

    Rounds

    SOSNNNNBPMKV0

    Fig. 4. Nomura.

    12996 R. Adachi, A. Takemura / Expert Systems withthrough the training set until the training error becomes less than land we set l = 102 with the upper bound of 6 105 steps. Also wecheck the t of the network to the data by means of the training er-ror for some different values of b, L and M. In Markovian strategies,we again use the rst 20 values of xn as initial values. We also adjustthe data so that the betting is conducted on the same data regard-less of L in SOSNN and NNBP or different number of inputs amongMarkovian strategies.

    In Table 1 we summarize the results of SOSNN, NNBP, MKV0,MKV1 andMKV2 under AR(1) and ARMA(2,1). The values presentedareaveragesof results forvedifferent simulationrunsof (4) and (5).As for SOSNN, we simulate fty cases (combinations of L = 1, . . . ,5and M = 1, . . . ,10), but only report the cases of L = 1,2,3 and somechoices ofMbecause the purposeof the simulation is to testwhetherL = 1 works better than other choices of L under AR(1) and L = 2works better under ARMA(2,1). For NNBP we only report the resultfor one case sincetting theparameters to thedata is a quitedifculttaskdue to the characteristic of desired output (target). Also onceweobtain thevalueofb, L andMwith trainingerror less than the thresh-old l = 102, we nd that the network has successfully learned theinputoutput relationship and we do not test other choices of theabove parameters. (See Appendix for more detail.) We set b = 0.07,L = 12 and M = 30 in simulation with AR(1) model and b = 0.08,L = 15 andM = 40 in simulation with ARMA(2,1) model.

    -5

    -4

    -3

    -2

    -1

    0

    1

    0 50 100 150 200 250 300

    Log

    Cap

    ital

    Rounds

    SOSNNNNBPMKV0

    Fig. 5. NTT.

    Applications 38 (2011) 1299112998Investors capital process for each choice of L and M in SOSNN,NNBP and each Markovian strategy is shown in three rows, corre-sponding to rounds 100, 200, 300 of the betting (without the initial20 rounds in SOSNN and Markovian strategies). The fourth row ofeach result for NNBP shows the training error after learning in thetraining period. The best value among the choices of L and M inSOSNN or among each Markovian strategy is written in bold andmarked with an asterisk() and the second best value is also writ-ten in bold and marked with two asterisks(). Also calculation re-sults written with are cases in that simulation did not giveproper values for some reasons.

    Notice that SOSNN whose betting ratio f is specied by acomplex function gives better performance than rather simpleMarkovian strategies both under AR(1) and ARMA(2,1). Also theresult that NNBP gives capital processes which are competitivewith other strategies shows that the network has successfullylearned the inputoutput relationship in the training period.

    5. Comparison of performances with some stock price data

    In this section we present numerical examples calculated withthe stock price data of three Japanese companies SONY, Nomura

  • In Fig. 2 we show the movements of closing prices of each com-pany during the investing period. In Figs. 35 we show the log cap-

    of Tokyo Stock Exchange such as closing prices of New York StockExchange of the previous day may increase Investors capital pro-cesses presented in this paper. Since there are numerical difcul-ties in optimizing neural networks, it is better to use smallnumber of effective inputs for a good performance.

    Another important generalization of the method of this paper isto consider portfolio optimization. We can easily extend the meth-od in this paper to the betting on multiple assets. Let the outputlayer of the network have P neurons as shown in Fig. 6 and the out-put of each neuron is expressed as y3h; h 1; . . . ; P. Then we obtaina vector y3 y31; . . . ; y3P

    of outputs. The number of neurons P re-

    fers to the number of different stocks Investor invests.Investors capital after round n is written as

    Kn Kn1 1XPh1

    fhun1;xhxn;h !

    ;

    where

    xh x1;2ij

    i1;...;M;j1;...;L; x2;3hi

    i1;...;M

    :

    Thus also in portfolio cases we see that our method is easy to imple-ment and we can evaluate Investors capital process in practicalapplications.

    Fig. 6. Three-layered network for portfolio cases.

    with Applications 38 (2011) 1299112998 12997ital processes of the results shown in Table 2 to compare theperformance of each strategy. Fig. 3 is for SONY, Fig. 4 is for Nom-ura Holdings and Fig. 5 is for NTT. For SOSNN we plotted the resultof Land M that gave the best performance at n = 300 (the bottomrow of the three rows) in Table 2.

    As we see from above gures, NNBP which shows competitiveperformance for two linear models in Section 4 gives the worst re-sult. Thus it is obvious that the network has failed to capture trendin the betting period even if it ts in the training period. Also theresults are favorable to SOSNN if we adopt appropriate numbersfor L and M.

    6. Concluding remarks

    We proposed investing strategies based on neural networkswhich directly consider Investors capital process and are easy toimplement in practical applications. We also presented numericalexamples for simulated and actual stock price data to show advan-tages of our method.

    In this paper we only adopted normalized values of past Mar-kets movements for the input un1 while we can use any dataavailable before the start of round n as a part of the input as wementioned in Section 2.2. Let us summarize other possibilities con-sidered in existing researches on nancial prediction with neuralnetworks. The simplest choice is to use raw data without any nor-malization as in Hanias et al. (2007), in which they analyze timeseries of Athens Stock index to predict future daily index. In Frei-sleben (1992) they adopt price of FAZ-index (one of the Germanequivalents of the American Dow-Jones-Index), moving averagesfor 5, 10 and 90 days, bond market index, order index, US-Dollarand 10 successive FAZ-index prices as inputs to predict the weeklyclosing price of the FAZ-index. Also in Khoa et al. (2006) they use12 technical indicators to predict the S&P 500 stock index onemonth in the future. From these researches we see that for longerprediction terms (such as monthly or yearly), longer moving aver-ages or seasonal indexes become more effective. Thus those longHoldings and NTT listed on the rst section of the Tokyo Stock Ex-change for comparing betting strategies presented in Sections 2and 3. The investing period (without days used for initial values)is 300 days from March 1st in 2007 to June 19th in 2008 for allstrategies and the training period in NNBP is 300 days fromDecember 1st in 2005 to February 20th in 2007. We use a shortertraining period than those in previous researches, because longerperiods resulted in poor tting.

    The data for 300 days from December 1st in 2005 to February20th in 2007 is used for input normalization of xn to [1,1], whichis conducted according to the method shown in Azoff (1994) andthe procedure is as follows. For the data of daily closing prices inthe above period, we rst obtain the maximum value of absolutedaily movements and then divide daily movements in the invest-ing period by that maximum value. In case xn 6 1.0 or xnP 1.0we put xn = 1.0 or xn = 1.0. Thus we obtain xn in [1,1] and weuse them for inputs of the neural network. We tried periods of var-ious lengths for normalization and decided to choose a relativelyshort period to avoid Investors capital processes staying almostconstant. Also in NNBP we used b = 0.07, L = 12 and M = 90 forSONY, b = 0.07, L = 15 and M = 100 for Nomura and b = 0.03,L = 15 andM = 120 for NTT with upper bound of 105 iteration steps.Other details of calculation are the same as in Section 4. We reportthe results in Table 2.

    R. Adachi, A. Takemura / Expert Systemsterm indicators may not have much effect in daily price predictionwhich we presented in this paper. On the other hand, adoptingdata which seems to have a strong correlation with closing prices 0

    0.02

    0.04

    0.06

    0.08

    0.1

    0.12

    0 20000 40000 60000 80000 100000

    Trai

    ning

    Erro

    r 0.14Epochs

    Fig. 7. Training error (epochs).

  • Acknowledgement

    This research is partially supported by Aihara Project, the FIRSTprogram from JSPS.

    Ek 12 Tk ky32 for each k calculated with parameter values xafter learning. We observe that the network fails to t for somepoints (actually 9 days out of 300 days) but perfectly ts for allother days. It can be interpreted that the network ignores someoutliers and adjust to capture the trend of the whole data.

    References

    Azoff, E. M. (1994). Neural network time series forecasting of nancial markets.Chichester: Wiley.

    Box, G. P. E., & Jenkins, G. M. (1970). Time series: analysis forecasting and control. SanFrancisco: Holden-Day.

    Cover, T. M. (1991). Universal portfolios. Mathematical Finance, 1(1), 129.Darken, C., Chang, J., & Moody, J. (1992). Learning rate schedules for faster stochastic

    gradient search. In IEEE second workshop on neural networks for signal processing(pp. 312).

    Freisleben, B. (1992). Stock market prediction with backpropagation networks. InIndustrial and engineering applications of articial intelligence and expert system5th international conference (pp. 451460).

    Hanias, M., Curtis, P., & Thalassinos, J. (2007). Prediction with neural networks: TheAthens stock exchange price indicator. European Journal of Economics, Financeand Administrative Sciences, 9, 2127.

    Haykin, S. S. (2008). Neural networks and learning machines. third ed.. New York:Prentice Hall.

    Khoa, N. L. D., Sakakibara, K., & Nishikawa, I. (2006). Stock price forecasting usingback propagation neural networks with time and prot based adjusted weightfactors. In SICE-ICASE international joint conference (pp. 54845488),

    Kumon, M., Takemura, A., & Takeuchi, K. (2011). Sequential optimizing strategy inmulti-dimensional bounded forecasting games. Stochastic Processes and theirApplication, 121, 155183.

    Rumelhart, D. E., Hinton, G. E., & Williams, R. J. (1986). Learning internal

    0

    0.5

    1

    1.5

    2

    0 50 100 150 200 250 300

    Trai

    ning

    Erro

    r

    Periods

    Fig. 8. Training error (periods).

    12998 R. Adachi, A. Takemura / Expert Systems with Applications 38 (2011) 1299112998Appendix A

    Here we discuss training error in the training period of NNBP. Inthis paper we set the threshold l for ending the iteration to 102,while the value commonly adopted in many previous researches issmaller, for instance, l = 104. We give some details on our choiceof l.

    Let us examine the case of Nomura in Section 5. In Fig. 7 weshow the training error after each step of iteration in the trainingperiod calculated with (3). While the plotted curve has a typicalshape as those of previous researches, it is unlikely that thetraining error becomes less than 102. Also in Fig. 8 we plotrepresentation by backpropagating errors. Nature, 323, 533536.Shafer, G., & Vovk, V. (2001). Probability and nance: Its only a game! New York:

    Wiley.Takeuchi, K., Kumon, M., & Takemura, A. (2010). Multistep Bayesian strategy in

    coin-tossing games and its application to asset trading games in continuoustime. Stochastic Analysis and Applications, 28, 842861.

    Vovk, V., Takemura, A., & Shafer, G. (2005). Defensive Forecasting. In R. G. Cowell &Z. Ghahramani (Eds.), Proceedings of the 10th international workshop on articialintelligence and statistics (pp. 365372).

    Yoon, Y., & Swales, G. (1991). Predicting stock price performance: A neural networkapproach. In Proceedings of the 24th annual hawaii international conference onsystem. Vol. 4 (pp. 156162).

    Zhang, G. P. (2001). An investigation of neural networks for linear time-seriesforecasting. Computers &Operations Research, 28(12), 11831202.

    Sequential optimizing investing strategy with neural networks1 Introduction2 Sequential optimizing strategy with neural networks2.1 Bounded forecasting game2.2 Design of the network2.3 Sequential optimizing strategy with neural networks

    3 Alternative investment strategies3.1 Optimizing strategy with back propagation3.2 Markovian proportional betting strategies

    4 Simulation with linear models5 Comparison of performances with some stock price data6 Concluding remarksAcknowledgementAppendix A References