Cellular Automata Based Artificial Financial Time Series

Size: px
Start display at page:

Download "Cellular Automata Based Artificial Financial Time Series"

Transcription

1 Cellular Automata Based Artificial Financial Time Series (draft) Indre Zliobaite Dept. of Informatics, MIF, Vilnius University, Abstract. We introduced cellular automata based technique for generation of artificial financial series. For that purpose cellular automata model from [2] was adapted. In this paper the author introduced the adaptation technique and created the reasoning why such generator can be used to model financial time series. Although at present the model is at its prototype stage, promising results were got. The model assumes weak form of Efficient Market Hypothesis and models information transmission among market participants. What is the core property of the model information reaches agents not at the same time and there are agents, which do not gate that information at all. This lets to model factual situation in financial markets. Moreover, the model can be used to model environmental changes in the market by randomly or manually changing model parameters. Introduction Cellular automata is mostly used for biological modeling. The model is based on development of interconnected cells based on particularity set rules. In this paper a model for generating artificial financial time series is presented. This financial model is based on cellular automata presented in [2]. Novelty: in this paper cellular automata model is adapted to financial time series modeling. The financial reasoning for such model usage is provided. Adaptations to create changing environment (non-stationary time series) are introduced. Many concepts presented in this paper appeared in the Master thesis written by the author in Y2006 and to be defended Y Cellular Automata Model In [2] two dimensional cellular automata model, composed of cellular network is presented. Each cell is a single layer perceptron (SLP) having p inputs and 1 output. Neighboring cells are connected and interact with each other, thus each cell has p connections (corresponding to SLP). If SLP weights are equal among themselves (w1, w2,, wp), the model is called isotropic, that means the strength of signal transmission from single cell is equal to all directions. In other case, the model is called anisotropic. In this experiment (the model is taken from [2]), six-angle cellular automata model is used, that is p = 6, each cell has 6 neighboring cells, to which signal is transmitted. (see picture 1) In this model special activation function (1) is used, which is similar to widely used sigmoid function. 0 part was introduced in order the model better reflects living cell. 1

