Tải bản đầy đủ - 0 (trang)
1 The Fidelity of Models: From KISS Principle to High-Fidelity Models

1 The Fidelity of Models: From KISS Principle to High-Fidelity Models

Tải bản đầy đủ - 0trang

60



I. Ono and H. Sato



in the field of science are simpler than those in the field of engineering. In the

field of science, it is important to capture the nature of a phenomenon. In this

context, it is desirable to make a computer simulation model as simple as possible

under the criterion that the model can reproduce the phenomenon because such a

model reveals the essence of the mechanism causing the phenomenon. On the other

hand, in the field of engineering, computer simulation models are used for realistic

decision-making. Computer simulation models for engineering should be of high

fidelity so that the models take into consideration decision variables to be designed

and their effects. Computer simulation models for engineering should be applied to

domains where experiments with prototype models in the real world are difficult

to perform because the experiments are expensive, dangerous, or unethical. The

complexity of a computer simulation model should be realistically computable.

In the domain of addressing physical phenomena, the computer simulation

has been an absolutely essential tool for not only science but also engineering.

Physical phenomena are easy to model because they are governed by primitive

equations. However, precise models are not realistic in terms of computability.

Before computer simulation models for engineering are put to practical use in

the domain where physical phenomena are addressed, there have been various

innovations such as developing high-speed and high-capacity computers; improving

methods of modeling, numerical calculation, and visualization; and inventing highly

developed methods of experiment and observation for validating the computer

simulation models. A typical example is a simulation of global warming. Recently,

the effect of human activity related to changes in atmospheric temperature in the

future has become predictable by computer simulations [3].

In the domain of treating social phenomena, the KISS (keep it simple, stupid)

principle [1] has been proposed as a guideline for building computer simulation

models for science. As shown in Fig. 3.1 by ensuring that there is always a link

to mathematical analysis, computer simulation models for science should provide

some results that cannot be obtained by mathematical analysis. Recently, building

high-fidelity computer simulation models for engineering in the domain of social

simulations is becoming important, aiming at seeking suggestions for realistic

institutions. Needless to say, it is very difficult to build computer simulation models

for engineering in the domain of social simulations for the following reasons: (1) we

do not have primitive equations, (2) modeling societies and humans is difficult, (3)

it is difficult to construct experimental systems in the real world, and (4) available

practical data is limited. As shown in Fig. 3.1, computer simulation models for

engineering have a connection to experiments by prototype models in the real world.



Science

Mathematical model



Theoretical analysis



Engineering

Computer simulation model



KISS principle



High-Fidelity model



Fig. 3.1 The KISS principle and high-fidelity models



Prototype model



Real world



3 Building Artificial Markets for Evaluating Market Institutions and Trading. . .



61



3.2 Requirements for Artificial Market Simulators

for Evaluating Market Institutions and Trading

Strategies

This section presents five design requirements which we consider when we build

artificial market simulators for evaluating market institutions and trading strategies.

The five requirements are as follows:

• High Fidelity

As discussed in the previous section, an artificial market system should have

high fidelity in order to evaluate various institutions and trading algorithms. In

order to achieve high fidelity, the following conditions should be considered:

1. All the market institutions in a real market can be built into the system.

2. Market institutions should be duplicated precisely.

3. The effects when system parameters are being changed in the market can be

examined.

4. Phenomena that occurred in real markets can be reproduced accurately.

• High Transparency

Machine agents and human agents should be able to participate in the market

under the same conditions at the same time for two purposes. One is to analyze

human trading behaviors and make machine agents that behave like human

agents, which is important for fidelity. The other is to compare the results

obtained by experiments using only machine agents with those using human

agents in order to verify the validity of the experiments using only machine

agents.

• High Reproducibility

The same results should be obtained if the experiments are performed under

the same conditions with the same random seeds.

• High Traceability

All the internal states of agents and a market should be stored in files in order

to reconstruct and understand what happens in the market at arbitrary times.

