Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

FinMarketsTrading

.pdf
Скачиваний:
41
Добавлен:
10.02.2015
Размер:
4 Мб
Скачать
☆

90

MARKET DYNAMICS

market clearing is a model of price formation that is based on the empirical relation between price change and excess demand (Beja & Goldman 1980).

Here, I outline an elaborate model offered by Lux (1998). In this model, two groups of agents, chartists, and fundamentalists are considered. Agents can compare the efficiency of different trading strategies and switch from one strategy to another. Therefore, the numbers of chartists, nc(t), and fundamentalists, nf(t), vary with time while the total number of agents in the market N is assumed constant. The chartist group, in turn, is subdivided into optimistic (bullish) and pessimistic (bearish) traders with the numbers nþ(t) and n-(t), respectively:

ncðtÞ þ nf ðtÞ ¼ N; nþðtÞ þ n ðtÞ ¼ ncðtÞ

ð9:12Þ

Lux (1998) considers several patterns of the trader behavior. First, chartists are influenced by the peer opinion (so-called mimetic contagion). Second, traders switch strategies while seeking optimal performance. Finally, traders may exit and reenter markets. For example, the bullish chartist dynamics is formalized in the following way:

dnþ

¼ ðn pþ nþp þÞð1 nf =NÞ þ mimetic contagion

 

dt

 

 

nf nþðpþf pf þÞ=N þ changes of strategy

ð9:13Þ

ðb aÞnþ market entry and exit

Here, pa denotes the probability of transition from group b to group a, and the probabilities of market entry and exit satisfy the relation bnc ¼ aN.

The bearish chartist dynamics, dndt , are described similarly to (9.13). Con-

version of the bullish chartists into the bearish chartists is given by the following relation:

dP

ð9:14Þ

pþ ¼ 1=p þ ¼ n1 expð U1Þ; U1 ¼ a1ðnþ n Þ=nc þ ða2=n1Þ

 

dt

where n1, a1, and a2 are the model parameters, P is price. Conversion of fundamentalists into bullish chartists and back is described with the relations

 

¼ a3

pþf ¼ 1=pf þ ¼ n2 expð U21Þ;

ð9:15Þ

U21

r þ n2 1 dt P R sjðPf PÞ=Pj

 

 

 

dP

 

Agent-Based Modeling of Financial Markets

91

In (9.15), n2 and a3 are the model parameters, r is the stock dividend, R is the average revenue of economy, s is a discounting factor 0 < s < 1, and Pf is the fundamental price of the risky asset assumed to be an input parameter. Similar relations are used to describe the conversion of fundamentalists into bearish chartists, p–f.

As was pointed out earlier, price dynamics in the non-equilibrium price models are described with an empirical relation between the price change and the excess demand2

dP

¼ bD

ð9:16Þ

dt

In the Lux’s model, excess demand equals

D ¼ tcðnþ n Þ þ gnf ðPf PÞ

ð9:17Þ

The first and second terms in the right-hand side of (9.17) describe excess demands of chartists and fundamentalists, respectively; b, tc, and g are parameters.

The Lux model (1998) has rich dynamic properties. Depending on input parameters, its solutions may include stable equilibrium, periodic patterns, and chaotic attractors. Lux & Marchesi (2000) extended this model for describing the arrival of news, which affects the fundamental price. Namely, the news arrival process was modeled with the Gaussian random variable e(t) so that

lnPf ðtÞ lnPf ðt 1Þ ¼ eðtÞ

ð9:18Þ

The resulting model exhibits such stylized market facts as power-law scaling in the price distribution and volatility clustering.

T H E O B S E R V A B L E - V A R I A B L E S M O D E L

One may notice that there is a degree of arbitrariness in agent-based modeling as the number of different agent types and their behavior can vary upon the modeler’s imagination. This is not that innocuous, as some interesting model properties (e.g., chaos) can be an artifact of the model’s complexity and irrelevant to real market dynamics (see the discussion in Schmidt 2004).

