Financial Contagion: A Propagation Simulation ...

11 downloads 2176 Views 1MB Size Report
1 Financial Computing and Analytics Group, University College London, London, UK. 2 Finance and Economic School, Guangxi University of Science and ...
Financial Contagion: A Propagation Simulation Mechanism Antoaneta Serguieva1, Fang Liu2, Paresh Date3 1

Financial Computing and Analytics Group, University College London, London, UK Finance and Economic School, Guangxi University of Science and Technology, Liuzhou, China 3 Centre for the Analysis of Risk and Optimisation Modelling Applications, Brunel University, UK 2

(draft, December 2013)

Table of Contents 1. Introduction....................................................................................................................... 2 2. Methodology..................................................................................................................... 4 2.1 Price Formation and Assets Allocation ................................................................................. 4 2.2 Single Market Model ............................................................................................................. 5 2.3 Multinational Market Model ................................................................................................. 9 2.4 Co-evolutionary Mechanism ............................................................................................... 11 2.5 An Integrated Mixed Game and GP Based Multinational Artificial Stock Market (IMGGPM) ................................................................................................................................ 12 2.6 GARCH Model and Clayton-Copula for Return Simulation .............................................. 13 2.6.1 Copula Functions ......................................................................................................... 13 2.6.2 GARCH (1, 1) Model ................................................................................................... 14 2.6.3 Tail Dependence Coefficient ........................................................................................ 14 2.6.4 Parameter Estimation for the GARCH-Copula Model................................................. 14 2.7 Immune-PSO Optimization ................................................................................................. 15 2.7.1 Standard PSO ............................................................................................................... 15 2.7.2 Biology Immune System ................................................................................................ 15 2.7.3 Immune PSO ................................................................................................................. 16 2.7.4 Implementation of the Immune-PSO Algorithm ........................................................... 17 2.8 Parameter Estimation for Market Participants..................................................................... 19 3 Implementation and Analysis ............................................................................................. 19 3.1. Comparing the Results from I-PSO and GA ...................................................................... 22 3.2 Simulated Prediction of Contagion from Thailand to South Korea .................................... 23 3.3. Application to the Russian crisis of 1998 ........................................................................... 24 3.3.1. Background.................................................................................................................. 24 3.3.2. Results and Analysis.................................................................................................... 25 3.4. Simulated Prediction of Contagion from Russia to Ukraine .............................................. 28 1

Electronic copy available at: http://ssrn.com/abstract=2441964

4. Conclusion ...................................................................................................................... 29 References .......................................................................................................................... 29

Abstract: A simulation mechanism is designed for crisis propagation accommodating contagion. A new co-evolutionary market model is described, where some of the technical traders change their behaviour during crisis and their decisions become largely influenced by market sentiment rather than based on fundamental factors and underlying strategies. Analyzing agents’ behaviour, it is observed that the herd mentality intensifies during crisis. This paper focuses on the transformation of market interdependence into contagion, and on contagion effects. A multi-national platform is build first, to allow different type of players to implement their trading strategies while considering information from both domestic and foreign markets. Traders’ strategies and the performance of the simulated domestic market is trained using historic prices of domestic and foreign markets, while optimizing artificial markets’ parameters through immune particle swarm optimization techniques. Further elements are introduced contributing to the transformation of technical into herd traders. A GARCH-copula is applied next to calculate the tail dependence between the affected market and the origin of the crisis. That parameter is used in the fitness function for selecting the best solutions within the evolving population of possible model parameters, and therefore in the optimization criteria for contagion simulation. The results show that the proportion of herd traders increases in the net market order for optimum contagion simulations. While technical traders’ behaviour corresponds to propagating a crisis through interdependence, herd behaviour corresponds to propagating through contagion. If contagion could be avoided or transformed back to interdependence, with the timely response of national governments and international institutions, a crisis would be more manageable. Further research could introduce a recovery mechanism… into the model through the design of national and international intervention.

1 Introduction Over the past two decades, a number of studies (e.g. Kaminsky, Lizondo, Reinhart, 1998; Kaminsky, 1999) have developed early warning systems focused on the origins of financial crises rather than on financial contagion. Further works (e.g. Forbes, Rigobon, 2002; Caporale, Cipollini, Spagnolo, 2005), on the other hand, have focused on studying contagion as compared to interdependence. Rodriguez (2007), for example, finds that the change in tail dependence is a warning sign for financial contagion. Yang and Bessler (2008) use vector auto-regression analysis to explore the financial contagion patterns. Cipollini and Kapetanios (2009) use principal components analysis to find out indicators of contagion. This paper also focuses on the phenomenon of contagion, and we model and simulate the transmission of financial crises through the behaviour of market players and their various strategies using an integrated approach that involves a mixedgame, a multinational agent-based model, genetic programming (GP) and Clayton Copula. Our multinational model is composed of four types of traders – technical-GP, technical-game, herd, and noise traders. A technical-GP trader is a trader who makes decisions based on the technical analysis of price charts, and develops strategies about the direction in which the market is likely to move. The technical-GP traders are modelled in the artificial market through GP, which is used to develop their trading rules and 2