• High Usability

It should be easy for computer novices to install, configure, and manage the

system, which is an important factor in enabling various kinds of users in the

economics field to make full use of the system.



3.3 Itayose U-Mart System (U-Mart System Ver.2)

The Itayose U-Mart system is an order-driven artificial market that adopts the batch

auction method, which is called Itayose in Japanese. Figure 3.2 shows the structure

of the Itayose U-Mart system. This system is a model of a single exchange managing



62



I. Ono and H. Sato



Fig. 3.2 The structure of the

Itayose U-Mart system



a single futures market of a single brand. This system deals with a single brand.

Agents trade a virtual futures index of an existing spot index which is traded outside

of the system such as Nikkei 225 and S&P 500. The futures prices in the virtual

market emerge as the results of interactions among trader agents. Human agents as

well as machine agents can participate in the market via the network at the same

time.



3.3.1 System Configuration

Figure 3.3 shows the configuration diagram of the system. The system is designed

as a client-server model. It consists of the market server and the human agent trading

terminal.

The market server is modeled on a stock exchange in the real world. It is

responsible for order control, account management, contract process, and so on. The

market server comprises multiple modules as shown in Fig. 3.3. The reproducibility

is achieved by executing agent programs synchronously within the market server.

The following information gives a detailed description of the time management, the

transaction method, and the GUI tools of the Itayose U-Mart system.



3.3.1.1 Time Management in the Itayose U-Mart System

The time in the Itayose U-Mart system is represented by day and session. A day

consists of several sessions and post-trading period. Figure 3.4 is an example of

the schedule of the Itayose U-Mart system. The schedule has six sessions per day.

During trading period, the exchange of the Itayose U-Mart system accepts orders



3 Building Artificial Markets for Evaluating Market Institutions and Trading. . .



Market Server



63



Clients

Human Trading Terminal



Itayose Processing Module

Account Management Module



Human Agent



Order Management Module



Human Trading Terminal



Network Management Module

Human Agent



Machine Agents



Network

Human Trading Terminal



Server GUI Module



Human Agent



Fig. 3.3 The configuration diagram of the Itayose U-Mart system



Session



Itayose



Day



Trading Period



Post trading period



Fig. 3.4 An example of the schedule of the Itayose U-Mart system



from traders. At the end of every session, the contract price is determined by the

Itayose method. Mark to market is done daily in post-trading period. Settlement is

done using the spot price at the due date.



3.3.1.2 The Transaction Method in the Itayose U-Mart System

Itayose is a trading method in which all buy and sell orders are compared and a price

is determined so that the number of executed orders is the maximum as shown in

Fig. 3.5. The priority of the orders is as follows:

1. Order-type priority

Market orders have priority over limit orders. A limit order is an order to

buy/sell at no more/less than a specific price. A market order is an order to be

executed at the current market price.

2. Price priority

A sell/buy limit order at a lower/higher price has a higher priority. If there are

many orders indicating the same price, the rule of time priority is applied.

3. Time priority

If two orders indicate the same price, the older one has a higher priority than

the newer one. If these two orders are placed in the same session, the priority is

determined randomly.



64



I. Ono and H. Sato



Quantity



Demand Curve: B(p)

(Buying)



Uncontract



Contract Quantity



Contract



Spply Curve: S(p)

(Selling)



Selling Order

(Price: Market Order)



Price



Buying Order

(Price: Market Order)



Fig. 3.5 Itayose trading method



Fig. 3.6 Screenshots of the Itayose U-Mart system (Left, server; Right, client)



3.3.1.3 GUI Tools of the Itayose U-Mart System

The left figure in Fig. 3.6 shows the GUI (graphical user interface) of the market

server. The screenshot on the right in Fig. 3.6 shows the GUI of the human agent

trading terminal. The human agent trading terminal is a GUI program that is used by

a human in order to participate in trade over the network. In terms of transparency,

the GUI program is designed to provide an intuitive and easy-to-use environment.