Schmidt (1999) has offered a parsimonious approach to choosing variables in the agent-based modeling of financial markets. Namely, Schmidt suggested that only observable variables should be used in deriving the

92

MARKET DYNAMICS

agent-based models. Schmidt defines observable variables in finance as those that can be retrieved or calculated from the records of market events (such as order submissions and cancellations, transactions, etc.). Numbers of agents of different types generally are not observable. Indeed, one cannot discern chartists and fundamentalists in such a typical situation when the price is growing being lower than the fundamental one. In this case, all traders (let alone contrarians) would rather buy than sell. Only price and the total numbers of buyers and sellers are always observable. Whether a trader becomes a buyer or seller can be defined by mixing different behavior patterns in the trader decision-making rules.

A simple non-equilibrium price model derived along these lines has a constant number of traders, N, including buyers Nþ(t) and sellers N–(t):

NþðtÞ þ N ðtÞ ¼ N

ð9:19Þ

The scaled numbers of buyers, nþ(t) ¼ Nþ(t)/N, and sellers, n–(t) ¼ N–(t)/N, are described with the dynamics equations:

dnþ

¼ vþ n v þnþ

ð9:20Þ

dt

dn

¼ v þnþ vþ n

ð9:21Þ

dt

The factors vþ and v þ characterize the probabilities for transfer from seller to buyer and back, respectively:

vþ ¼ 1=v þ ¼ n expðUÞ; U ¼ ap 1

dp

þ bð1 pÞ

ð9:22Þ

 

dt

Price p(t) is given in units of its fundamental value. The first term in the utility function U characterizes the chartist behavior, while the second term describes the fundamentalist pattern. The factor n has the sense of the frequency of transitions between the seller and buyer behavior. Since nþ(t) ¼ 1 n (t), the system (9.20)–(9.22) is reduced to the equation

dnþ

¼ vþ ð1 nþÞ v þnþ

ð9:23Þ

dt

The price formation equation is assumed to have the following form:

dp

¼ gD

ð9:24Þ

dt

Agent-Based Modeling of Financial Markets

93

In (9.24), the excess demand, D, is proportional to the excess number of buyers.

D ¼ dðnþ n Þ ¼ dð2nþ 1Þ

ð9:25Þ

The model described above is defined with two observable variables: nþ(t) and p(t). In equilibrium, the number of buyers and sellers are equal, and price equals the fundamental values:

nþ ¼ n ¼ 0:5; p ¼ 1

ð9:26Þ

The necessary stability condition for this model is

u ¼ adgn 1 þ e

ð9:27Þ

In the continuous limit, e ¼ 0. However, the numerical solution on a finitedifference grid leads to some computational noise accounted with a finite e. Violation of the condition (9.27) leads to system instability, which can be interpreted as a market crash.

When the condition (9.27) is satisfied, weak perturbations to the equilibrium values quickly decay (see an example in Figure 9.1).

 

1.06

 

 

 

 

 

 

 

 

 

 

 

0.6

 

 

1.04

 

 

 

 

 

 

 

 

 

 

 

0.5

 

 

1.02

 

 

 

 

 

 

 

 

 

 

 

0.4

Number of buyers

Price

1

 

 

 

 

 

 

 

 

 

 

 

0.3

0.98

 

 

 

 

 

 

 

 

 

 

 

0.2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0.96

 

 

 

 

 

 

 

 

 

 

 

0.1

 

 

 

 

 

 

 

 

 

 

 

Price

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Number of buyers

 

 

 

0.94

 

 

 

 

 

 

 

 

 

 

 

0

 

 

0

0.5

1

1.5

2

2.5

3

3.5

4

4.5

5

5.5

6

 

 

 

 

 

 

 

 

Time

 

 

 

 

 

 

 

FIGURE 9.1 Decay of perturbations to equilibrium state in the observable-variables model with a ¼ 1, b ¼ 10, g ¼ 0.2, and d ¼ 1.

94

MARKET DYNAMICS

1.6

Number of buyers

Price

1.4

1.2

1

0.8

0.6

0.4

0.2

0

10

20