Electronic copy available at: http://ssrn.com/abstract=2441964

each individual technical trader is represented by a different decision tree. The basic elements of such decision trees are rules and forecast values. A single rule is constructed as a combination of three technical indicators, one rational operator such as “greater than” or “less than or equal to”, and a real value threshold. The next type of traders, the technical-game traders make buy, sell or hold decisions based on strategies developed through Game theory, which is a theory on the intersection of applied mathematics and economics. Particularly, we apply a mixed-game combining a minority-game and a majority-game. The minority-game (Lebaron, 2000) and its counterpart the majority-game, as further developments of Game theory, are especially useful in simulating financial markets. Next, herd traders are as important as technical traders when describing market behaviour. They are the ones who make decisions following the prevailing market sentiment, regardless of other factors. Herd behaviour has been identified as a major reason for contagion (Cont, Bouchaud, 2000). Finally, noise traders are stock traders whose decisions are irrational and inconsistent: their presence in financial markets can cause prices and risk levels to diverge from expected levels even if all other traders are rational (De Long et al, 1990). We have recently developed a framework (Serguieva, Liu, Date, 2011; Liu, Serguieva, Date, 2010) comprising the types of traders described above, and further using a price formation and assets allocations approach, and introducing a GARCH model with Clyton-copula to better capture cross market linkages. In this paper, we develop the framework forward into a co-evolutionary artificial market, allowing technical traders to change their behaviour during crisis periods and transform into herd traders. Thus we introduce into the simulated markets, an observed phenomenon from real markets, where during a crisis period many technical traders give up their original trading strategies and transform into herd traders. The strategy-changing process applied here is based on the reasoning in game theory, though we do not formally apply game theory and consider this as a direction for future research. Let us consider the trading process just before the outset of a crisis, and compare it with the prisoner’s dilemma. If all traders maintain their approach to decision making and strategy choice, then they are all better off, and we will refer to this as the cooperative setting of the trading process. If all become herd traders then all are worse off and suffer larger losses, due to pushing the prices further down than they would have otherwise gone. We will refer to that as the non-cooperative setting of the trading process. Nuances here are the mostly-cooperative setting and the mostly non-cooperative setting. In the former, most traders maintain their approach to decision making and strategy choices; while in the latter, most traders follow the latest sentiment. A trader in the mostly non-cooperative setting is on average worse off than a trader in the mostly cooperative setting, again for the reason of pushing the prices further down though not to the limit.

We can see that in the 1997 Asian crisis, the market portfolio, as represented by the stock market index, lost almost 70% of its assets. The detail here is that a technical trader may not necessarily change his status and follow the market sentiment right after a shock. He would keep observing and only when the long term adverse price change exceeds what he can bear, then he may choose to give up his trading strategy and 3

Electronic copy available at: http://ssrn.com/abstract=2441964

become a herd trader. As the number of herd traders increases, the depth of the crisis may worsen and affect the recovery. As the herd traders follow the downward trend in the market where the crisis originates, and as our model provides a mechanism linking with other markets and transferring the sentiment, the traders in linked markets are gradually conditioned in their activity by the crisis in the original market. Thus the downward trend spreads to linked markets, leading to a significant increase in the correlation coefficient between markets. This behaviour meets the definition given in Forbes and Rigobon (2002), and contributes to the mechanism causing financial contagion.

2 Methodology Real financial markets are composed of different types of participants who interact through asset trading. A market player i generally holds two types of assets: a risky asset, denoted by and cash, denoted by

; .

The number of technical, game, herding and noise traders is denoted as

, respectively. The

notation price(t) stands for the share price at time t. The initial conditions include 10 shares and 10,000 cash available to each player in the currency of the simulated market. At any step in time, a trader buys or sells certain number of assets according to their own trading rules.

2.1 Price Formation and Assets Allocation The price formation mechanism that we use in this paper is similar to the one used in Giardina and Bouchaud (2003). A player i, takes a decision with

, to sell with

or offer of a fraction

at each time step, where a decision to buy is denoted

, and to do nothing

. Moreover, players will make a bid

of their current holdings, where

(1) { and

denotes the fraction of the maximum change of an agent’s holdings. It is an important parameter

related to the cautiousness of the agents. In a market with heterogeneous agents,

should be different for

each agent. However, to make the simulation simple, we assume all agents are risk neutral and all have the same cautiousness coefficient. Namely,

g is a constant. Next, B(t) stands for the aggregated volume of

bids, and O(t) for the aggregated volume of offers. These functions are used to calculate the excess demand D(t) = B(t)-O(t), and D(t) is used in a price determination equation similar to the ones proposed in Cont and Bouchaud (2000), Farmer (2002), and Jefferies et al. (2001). Thus price is calculated with the following formula: 4

, where

(2)

is an important parameter representing the market sensitivity to the order imbalance.

The fraction of fulfilled orders is similar to the one introduced in Giardina and Bouchaud (2003). The total number of shares that can be bought at the new price is calculated as: ̃

(3)

From formula (3), we can see that if price goes up at time point t, the actual number of shares that can be bought ̃

is less than the original order

The fraction of filled buy (

and sell )

̃

If global amount of sell orders

, and vice versa.

orders can be described as follows: (

and

̃

)

(4)

is bigger than the actual number of shares that can be bought ̃

then the filled buy orders are still ̃

namely, the fraction of filled buy

is 1. Similarly, if global

is smaller than the actual number of shares that can be bought ̃

amount of sell orders

shares could be bought. That is to say, the fraction of filled buy the fraction of sell orders

is

̃

,

, then only

. The same rule applies to

.

Having established this, we can now calculate the amount of shares

that the agent i will buy or sell,

(5) { Finally, we can update the traders’ holdings of cash and the risky asset: (6) +

(7)

2.2 Single Market Model As noted above, in our model, we classify the market players into four categories: a) Noise traders: these make decisions to buy, sell or do nothing with different probabilities. These probabilities are predefined and remain constant during the whole process of simulation.

5

b) Herd traders: these follow the trend of price movements, and the probability of a ‘hold’ transaction at time t is denoted with

and calculated as follows: (8)

where parameter s controls the sensitivity to price change. The probability of a “buy” decision is correspondingly: (i)= (1Here,

(i))

(9)

is the overall price change at time t. Correspondingly, the probability of a “sell” decision is: =1-

(10)

c) Technical-Game traders: in our model, these play a mixed game, which is to say that fundamental traders are divided into two groups, one of which plays a minority game and the other plays a majority game. Tanaka-Yamawaki and Tokuoka (2006) propose a minority game, where traders take one of two possible actions: buy (1) or sell (0). If the minority side is defined to mean the decision made by a minority of traders, those who end up on the minority side win the game – the price will move in their favour. After each trade is executed, all the traders know, by the way the price has moved, whether the right choice would have been to buy or sell. Also in the model, all agents have their own decision table. In our model, we add one more choice “hold” (do nothing) to the model, to make it more realistic. Noted that the buy, hold and sell decision are denoted by -1, 0 and 1, respectively. Table 1: Example of a decision table Historical string -1,-1 -1,0 -1,+1 0,-1 0, 0 0,+1 +1,-1 +1,0 +1,+1

Strategy(1) +1 +1 0 0 -1 +1 0 -1 0

Strategy(2) 0 +1 -1 0 0 +1 +1 +1 -1

Strategy(3) 0 0 +1 0 -1 -1 -1 -1 0

Elements of the Decision table: Memory size, m Number of strategies, k, included in a decision table Binary description (-1 sell, 0 hold, 1 buy) Huge pool ( ) of possible strategies 6

Table 1 gives an example of a decision table, with m=2, and k=3. There are K=19,683 possible strategies for m=2. The decision table of a single agent includes only a few strategies out of these, in our case k=3 strategies. The strategy table becomes a baseline for a trader to make decisions. For example, if the historical string “-1-1” happened, which means the correct decision for the past two trade days, would have been “sell”, then strategy one recommends to choose 1 in the current period, which means “buy”. But strategy two recommends to hold choosing 0. To select a strategy and evolve decision tables after each trade, traders re-evaluate all strategies; increasing score for each strategy that produced the right decision and reducing score for the strategies that gave wrong decisions. During the next trading period, traders make decision following the strategy with the highest scores available to them. Importantly, all the traders have their own decision tables, each trader works with different k strategies out of the large strategy pool K. The example in Table 1 presents one particular trader. The score

for each strategy is calculated as

follows:

{

Where

(11)

is the decision made in time point t. Notice that the example in the table assumes a memory size

of 2 for convenience of presentation. The optimum memory identified through simulations is bigger, e.g. 10, and therefore associated with a much larger pool of possible strategies. d) Technical-GP traders: technical analysis is a key feature of our model. This group of traders presents the richest range of behaviors. Technical-GP traders use GP to develop trading rules, and each individual technical trader is represented by a different decision tree. The basic elements of such decision trees are rules and forecast values. A single rule is made up with a combination of three technical indicators, one rational operator such as “greater than” or “less than or equal to”, and a real value threshold. The three technical indicators are moving average (MA), trading breakout (TRB), and volatility (VOL). A single rule interacts with other rules in one decision tree through logical operators such as “or”, “and”, “not” and “if-then-else”, as shown in Figure 1 presenting an example of a decision tree. The root node is always an “if-then-else” node (ITE); an ITE node has two children, each of which could be either a decision node or another “if-then-else” node (Martinez-Jaramillo, Tsang, 2009). The code following Figure 1 shows how the decision rule logic is derived from the decision tree.

7

Fig.1: Example of a decision tree 1 If ((

) AND (NOT (

0; otherwise they are said to be discordant (Nelsen , 2001). The Kendall’s coefficient is defined as: (29) According to Nelsen (2001) the relationship between Kendal’s tau ,

and theta

is : (30)

is the parameter we need to calculate. The tail dependence coefficient of Clayton copula is

.

13

2.6.2 GARCH (1, 1) Model A large number of references reveal that Generalized Auto-Regressive Conditional Heteroskedasticity (GARCH) (Engle, 1982) could successfully model market dynamics and volatility. In this paper, we choose GARCH (1,1) to model both the domestic and foreign market return data series, which are later used as input to calculate the copula. Now, consider a GARCH (1, 1) model: ,

where

(31.1)

is the return series,

distribution, and

,

(31.2)

,

(31.3)

is the mean value of

,

is the volatility of

,

is standard normal

are parameters needed to be estimated. As the returns are conditionally normal,

one can use maximum likelihood method to find the parameters.

2.6.3 Tail Dependence Coefficient Tail dependence describes the limiting proportion that one margin exceeds a certain threshold given that the other margin has already exceeded that threshold. Let X and Y be continuous random variables with distribution functions F and G, respectively. The upper tail dependence parameter

is the limit (if it

exists) of the conditional probability that Y is greater than the 100t-th percentile of G given that X is greater than the 100t-th percentile of F as t approaches 1, i.e. ] Similarly, the lower tail dependence parameter

(32)

is the limit (if it exists) of the conditional probability that

Y is less than or equal to the 100t-th percentile of G given that X is less than or equal to the 100t-th percentile of F as t approaches 0, i.e. ]

(33)

2.6.4 Parameter Estimation for the GARCH-Copula Model We transform the return series data into the uniform distribution with the following formula:

= =

where



= √

=N (



,

(34)

is the probability distribution of the asset’s return at time t+1, and we then estimate the

Clayton copula’s parameters. 14

2.7 Immune-PSO Optimization Our agent-based model is highly stochastic, and hence the selection of appropriate and accurate optimization techniques is essential to achieving rapid convergence. In this paper we propose an Immune Particle Swarm Optimization (Immune-PSO) algorithm Selection algorithm.Clone copy

which is combined with an Immune Clone

clone hyper-mutation and clone selection operations are performed

during the evolutionary steps of the model. Cloning individual particles in proportion to their affinity can protect high fitness individuals and speed up convergence. Clone hyper-mutation provides a new mechanism producing new particles and maintaining diversity.Clone selection, which selects the best individuals, can avoid the algorithm’s effectiveness degenerating.

2.7.1 Standard PSO Standard Particle Swarm Optimization (SPSO) achieves optimization by means of the cooperation and competition of individual members of the population. Each particle represents a possible solution to the problem. SPSO starts by initializing a group of solutions, and then finds the optimum solution through iteration. Each particle updates itself by tracing two “best values”: one is the best solution pbest found by the particle itself and the other is the best solution gbest found by its neighbours. This process could be described mathematically as follows: In an n dimensional searching space, a population contains m particles, position of particle i is solution is

{

, its velocity is

, where the , and the global best

} Updating the formulas of particle’s velocity and position is performed

as follows: (

)

(35) (36)

In formulas (35) and (36), d=1,2,…,n; i=1,2,…,m. n is the dimension of the search space, m is the population size, t is the current generation, and

are the acceleration constants;

are uniformly

distributed random numbers, in the range from 0 to 1. w is the weight given to the extent to which the previous velocity affects the current velocity. The velocity is normally restricted within the interval [-

], where

and

.

2.7.2 Biology Immune System Burnet proposed a clonal selection theory in 1959. He concludes that only those B-cells which are specific to the antigen, proliferate and produce antigen-specific antibodies. The proliferated B-cells produce antibodies with increased affinity for a particular antigen during the course of an immune response, and this is called “affinity maturation”. If those B-cells produce antibodies which cannot tolerate self-antigens (an 15

exogenous antigen that is recognized as non-self by the immune system, which should be considered otherwise under normal conditions), they will be inactivated or destroyed. This process is called clonal deletion. However, the antibodies of the immune system may not necessarily recognize all of the different antigens, and this will lead to serious problems. The immune system copes with the problem by generating

new

antibodies, and constantly updating the antibodies. Although most antibodies die before being cloned, a few antibodies are developed with high affinity for particular antigens, and these improve the ability of the immune system to recognize different antigens. In effect, the B-cell is selected on the basis of its antigen specificity and, through cell division, produces multiple clones of itself. Importantly, some of those B-cell clones become memory cells, so that when the antigen is encountered at a later date, clonal expansion of specific B-cells from the memory bank can take place, and eliminate the antigen. Immune recognition and the expansion of specific B-cells is the fundamental basis of acquired immunity.

2.7.3 Immune PSO

Figure 3: Flowchart of the Immune-PSO

During the PSO searching process, if one particle finds a temporary best solution, all the other particles will 16

tend to draw close to it, thus causing the phenomenon of clustering, and leading to a decrease in the diversity of the population. If the temporary best solution is a local best solution, searching in other spaces becomes less possible, and premature convergence to local optima occurs. In this section, we introduce an immune clone algorithm which overcomes this drawback of the standard PSO algorithm. Figure 3 is the flowchart of the Immune-PSO. We can see from it that first a group of particles are initialized, and then the algorithm calculates the fitness of each particle, and picks the best solution pbest of each individual as well as the global best solution gbest. After that, we start to run immune clonal algorithms. First, we view the particles as antibodies. Then, we calculate their affinity, which is followed by clone copy, hyper-mutation, and clone selection operations. Finally, we update the particles’ (antibodies’) speed and position. If the results meet the terminal condition, we print the results and end processing.

2.7.4 Implementation of the Immune-PSO Algorithm 2.7.4.1 Calculating the Affinity of Particles Affinity is the criterion used to measure the goodness of each antibody in the population. If we view particles as antibodies, to calculate an antibodies’ affinity is to calculate a particles’ affinity. The affinity takes both fitness and the particle’s position into consideration, and its formula is as follows: (37) is the distance between particle i and the global best solution gbest √∑

and

(

)

(38)

are the position of particle i and the global best particle in dimension j. We can see from

formula (38) that the closer the particle to the global best, and the higher the fitness, the larger the affinity.

2.7.4.2 Clone Copy The number of copies of each individual is calculated in proportion to its affinity. The number of copies of the ith individual is: 9 pu/9

uwedj ilwE’F

|∑

|

(39)

n is the size of the population. The larger the affinity, the better the individual, and thus the more offspring it will clone. Therefore, the superior individual is preserved and propagated, and this accelerates the speed of convergence.

17

2.7.4.3 Clone Hyper-Mutation For each copy of an individual, a probability is assigned to determine whether to execute hyper-mutation. During the course of evolution, the diversity of the population will decrease rapidly, as all the particles gather around the best one. If the best solution is a local best solution, the result will converge to a local optimum. Hyper-mutation can help to avoid getting stuck on the local best value. Hyper-mutation, namely Gaussian Mutation (GM) together with Cauchy Mutation (CM), has already been successfully applied to genetic algorithms. This paper uses both approaches. GM is used for small length mutation, CM is used for large length mutation; and the decision on which one to choose depends on the individual’s fitness. GM helps to promote accuracy and CM helps to avoid local best value. a) Gaussian Mutation (GM) According to GM,

will be replaced by ,

where

(40)

is the standard normal distribution.

b) Cauchy Mutation (CM) The Cauchy density function is defined as ,