3 Building Artificial Markets for Evaluating Market Institutions and Trading. . .



65



3.3.2 Implementation of Itayose Market Server

In this section, we introduce the internal structure of the Itayose market server

designed by object-oriented modeling (OOM) [5]. The system is implemented in

Java which is an object-oriented programming language. Java has many features:

it runs on multiple platforms, such as Windows, Linux, and Mac, it supports easyto-use parallel processing and networking, and it provides various class libraries,

such as GUI libraries. The core system of the Itayose market server, except the GUI

system, consists of about 150 classes.

Figure 3.7 is the overview of the Itayose market server in UML class diagram [2].

As shown in Fig. 3.7, the UMart class, UMartNetwork class, and UServerManager

class play central roles. The UMart class manages the whole stock exchange

and is the parent class of the UMartNetwork class. The UMartNetwork class

is for the network environment. The UServerManager class provides a start-up

mechanism of the Itayose market server. The UMart class has the UServerStatus

class, the UReadWriteLock class, the UCmdExecutableChecker class, classes for

managing accounts, classes for managing orders and contracts, classes for managing

local machine agents, and classes for managing data and logs. The UServerStatus

class manages date, session, and the server status. The UReadWriteLock class

prevents the server status from being disrupted by processes running in parallel. The

UCmdExecutableChecker class examines whether or not a command from an agent

can be executed under the current server status. The classes for managing accounts

are shown in Fig. 3.8. The classes for managing orders and contracts are shown in

Fig. 3.9. The classes for managing local machine agents are shown in Fig. 3.10. The

classes for managing data and logs are shown in Fig. 3.11. The UMartNetwork class

has classes for managing network clients shown in Fig. 3.12.



Fig. 3.7 An overview of the Itayose market server



66



I. Ono and H. Sato



Fig. 3.8 Classes for managing accounts in the Itayose market server



Fig. 3.9 Classes for managing orders and contracts in the Itayose market server



3.3.3 How to Develop Trading Agents for Itayose U-Mart

System

This section provides information necessary to design trading strategies for the

Itayose U-Mart system. The Itayose U-Mart system is designed by object orientation

and implemented by Java programming language. For this reason, it is necessary to

understand the basic concept of object orientation and Java programming language



3 Building Artificial Markets for Evaluating Market Institutions and Trading. . .



67



Fig. 3.10 Classes for managing local machine agents in the Itayose market server



Fig. 3.11 Classes for managing data and logs in the Itayose market server



before making programs of trading agents for the Itayose U-Mart system. However,

it is possible to design trading strategies without the knowledge of object orientation

and Java programming language.



68



I. Ono and H. Sato



Fig. 3.12 Classes for managing network clients in the Itayose market server



At the start of each session, an agent receives the following observation from the

exchange:



















The current date

The current session

The transaction period

The number of sessions per day

The past spot price series

The past futures price series

The current position

The current cash balance



Then, the agent decides whether or not it makes orders according to its trading

strategy and the observation from the exchange. If the agent places orders, the agent

determines if the orders are buy or sell and limit or market. If the orders are limit

orders, the order prices also have to be specified. The order volumes also have

to be determined. Finally, the agent makes order forms according to its decision

and submits them to the exchange. The agent can cancel its orders before they are

contracted. The Itayose U-Mart system provides some typical and simple trading



3 Building Artificial Markets for Evaluating Market Institutions and Trading. . .



69



agents called the standard agent set. The standard agent set includes the following

agents:

• RandomStrategy

The RandomStrategy agent chooses sell or buy randomly. It randomly determines the order price according to a normal distribution with a mean value of

the latest futures price and a standard deviation given by a user in advance.

It randomly chooses the order volume between the user-defined ranges. If the

absolute value of the position is expected to get larger than a user-defined

threshold by the order, no action is taken.

• SRandomStrategy

The SRandomStrategy agent chooses sell or buy randomly. It randomly

determines the order price according to a normal distribution with a mean