30

40

50

60

Time

FIGURE 9.2 Limit cycle in the observable-variables model with a ¼ 1.05, b ¼ 1, g ¼ 1, and d ¼ 1.

Lower values of a and g suppress oscillations of price and facilitate relaxation of the initial perturbations. On the other hand, raising a, which controls the strength of the chartist behavior, increases price volatility.

When the value of u is close to violation of the condition (9.27), price oscillations do not decay; rather, they exhibit the so-called limit cycle (see details in Schmidt 2004). An example of such behavior is shown in Figure 9.2. Further growth of u leads to ever-growing oscillation amplitudes, which may be interpreted as a market crash.

M O D E L I N G E F F I C I E N C Y O F T E C H N I C A L T R A D I N G

Various technical strategies and opinions on their efficiency will be reviewed in Chapter 10. Here, I offer a simple application of the observable-variables model that shows why technical trading may be sometimes successful (Schmidt 2002).

Agent-Based Modeling of Financial Markets

95

Consider a system with the number of traders N that consists of regular traders NR and technical traders NT. The regular traders are divided into buyers, Nþ(t), and sellers, N–(t):

NT þ NR ¼ N ¼ const; Nþ þ N ¼ NR ¼ const

ð9:28Þ

The relative numbers of regular traders, nþ(t) ¼ Nþ(t)/N and n (t) ¼ N (t)/N, and price discovery are described with the equations (9.20) through (9.24). The excess demand in this model includes also the technical traders.

D ¼ dðnþ n þ FnT Þ

ð9:29Þ

Here, nT ¼ NT/N, and the function F is defined by the technical trader strategy. Schmidt (2002) considers a simple technical rule: buying on dips— selling on tops. In other words, buying at the moment when the price starts rising and selling when the price starts falling.

FðkÞ ¼ 1;

when

pðkÞ > pðk 1Þ

and pðk 1Þ < pðk 2Þ

¼ 1;

when

pðkÞ < pðk 1Þ

and pðk 1Þ > pðk 2Þ ð9:30Þ

¼ 0;

otherwise

 

Schmidt (2002) shows that inclusion of the technical traders into the model strengthens price oscillations and increases return on their strategy. Indeed, if technical traders decide that price is going to fall, they sell and thus decrease the excess demand. Due to selling pressure, the price does fall, and the chartist component in regular traders’ behavior motivates them to sell, too. This suppresses price further until the fundamentalist component in regular traders’ behavior becomes overwhelming. The opposite effect occurs if technical traders decide that it is time to buy: They increase demand and the price starts to grow until it notably exceeds its fundamental value. Then, regular traders start selling. In other words, if the concerted actions of technical traders produce a noticeable market impact, they can provoke the regular traders to amplify this trend. This moves price in the direction favorable to the technical strategy.

M O D E L I N G T H E B I R T H O F A T W O - S I D E D M A R K E T

Founders of a new market face many challenges. In particular, they must attract buyers and sellers immediately after opening the market. For example,

96

MARKET DYNAMICS

founders of a new electronic market must overcome inertia of their potential customers who are used to trade via voice brokers.

Right after opening a new market, the order book is empty. A casual buyer may submit an order. But if he does not see sellers for some time, he cancels his order and places it elsewhere. Then a seller may show up—and leave with the same outcome. In short, trading cannot start until a sufficient number of traders is present on both sides of the market. Schmidt (2000) offered a model describing the birth of a two-sided market:

dn

 

dtþ

¼ vþn vþnþ þ XRþi þ rþ

ð9:31Þ

dn

 

dt

¼ vþnþ vþn þ XR i þ r

ð9:32Þ

The functions R i (i ¼ 1, 2, . . . , M) and r are the deterministic and stochastic rates of entering and exiting the market, respectively. Three deterministic effects defining the total number of traders are considered.

First, some traders stop trading immediately after completing a trade since they have limited resources and/or need some time for making new decisions:

Rþ1 ¼ R 1 ¼ bnþn ; b > 0

ð9:33Þ