(41)

is a scale factor, and t>0, , and

is generated by Cauchy function,

(42) is a adjusting factor.

2.7.4.4 Clone Selection

Figure 4: Main operations of clonal selection algorithms 18

After clone copy, clone hyper-mutation is carried out, and we choose a best individual into the next generation. When being selected, father and sons are put together. Figure 4 shows the process, where …

…..

are fathers, and

,

is the new population.

2.8 Parameter Estimation for Market Participants In order to measure the performances of parameter configurations, we compare the Clayton copula generated by the artificial financial market with the real Clayton copula of the target market. We repeat the simulation for the same parameter configuration several times and the mean value of those repeated simulations is regarded as the final fitness value of the corresponding parameter configuration. The number of times a single parameter configuration is used in simulation is denoted by

, the parameter of the

Clayton copula of the real target market B and the original market A at time t is denoted by

, and , i= 1,….. .

the Clayton copula parameter of the ith time repetitive simulation is denoted by

Thus the fitness function for the individual parameter configuration to be minimized is given by ∑



(43)

3 Implementation and Analysis Table 3: Optimum parameter values for the simulated South Korean market Symbol

Represents Noise traders proportion

Parameters, I-PSO 0.11

Probability to buy for noise traders

0.33

Probability to sell for noise traders

0.26

Probability for hold for noise traders

0.30

Strategies for a minority technical-Game player

28

Strategies for a majority technical-Game player

49

Time period for calculating the MA indicators

7

Time period for calculating the TRB indicators

15

Time period for calculating the VOL indicators

22

Scale factor for Tech-GP market choosing

17

Scale factor for Tech-Game market choosing

24

Memory size of minority Technical-Game players

24

Memory size of majority Technical-Game players

51

Sensitivity to price change for herd traders

25

Sensitivity of the market, in price formation, towards the order imbalance

3.8

Scale factor for short memory

31

Scale factor for long memory

42

19

We optimize introducing to the set of parameters

and

from formulas (22) and (23). Notice that now

the proportions of different types of technical traders and herd traders are not part of the parameter configuration, as they change throughout a simulation. The proportion of noise traders is still part of the sets of parameters, however. A constant and

is allocated randomly, as an integer number between

, to each technical trader . The new optimised set of parameters is presented in Table 3.

Next, Figure 5 compares the real and simulated market indices of South Korea, using the optimum parameter configuration, along with the real Thai index. The characteristics of the real and simulated South Korea’s market are presented in Table 4, where Kendal’s tau uniquely corresponds to Clayton copula’s tail dependence.

Figure 5: Co-evolutionary market - a comparison of the simulated and real market indices of South Korea and the real Thai index, from 25/02/1997 to 31/12/1997

Table 4: Real and simulated dependence between South Korea’s and Thailand’s markets Target Value Kurtosis of daily return distribution Volatility Kendal’s tau for the pre-crisis phase Kendal’s tau during the crisis phase

Real 3.08 63.7 -0.4334 0.7328