value of the latest spot price and a standard deviation given by a user in

advance. It randomly chooses the order volume between the user-defined ranges.

If the absolute value of the position is expected to get larger than a userdefined threshold by the order, no action is taken. The difference between

RandomStrategy and SRandomStrategy is its reference price.

• TrendStrategy

The TrendStrategy agent makes a buy (sell) order if the previous futures

price is higher (lower) than the futures price in the previous two sessions. It

randomly determines the order price according to a normal distribution with a

mean value of the latest futures price and a standard deviation given by a user in

advance. It randomly chooses the order volume between the user-defined ranges.

If the absolute value of the position is expected to get larger than a user-defined

threshold by the order, no action is taken.

• AntiTrendStrategy

The AntiTrendStrategy agent makes a buy (sell) order if the previous futures

price is lower (higher) than the futures price in the previous two sessions. It

randomly determines the order price according to a normal distribution with a

mean value of the latest futures price and a standard deviation given by a user in

advance. It randomly chooses the order volume between the user-defined ranges.

If the absolute value of the position is expected to get larger than a user-defined

threshold by the order, no action is taken.

• MovingAverageStrategy

The MovingAverageStrategy agent places orders when the short-term moving

average line and the midterm moving average line have intersections. If the shortterm moving average tends to go up (down), it buys (sells) at a price that is

according to a normal distribution with a mean and a standard deviation. The

mean is the latest futures price plus (minus) a user-defined value. The standard

deviation is a user-defined value divided by four. It randomly chooses an order

volume between the ranges given by a user. If the position is expected to get

larger than a user-defined threshold by the order, no action is taken.



70



I. Ono and H. Sato



• RsiStrategy

The RsiStrategy agent makes decisions by using the relative strength index

(RSI) of the futures price series. RSI is a famous method of technical analysis.

It randomly determines the order price according to a normal distribution with a

mean value of the latest futures price and a standard deviation given by a user in

advance. It randomly chooses the order volume between the user-defined ranges.

If the absolute value of the position is expected to get larger than a user-defined

threshold by the order, no action is taken.

• SRsiStrategy

The SRsiStrategy agent makes decisions by using the relative strength index

(RSI) of the spot price series. RSI is a famous method of technical analysis. It

randomly determines the order price according to a normal distribution with a

mean value of the latest spot price and a standard deviation given by a user in

advance. It randomly chooses the order volume between the user-defined ranges.

If the absolute value of the position is expected to get larger than a user-defined

threshold by the order, no action is taken.

• DayTradeStrategy

The DayTradeStrategy agent places a sell order and a buy order at the same

time. The sell order is put at a price which is a little higher than the latest futures

price. The buy order is put at a price which is a little lower than the latest futures

price. It randomly chooses the order volume between the ranges given by a user.

If the position is expected to get larger than a user-defined threshold by the order,

no action is taken.

A user can make an original agent program by designing a trading strategy and

implementing it by Java programming language. The user can register the original

agent program to the Itayose U-Mart system and run it with the standard agent set.



3.3.4 Features and Problems of the Itayose U-Mart System

This section summarizes the features and the problems of the Itayose U-Mart system

in terms of the requirements discussed in Sect. 3.2.

The features of the Itayose U-Mart system are as follows:

1. Fidelity

In the market of the Itayose U-Mart system, futures of the existing stock index

are traded. The price of the futures in this virtual market emerges as a result

of interaction among agents while maintaining a relationship to the real-world

market. The Itayose U-Mart system introduces several factors taken from the

real markets: Itayose is used as a pricing scheme and a closing out position is

used as settlement.

2. Transparency

The Itayose U-Mart system is implemented so that machine agents and

humans can participate in the market equally. SVMP (Simple Virtual Market



Tài liệu bạn tìm kiếm đã sẵn sàng tải về

1 The Fidelity of Models: From KISS Principle to High-Fidelity Models

Tải bản đầy đủ ngay(0 tr)

×