Second, some traders currently present in the market will enter the market again and possibly will bring in some newcomers (mimetic contagion). Therefore, the inflow of traders is proportional to the number of traders present in the market:

Rþ2 ¼ R 2 ¼ aðnþ þ n Þ; a > 0

ð9:34Þ

Third, some unsatisfied traders leave the market. Namely, it is assumed that those traders who are not able to find the trading counterparts within some time exit the market:

Rþ3

¼ cðnþ n Þ if

nþ > n

 

¼ 0;

if nþ n

ð9:35Þ

 

 

R 3

¼ cðn nþÞ if

n > nþ

 

¼ 0;

if n nþ

ð9:36Þ

 

 

Agent-Based Modeling of Financial Markets

97

The parameter c > 0 in (9.35) and (9.36) is the impatience factor. To simplify the model, Schmidt (2000) neglected stochastic rates r and price variation. Hence, vþ– ¼ v–þ ¼ 0.

If the initial state is specified as

nþð0Þ n ð0Þ ¼ d > 0

ð9:37Þ

then equations (9.31) and (9.32) can be transformed into the following:

dnþ

¼ aðnþ þ n Þ bnþn cðnþ n Þ

ð9:38Þ

dt

 

dn

¼ aðnþ þ n Þ bnþn

ð9:39Þ

 

 

dt

It follows from (9.38) and (9.39) that the equation for the total number of traders n ¼ nþ þ n– has the form

dn

¼ 2an 0:5bn2 þ 0:5b d2 expð 2ctÞ cd expð ctÞ

ð9:40Þ

dt

Equation (9.40) has the following asymptotic stationary solution at t ! 1:

n0 ¼ 4a=b

ð9:41Þ

The continuous model considered here has a drawback in that the total number of traders, n, may fall very low at intermediate times. Yet, n still reaches the asymptotic value (9.41). However, n < 1 does not make sense. Therefore, the discrete analog of equations (9.31) and (9.32), along with a constraint on the minimal value of n (t), may be preferable (see Schmidt 2000, for details).

n ðtÞ ¼ 0 if n ðtÞ < nmin

ð9:42Þ

In real life, the number of traders coming and leaving the market has a stochastic component. Hence, it is natural to assume that the terms rþ and r in equations (9.31) and (9.32) are independent Gaussians with the zero mean and dispersion s: r ¼ dN (0, s). Examples of discrete simulations in Figure 9.3 demonstrate how a high level of trader impatience can delay the birth of a two-sided market.

98

MARKET DYNAMICS

Number of traders in units of 4a/b

1.2

1

0.8

0.6

0.4

c = 1

c = 3

0.2

0

0

20

40

60

80

100

Time

FIGURE 9.3 Simulations of the birth of a two-sided market for a ¼ 0.25, b ¼ 1, d ¼ 0.1, nmin ¼ 0, and s ¼ 1.

SUMMARY

&Agent-based modeling in finance is a framework in which agents’ trading decisions depend on price and their trading, in turn, affects price.

&The two main agent types are fundamentalists and momentum traders (chartists). Fundamentalists buy (sell) when price is lower (higher) than the fundamental asset value. Chartists buy (sell) when price grows (falls).

&Two types of agent-based models can be discerned depending on the formulation of price discovery: the adaptive equilibrium models and non-equilibrium price models.

&In the adaptive equilibrium models, price is determined by supplydemand equilibrium. In these models, agents are rational and are

Agent-Based Modeling of Financial Markets

99

focused on maximizing their wealth by choosing various strategies based on predictions of future price. Agents’ heterogeneous beliefs are the major specific that discerns this framework from the classical asset pricing theory.

&In the non-equilibrium price models, price dynamics is determined by an empirical dependence on excess demand. Agents in these models can compare the efficiency of different trading strategies and switch from one strategy to another.

&Some ambiguities in formulating the agent-based models may be addressed by deriving the models exclusively in terms of observable variables.

&Agent-based models are capable of reproducing such empirical findings as market crashes, power-law scaling in price distributions, and volatility clustering.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]