I-PSO 5.43 52.6 -0.4133 0.6512

The change is brought by the variable status of traders, which can be observed in Figures 6, 7 and 8. The status profiles for technical-GP traders, technical-Game traders, and herd traders are shown in Figure 6. Figure 7 is particularly focused on the daily increment of herd traders. Finally, Figure 8 presents the net order of the four types of traders, including noise traders. The simulated price index now follows closer the real one, and the simulated dependence coefficient, in both pre-crisis and crisis period, approximates well the real dependence. Figure 7 further demonstrates the daily increase in herd traders. We can see that the number of herd traders increases from about 1% to almost 2.5%, 10 days before the crisis, then continues to almost 1% increase each day. Figure 8 next shows 20

the net orders, i.e. buy order less sell orders, for the four types of traders. Since the net order affects the market price in the model, we can follow the trend of price change by observing the net order total across all traders. The net order total is represented with black stars in the graph. Initially, the market price is affected by the joint impact of all four types of traders. As the crisis progresses, the red line (herd traders) gets closer to the black star (net order total). Therefore, mostly herd traders’ behaviour contributes to market price levels during crisis, though a significant number of other types of traders remain on the market.

Figure 6: South Korea simulation: changes in trader status

Figure 7: Daily increment of herd traders

Finally, traders’ assets, whether noise, herd, technical-Game or technical-GP traders, all suffered a big loss. Total asset value decreased from 10,000 to 3,000, losing almost 70% percent of their value. Since the crisis originated in Thailand, the situation could be worse there. The above analysis reveals that herd traders are a 21

factor in the mechanism of financial contagion. A question to raise here is as follows: since the crisis is caused by market conditions, mainly caused by international currency speculators, beyond the control of individual traders and even their governments, how then can we recover or better still prevent the crisis from happening? This is a difficult issue, and requires the co-ordination in action and the shared responsibilities of governments.

Figure 8: Net order of the four types of traders

3.1 Comparing the Results from I-PSO and GA

Figure 9: GA for SK and Thailand

22

Figure 10: I-PSO for SK and Thailand

Table 5: Real and simulated dependence between Thailand and SK markets Target Value Kurtosis of daily return distribution Volatility Kendal’s tau for the pre-crisis phase Kendal’s tau during the crisis phase

Real 3.08 63.7 -0.4334 0.7328

I-PSO 7.54 47.6 -0.2143 0.4714

GA 8.9 35.6 -02349 0.4612

We can see from the results above that I-PSO is better overall.

3.2 Simulated Prediction of Contagion from Thailand to South Korea

Figure 11: Pre-crisis period optimisation-simulation for SK and Thailand

23

As the main goal of this thesis is to model and predict financial contagion, we optimize in the pre-crisis period using data from the domestic market (South Korea) and the crisis-origin foreign market (Thailand), and predict in the crisis period using data from the foreign market and predicting the affected domestic market.

Figure 12: Crisis period predictive-simulation for SK and Thailand

Using the model parameters optimised during the pre-crisis period, we simulate the post-crisis period, and can see from Figure 12 above that the predictive simulation approaches the real contagion behaviour well.

3.3 Application to the Russian crisis of 1998 3.3.1 Background Declining productivity, artificially high fixed exchange rates between the Ruble and foreign currencies to avoid public turmoil, and a chronic fiscal deficit, were the reasons that led to the crisis. The economic cost of the first war in Chechnya, estimated at $5.5billion (not including the rebuilding of the ruined Chechen economy), also contributed to the crisis. In the first half of 1997, the Russian economy showed some signs of improvement. However, soon after this, the problems began to gradually intensify. Two external shocks, the Asian financial crisis that had begun in 1997 and the following declines in demand for (and thus price of) crude oil and nonferrous metals, severely impacted Russian foreign exchange reserves (IMF, 2012). When the East Asian financial crisis broke out in 1997, prices for Russia's two most valuable sources of capital flows, energy and metals, plummeted. Given Russia’s fragile economy, the rapid decline in the value of those two capital sources resulted in an economic chaos in the country where GDP per capita fell, unemployment soared, and global investors liquidated their Russian assets. At the time, Russia employed a "floating peg" policy toward the Ruble, meaning that the Central Bank decided that at any given time the ruble-to-dollar RUR/USD exchange rate would stay within a particular range. If the Ruble threatened to devalue outside of that range or "band", the Central Bank would intervene by spending foreign reserves to 24

buy Rubles. For instance, during the year prior to the crisis, the Central Bank aimed to maintain a band of 5.3 to 7.1 RUR/USD, meaning that it would buy Rubles if the market exchange rate threatened to exceed 7.1 Rubles per Dollar. Similarly, it would sell Rubles if the market exchange rate threatened to drop below 5.3. (Stiglitz, 2003). The inability of the Russian government to implement a coherent set of economic reforms led to severe erosion in investor confidence and a chain reaction that can be likened to a run on the Central Bank. Investors fled the market by selling Rubles and Russian assets (such as securities), which also put downward pressure on the Ruble. This forced the Central Bank to spend its foreign reserves to defend Russia's currency, which in turn further eroded investor confidence and undermined the Ruble. It is estimated that between 1 October 1997 and 17 August 1998, the Central Bank spent approximately $27billion of its U.S. dollar reserves to maintain the floating peg. On 13 August 1998, the Russian stock, bond, and currency markets collapsed, as a result of investors fearing that the government would devalue the Ruble, default on domestic debt, or both. Annual yields on the Ruble denominated bonds reached more than 200 percent. The stock market had to be closed for 35 minutes as prices plummeted. When this happened, it was down 65 percent with a small number of shares actually traded. From January to August 1998, the stock market had lost more than 75 percent of its value, 39 percent in the month of May alone. (Kotz, 1998) The nearby economies were also affected, including Ukraine, which we use in the contagion simulation next.

3.3.2 Results and Analysis

Figure 13: Co-evolutionary market - a comparison of the simulated and real market indices of Ukraine, along with the real Russian index, from 28/04/1997 to 04/09/1998

25

Figure 13 compares the real and simulated market indices of Ukraine, using the optimum parameter configuration, along with the real Russian index. The characteristics of the real and simulated Ukraine’s market are presented in Table 6-5, where Kendal’s tau uniquely corresponds to Clayton copula’s tail dependence. Table 6: Optimum parameter values for the simulated Ukraine market

Symbol

Parameters, I-PSO

Represents Noise traders proportion

0.12

Probability to buy for noise traders

0.31

Probability to sell for noise traders

0.22

Probability for hold for noise traders

0.35

Strategies for a minority technical-Game player Strategies for a majority technical-Game player

28 49

Time period for calculating the MA indicators Time period for calculating the TRB indicators Time period for calculating the VOL indicators Scale factor for Tech-GP market choosing Scale factor for Tech-Game market choosing Memory size of minority Technical-Game players

7 15 27 17 34 24

Memory size of majority Technical-Game players

51

Sensitivity to price change for herd traders

22

Sensitivity of the market, in price formation, towards the order imbalance Scale factor for short memory

4.1

Scale factor for long memory

42

41

Table 7: Real and simulated dependence between Ukraine’s and Russian’s markets Target Value

Real

I-PSO

Kurtosis of daily return distribution

3.98

4.23

Volatility

43.7

Kendal’s tau for the pre-crisis phase

-0.3314

-0.4133

Kendal’s tau during the crisis phase

0.7328

0.6322

58.6

The change is brought by the variable status of traders, which can be observed in Figures 14, 15 and 16. The status profiles for technical-GP traders, technical-Game traders, and herd traders are shown in Figure 14. Figure 15 is focused on the daily increment of herd traders. Figure 16 presents the net order of the four types of traders, including noise traders.

26

Figure 14: Ukraine simulation: changes in trader status

Figure 15: Daily increment of herd traders

Figure 16: Net order of the four types of traders 27

The simulated price index follows closely the real one, and the simulated dependence coefficient, in both pre-crisis and crisis period, approximates the real dependence.

3.4 Simulated Prediction of Contagion from Russia to Ukraine

Figure 17: Pre-crisis period optimisation-simulation for Russia and Ukraine

We optimize in the pre-crisis period using data from the domestic market (Ukraine) and the crisis-origin foreign market (Russia), and predict in the crisis period using data from the foreign market and predicting the affected domestic market.

Figure 18: Crisis period predictive-simulation for Russia and Ukraine

Using the model parameters optimised during the pre-crisis period, we simulate the post-crisis period, and

28

as Figure 18 above shows, the simulated result captures the pattern of the real contagion behaviour relatively well.

4 Conclusion A simulation mechanism is designed for crisis propagation accommodating contagion. A new coevolutionary market model is described, where some of the technical traders change their behaviour during crisis and their decisions become largely influenced by market sentiment rather than based on fundamental factors and underlying strategies. Analyzing agents’ behaviour, it is observed that the herd mentality intensifies during crisis. This paper focuses on the transformation of market interdependence into contagion, and on contagion effects. A multi-national platform is build first, to allow different type of players to implement their trading strategies while considering information from both domestic and foreign markets. Traders’ strategies and the performance of the simulated domestic market is trained using historic prices of domestic and foreign markets, while optimizing artificial markets’ parameters through immune particle swarm optimization techniques. Further elements are introduced contributing to the transformation of technical into herd traders. A GARCH-copula is applied next to calculate the tail dependence between the affected market and the origin of the crisis. That parameter is used in the fitness function for selecting the best solutions within the evolving population of possible model parameters, and therefore in the optimization criteria for contagion simulation. The results show that the proportion of herd traders increases in the net market order for optimum contagion simulations. While technical traders’ behaviour corresponds to propagating a crisis through interdependence, herd behaviour corresponds to propagating through contagion. If contagion could be avoided or transformed back to interdependence, with the timely response of national governments and international institutions, a crisis would be more manageable. Further research could introduce a recovery mechanism… into the model through the design of national and international intervention.

References 1.

E Bouyé, V Durrleman, A Nikeghbali, G Riboulet, T Roncalli (2001): Copulas: an open field for risk management, Working Papers, University of Warwick Financial Econometrics Research Centre, vol. 2001(1), pp 1-14.