2 ( β S γ ) α /(1+ e η, jeix * f ( S) = 0, jeix < * Here S = Σi=1..p(wixi) weighted input sum, α = 1,333, β = 5, γ = 0,4, η = - 1,333. Coefficients are selected in a way that weights represent fraction of 1 (wi [0,1] ), i.e. for more understandable interpretation of signal transmission. * >= 0 is sensitivity threshold, below which signal is not transmitted any further Excited cell (1) Picture 1. Two-dimensional six-angle cellular automata model In this model the time period which is taken to transmit the signal to neighboring cells is ttransf, this value depends on the strength of SLP output signal ou = f (Su). ttransf is defined in discreet way the stronger is ou signal, the more time it takes to transmit the signal. One more important parameter in discussed cellular automata model is tref, that is refraction period or how much time it takes until a cell can be excited again after last excitation. Cellular automata is suitable for signal transmission modeling, or wave propagation among living cells. Using this tool interactions among living organisms or systems can be modeled, where particular pieces of information need to be transmitted among agents. Generating Artificial Financial Time Series Using Cellular Automata Model In this section the concept of generating financial time series using modified existing [2] cellular automata modeli s presented. We have no information that similar cellular automata method was used by other researchers. Cellular automata was chosen to model artificial financial time series for several reasons. First of all, it is expected to be able to capture complex interrelations among financial variables. When real financial time series are influenced by changing environment and their underlying distributions are 2

3 unknown or difficult to model, cellular automata is believed to be suitable model. The data generated using presented cellular automata model are more alike to random walk time series model than to autoregressive model, as autocorrelation is close to 1. As it was stated before, cellular automata model is suitable for modeling information transmission. In this case an assumption is made that the space where the model cells are is simplified trade market. Each separate cell here is assumed to be single traders. We also assume that the signal transmitted from one cell to another and passing by the other cells corresponds to information which reach the market. That information becomes available not to all agents and what is even more important this information becomes available not to all agents at he same time. In this model of artificial time series we assume that information is of one type only (say positive) and information has only one direction. Single agent, after it has got that positive information, increases the price of financial asset by one basis point. This way information waves while shifting within cellular automata field, influence price of an asset (see picture 2) Picture 2. Time moment from generation of artificial financial time series adapting model from [2] Our model might be used as additional information to assumed constant price asset or it might be added as a noise to artificial time series, modeled using any other means. The series modeled the way first tried in [1] and further elaborated in my recent Master thesis [4] can be used to assume weak form of Efficient Market Hypothesis [5] more particularly uneven information transmission, as the market reacts to new coming information not immediately and not fully. When information wave leaves a particular agent, market price gets back to normal. To get artificial time series we introduce rectangular q x r fields (in the picture they are bold), which represent one physically close financial market. 3

4 They could be scattered throughout the cellular automata as well to represent distant market participants. Thus, we sum excited cells in that field at each iteration, where iteration represents one day. Artificial financial time series l = {l 1, l 2, l t } are got as follows: r1 q1 I t = o i= r0 j= q0 ij ( t) (2) here q = (q0, q0+1, q0+2,, q1), r = (r0, r0+1, r0+2,, r1) sides of summation rectangular, t time moment, oij(t) is the value of exitation of cell ij (coordinates) at time t. In picture 2 the status of cellular automata, generating 5 time series is depicted at time t. Black rectangular, as it was already mentioned, are summation fields for each of the five series. Light points are excited cells, while more dark points are refracted cells. Coordinate axes depict physical coordinates of the market (in point units). Experimental design for changing environment Real time series usually are affected by chaning environment (non-stationary in other words). This is because of many factors, which influence the value of series. Although we model only one type information transmission, we use model parameters in order to artificially introduce environment changes. Experiments using the above presented model are performed on 250x250 hexagonal grid. At first random points are excited, from which the wave propagation begins. After certain number of model iterations (days) we introduce environmental changes, which are of the following types: 1. Changing SLP weights (w1 w2... wp), what makes model anisotropic, that is information transmission gets stronger in some sides and weaker in other sides. That could be aligned with some wind in a sea, adding bias to the direction of waves. 2. Changing the sensitivity threshold of the model *. That is the point from which reaction to the information takes place. This might be aligned to transaction costs in reality. 3. Changing the strength of signal transmission ttransf, that in reality could be attributed to the strength of word, influence or persuasive power of the coming information. 4. Changing the length of refraction time tref. This way we limit the time period between two transactions that can be executed by one agent. This way we introduce environmental changes, which are of different nature like in real market. The changes are long term and they change the influencers, which form the value of financial time series. Below we show an excerpt from artificially generated financial time series using the above described model: Dirbtines laiko eilutes

5 Picture 3. Artificially generated time series using cellular automata model. In these experiments we used 250 x 250 hexagonal grid. We did not take the outputs of the model directly, we formed artificial time series applying the following transformation (3) L 1..t = log (l 1..t 0,01) (3) here 1..t are artificial time indices, meaning from day 1 till day t and l 1..t are original outputs of the presented cellular automata model. The series generated in similar way were used in [1] by the author to test multi agent system designed for financial time series prediction. Later that model was tested on real time series as well. Conclusion We introduced cellular automata based technique for generation of artificial financial series. For that purpose cellular automata model from [2] was adapted. In this paper the author introduced the adaptation technique and created the reasoning why such generator can be used to model financial time series. Although at present the model is at its prototype stage, promising results were got. The model assumes weak form of Efficient Market Hypothesis and models information transmission among market participants. What is the core property of the model information reaches agents not at the same time and there are agents, which do not gate that information at all. This lets to model factual situation in financial markets. Moreover, the model can be used to model environmental changes in the market by randomly or manually changing model parameters. References [1] Raudys, S., Zliobait, I. (2006) The Multi-Agent System for Prediction of Financial Time Series. Lecture Notes in Artificial Intelligence. To appear [2] Raudys, S. (2004). Information transmission concept based model of wave propagation in discrete excitable media. Nonlinear Analysis: Modeling and Control, 9(3): [3] Aas, K., Dimakos, X.K. (2004). Statistical modeling of financial time series: An introduction. Note. Norwegian Computer Center. [4] Zliobaite, I. (2006). Prediction of Financial Time Series in Changing Environment Using Artificial Neural Networks. Master thesis in progress. Vilnius University. [5] Fama, E.F. Efficient capital markets (1970). A review of theory and empirical work. Journal of Finance, 25: