19 October 2015All rights reserved, Edward Tsang & Serafin Martinez jaramillo CHASM Co-evolutionary...
-
Upload
calvin-greene -
Category
Documents
-
view
228 -
download
14
Transcript of 19 October 2015All rights reserved, Edward Tsang & Serafin Martinez jaramillo CHASM Co-evolutionary...
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
CHASMCo-evolutionary Heterogeneous
Artificial Stock Markets
Serafín Martínez Jaramillo
Edward Tsang
CCFEA, Essex
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
CHASM Research Summary
Ref: AI-ECON, Giardina et al 2003, other markets
Questions: How does the
price change?What is the
effect of learning by traders?
Artificial Marketendogenous
EDDIEEDDIEEDDIE
EDDIEEDDIEFundamental
EDDIEEDDIENoise
Poly
mor
phic
CHASM Platform
0
1000
2000
3000
4000
5000
6000
7000
8000
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
CHASM Overview
EDDIE AgentsAgents evolveHeterogeneous beliefsExample agent
Agents: technical, fundamental, noise or hybrid (mode switching)Experimenter controls the number of agents in each group
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
Experimenter’s controls
Users have control over:• Market Mechanisms• Number of traders• Etc.
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
Heterogeneity
LIMIT ORDERS
FUNDAMENTALIST
% TO TRADE
INDICATORS
COMPUTING POWER TIME & RETURN
LEARNING
No
Agents learn:Periodic ¦ Red Queen
Homogeneity
HeterogeneityHomogeneity
Heterogeneity
Homogeneity
50%
100%
Partial ¦ CompleteNo
Buy ¦ Sell
No
Base Case for Stylized Facts
Seven dimensions explored
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
Summary of Base Case
• Agents must be competent and use balanced training data (realistic expectation)
• Presence of fundamental traders needed
• Limit orders (trading strategies) essential
• % traded and time & return matter
• Heterogeneous computing power and beliefs not essential
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
A condition for stylized facts
Limit Order Yes No
Fundamental Traders
Partial / Complete
No
Computing Power
Homogeneous Heterogeneous
% to Trade 50% 100%
Indicators Heterogeneous Homogeneous
Time & Return Homogeneous Heterogeneous
Evolving agents No Yes
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
Learning Improves Performance
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
Learning under Red Queen
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
Prices and ReturnsStock price under Red Queen constraint
245
250
255
260
265
270
275
1 78 155 232 309 386 463 540 617 694 771 848 925
Period
Pri
ce
Return under the Red Queen constraint
-0.01
-0.008
-0.006
-0.004
-0.002
0
0.002
0.004
0.006
0.008
0.01
Period
Ret
urn
Stock price under Ad Hoc retraining
252254256258260262264266268270272274
1 77 153 229 305 381 457 533 609 685 761 837 913 989
Period
Pri
ce
Return under Ad Hoc retraining
-0.01
-0.008
-0.006
-0.004
-0.002
0
0.002
0.004
0.006
0.008
0.01
Period
Ret
urn
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
Artificial Finance Market Conclusions
• Platform developed– It supports a wide range of experiments
• Conditions for stylized facts identified in endogenous, realistic market
• Agents must be competent and realistic– Some must observe fundamental values
• Learning agents (EDDIE-based):– Statistical properties of returns and wealth distribution
changed– No need for fundamental trader!
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
CHASMCo-evolutionary Heterogeneous
Artificial Stock Market
Details and Explanations
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
CHASM Market Details
Assets
Market Mechanism
Excess Demand
Rationing
Wealth Dynamics
GIARDINA, I.A. and J.P.A. BOUCHAUD, 2003. Bubbles, crashes and intermittency in agent based market models. The European Physical Journal B-Condensed Matter , Vol.31, 421-437
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
Assets
The market participant i will be able to hold at time t, two different types of assets:
– a risky asset, denoted by hi(t) or
– cash, denoted by ci(t)
The stock price at time t will be denoted by P(t)
)(thi
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
Market Mechanism
• Agent i will take decision di(t) at time t: di(t) = 1 to buy
di(t) = –1 to sell
di(t) = 0 to do nothing
• Agent i makes a bid or offer of a fraction qi(t) of its current holding:
0)(0
1)()(
1)()(
)(
)(
tdif
tdiftgh
tdiftp
tcg
tq
i
ii
ii
i
g is a parameterci is cashhi is stock holdingp is price of stock
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
Excess Demand• The aggregated volume of bids: B(t)
• The aggregated volume of offers: O(t)
• Excess demand: D(t)
)(tB
)()()( tOtBtD
• Price is calculated in the following way:(λ is a parameter):
/)()1()( tDtPtP
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
Rationing
The amount of shares that the agent i will actually buy or sell is:
1)()(
1)()(
)()(
tdifthg
tdiftP
tCg
t
ii
ii
i
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
Wealth dynamics
Finally we can update the traders’ holdings of cash and the risky asset:
)()1()( tthth iii
)()()1()( tPttctc iii
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
CHASM Traders
Details and Explanations
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
Evolving Agents
• Evolution:– The wealth of an investor is the main factor to
search an improvement on his prediction rules (Red Queen dynamics)
• Benchmark and calibration:– Stylised facts
• Time:– Discrete time jumps
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
Example Agent
ITE
Buy ITEAnd
= Sell Hold= Not
<MV_12 233
TRB_5 27.3
VOL_12 -16.5
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
Traders Heterogeneity
• Noise traders– Homogeneous
• Fundamentalists– Departure from the fundamentals T– Threshold value
• Technical traders– Computational Capabilities– Indicators set– Rate of return and time horizon– Fundamental behavior– Limit orders
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
Traders
The market is composed by technical, fundamental and noise traders. We define NT as the number of technical traders, NF as the number of fundamental traders, NN as the number of noise traders and N as the total number of traders in the market.
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
Noise traders
The noise traders will take a decision to buy, sell or do nothing with different probabilities, pb, ps and pn respectively. Such probabilities are defined before the simulation and remain with the same value during the simulation.
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
Fundamentalists
• They will change their position on the risky asset if the price departs from a value that they perceive as the fundamental one. These traders will continue to adjust their positions until such difference T, is lower than a certain threshold value Farmer 1998.
• The above mentioned values will be generated for each individual trader by drawing random numbers from uniform intervals [Tmin, Tmax] for T and [min max] for . – These limits of such intervals are user specified.
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
Technical traders
Technical analysis is a key feature of the behavior of these agents. Technical analysis is an important tool for decision making in investment. Besides, there is strong evidence that technical analysis is being used extensively in financial markets.
We are not restricted to use just technical indicators. We use some momentum indicators as well.
EDDIE is the basic framework to the design of the investment strategy of our agents
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
Technical traders
The technical traders forecast if the price is going to rise by a certain r% within a certain number of days n.
They will be equipped with up to eight different technical and momentum indicators.
Under certain circumstances they will be able to behave like fundamentalists.
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
Limit orders
• A realistic investment strategy was necessary to complete the design of the agents.
• For that reason, limit orders were created as part of their exit strategy. – Orders to buy or sell at certain prices
• The technical traders can generate two types of limit orders:– Profit taking– Stop loss
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
CHASM Results
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
Artificial Financial Markets
• Santa Fe Artificial Stock Market• Zero Intelligence Agents• Minority Game• Microscopic simulation• Econo-physics• Genetic Programming• Neural Networks• Learning Classifier Systems
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
GP Markets comparison
• AI-ECON– Price based on excess
demand (Farmer’s work)
– Each tree is an agent– Business School:
Fixed retraining periodicity (exogenous)
– Notion of ranking
• CHASM – Price based on excess
demand– Each Trader has a
population of trees– Fixed periodicity and
“Red Queen” dynamics (endogenous)
– Relative Wealth drives the desire to improve
No Limit Order
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
No Fundamental Trader
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
Heterogeneous Computing Power
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
Trading 100% of capital
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
Homogeneous Indicators
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo
Heterogeneous time and return
20 April 2023 All rights reserved, Edward Tsang & Serafin Martinez jaramillo