2.

G.M Caporale, A Cipollini, N Spagnolo (2005): Testing for contagion: a conditional correlation analysis, Journal of Empirical Finance, vol. 12(3), pp 476-489.

3.

G.M Caporale, A Serguieva, H Wu (2009): Financial contagion: evolutionary optimization of a multinational agent-based model, Intelligent System in Accounting, Finance and Management, vol. 16(1-2), pp 111-126. 29

4.

G.M Caporale, A Serguieva, H Wu (2008): A mixed-game agent-based model for simulating financial contagion, Proceeding of 2008 IEEE World Congress on Computational Intelligence, Hong Kong, pp 3421-3426, IEEE Press.

5.

U Cherubini, E Luciano, W Vecchiato (2004): Copula Methods in Finance, Wiley.

6.

A Cipollini. G Kapetanios (2009):

Forecasting financial crises and contagion in Asia using

dynamic factor analysis, Journal of Empirical Finance, vol. 16(2), pp 188–200. 7.

R Cont, J.P Bouchaud (2000): Herd behaviour and aggregate fluctuations in financial markets, Macroeconomic Dynamics, vol. 4(2), pp 170-196.

8.

J. De Long, A Shleifer, L Summers, R Waldmann (1990): Noise trader risk in financial markets, Journal of Political Economy, vol. 98(4), pp 703-738.

9.

R Engle (1982): Autoregressive conditional heteroskdesticity with estimates of the variance of United Kingdom inflation, Econometrica, vol. 50(4), pp 987-1007.

10. J.D Farmer (2002): Market force, ecology, and evolution, Industrial and Corporate Change, vol. 11(5), pp 895-953. 11. K Forbes, R Rigobon (2002): No contagion, only interdependence: measuring stock market comovements, Journal of Finance, vol. 57(5), pp 2223-2261. 12. I Giardina, J.P Bouchaud (2003): Bubbles, crashes and intermittency in agent based market models, European Physical Journal B, vol. 31, pp 421–437. 13. C Gou (2006): The simulation of financial markets by an agent-based mixgame model, Journal of Artificial Societies and Social Simulation, vol. 9(3), pp 1-11. 14. P Jefferies, M Hart, P Hui, N Johnson (2001): From market games to real-world markets, European Physical Journal B, vol. 20, pp 493-501. 15. G Kaminsky (1999): Currency and banking crises - the early warning of distress, IMF Working Papers, International Monetary Fund, vol. 99(178), pp 1-38. 16. G Kaminsky, S Lizondo, C Reinhart (1998): Leading indicators of currency crisis, IMF Staff Papers, International Monetary Fund, vol. 45(1), pp 1-48. 17. D Kotz (1999): Russia's financial crisis: the failure of neoliberalism?, Z Magazine, vol. January, pp, 28-32. 18. B Lebaron (2000): Agent-based computational finance: suggested readings and early research, Journal of Economic Dynamics and Control, vol. 24(5-7), pp 679-702. 19. F Liu, A Serguieva, P Date (2010): A mixed-game and co-evolutionary genetic programming agent-based model of financial contagion, Proceeding of 2010 IEEE World Congress of Evolutionary Computation, Barcelona, pp. 1-7, IEEE Press. 30

20. S Martinez-Jaramillo, E Tsang (2009): A heterogeneous and co-evolutionary GP-based financial market, IEEE Transaction on Evolutionary Computation, vol. 63(1), pp 1105-1142. 21. R Nelsen (2006): An Introduction to Copulas, 2nd Edition, Springer. 22. R Nelsen (2001): Kendall tau metric, in M Hazewinkel, Editor, Encyclopaedia of Mathematics, vol. 13, pp 226-227, Kluwer Academic Publishers. 23. J Rodríguez (2007): Measuring financial contagion: a copula approach, Journal of Empirical Finance, vol. 14(3), pp 401-423. 24. A Serguieva, F Liu, P Date (2011): Financial contagion simulation through modelling behavioural characteristics of market participants and capturing cross-market linkages, 2011 IEEE Symposium on Computational Intelligence for Financial Engineering and Economics, Paris, pp 1-6, IEEE Press. 25. A Serguieva, H Wu (2008): Computational Intelligence in Financial Contagion Analysis , InterJournal: Complex System, New England Complex System Institute, vol. 2229, pp 1-12. 26. R. Snowden (2006): Teach Yourself Freud, McGraw-Hill. 27. J Stiglitz (2003): The ruin of Russia, The Guardian, retrieved December 2013. 28. M Tanaka-Yamawaki, S Tokuoka (2006): Minority game as a model for artificial financial markets, 2006 IEEE Congress on Evolutionary Computation, Vancouver, pp 2157- 2162, IEEE Press. 29. L Van Valen (1973): A new evolutionary law, Evolutionary Theory, vol. 1, pp 1-30. 30. J Yang, D Bessler (2008): Contagion around the October 1987 stock market crash, European Journal of Operational Research, vol. 184(1), pp 291–310.

31