market science: how markets could be studied as a hard science edward tsang ccfea university of...

39
Market Science: Market Science: How markets could be How markets could be studied as a hard science studied as a hard science Edward Tsang Edward Tsang CCFEA University of Essex University of Essex Colchester , UK , UK 18 June 2022

Upload: violet-edwards

Post on 24-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

Market Science:Market Science:How markets could be studied as a How markets could be studied as a

hard sciencehard science

Edward TsangEdward TsangCCFEA

University of EssexUniversity of EssexColchester, UK, UK

19 April 2023

Page 2: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

Studying Financial MarketsStudying Financial Markets

19 April 2023

Agent-based studies: Simulate markets Look for stylised facts

Artificial Market

EDDIEEDDIEIntelligence

EDDIEEDDIEFundamental

EDDIEEDDIENoise

Technical Analysis: Discover regularities by analysing past series

Classical economics: Mathematical analysis Find fundamental values

Market Science: Observe micro-behaviour Discover regularities

Page 3: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

How Financial Markets are How Financial Markets are studiedstudied

19 April 2023

Technical Analysis: Discover regularities by analysing past series

Classical economics: Mathematical analysis Find fundamental values

Page 4: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

Classical EconomicsClassical Economics To model economy and prices mathematicallyTo model economy and prices mathematically Built on critical assumptionsBuilt on critical assumptions

Perfect rationality Homogeneity Market efficiency

But But market has changed, e.g., e.g. Increased risk-takingIncreased risk-taking High frequency tradingHigh frequency trading

Leading to the Leading to the butterfly effect!! A small, ordinary event…A small, ordinary event… … … could lead to avalanchecould lead to avalanche

19 April 2023

Page 5: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

Classical EconomicsClassical Economics

19 April 2023

Built on critical assumptions

Everybody is perfectly rationalEverybody thinks the sameEverybody has full information

Market has changed!Increased risk-taking

Computer trading

Page 6: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

Changes in the marketChanges in the market Computer tradingComputer trading

Programs react in millisecondsPrograms react in milliseconds New financial instrumentsNew financial instruments

E.g. Options, CFDsE.g. Options, CFDs Increased leverageIncreased leverage

More people can influence the marketMore people can influence the market More data availableMore data available

Both historical data and transaction dataBoth historical data and transaction data Computational methods developedComputational methods developed

Machine learning more efficient and effectiveMachine learning more efficient and effective

19 April 2023

Page 7: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

The butterfly effectThe butterfly effect

Movements are amplifiedMovements are amplified By increased leverageBy increased leverage By computer tradingBy computer trading

Cascading margin callsCascading margin calls Leading to avalancheLeading to avalanche

Can it be studied?Can it be studied? Yes, if one looks into the Yes, if one looks into the microstructure!!

19 April 2023

Page 8: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

Technical Analysis Technical Analysis (Chartists)(Chartists)

19 April 2023

Attempt to find patterns in the chart in order to predict future movements

Patterns have been found.People made money with them.

Questions: Do these patterns repeat?How often?

As traders’ behaviour change, old patterns become irrelevant.E.g. Algorithmic trading replaces human trading

Page 9: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

19 April 2023 All rights reserved, Edward Tsang19 April 2023

Agent-based Markets Agent-based Markets StudiesStudies

Artificial Market

Agent 1

Agent 2

Agent n Expe

rimen

ter

Expe

rimen

ter

•E.

g. s

uppl

y pr

ices

Prices, wealth, etc

4. Compare and contrast

2. interaction

Observed market data(“stylized facts”)

3. Observe

5. modify

1. modelling

1. m

ode

lling

CH

AS

M,

an

artif

icia

l mar

ket

plat

form

“All models are wrong, but some are useful” (Box 1987)

Why? Where applied?

Page 10: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

Why Model-based Markets?

Possible futures Real data only shows one history Simulation could reveal possible crises One could block the paths to crises

Establish causal relations Change agent bahaviour or market conditions Observe differences Differences are due to controlled changes

19 April 2023

Page 11: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

Artificial Market Applications

Find conditions under which crashes happen Build early warning system for financial crisis

Find consequences of bank failure Implication on regulations

Find subgame equilibrium Help deciding how to set the rules or play the game

Test algorithmic trading strategies Wind-tunnel testing before deployment

19 April 2023

Page 12: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

The “Biology” of Markets The “Biology” of Markets (Richard Olsen)(Richard Olsen)

How was biology studied?How was biology studied?

19 April 2023

Richard OlsenForex

OANDA

ObserveObserve CopyCopy MeasureMeasure GeneralizeGeneralize ……

Page 13: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

Market Studied as Hard ScienceMarket Studied as Hard Science

Markets are results of micro-behaviourMarkets are results of micro-behaviour Technical analysis only studies the Technical analysis only studies the resultsresults

(prices)(prices) Much deeper knowledge can be observed Much deeper knowledge can be observed

from studying from studying micro-behaviourmicro-behaviour … … We may not know who’s going to buy/sellWe may not know who’s going to buy/sell But we can study the state of the marketBut we can study the state of the market

And ask And ask what-if questions what-if questions Or questions about its Or questions about its liquidityliquidity

19 April 2023

Page 14: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

Analogy with weather Analogy with weather forecastforecast

Weather forecast: Weather forecast: We may not know the long term weather changesWe may not know the long term weather changes We have lots of sensor informationWe have lots of sensor information We know air flows from high to low pressure regionsWe know air flows from high to low pressure regions We can predict the short-term weather with some We can predict the short-term weather with some

confidenceconfidence Market ScienceMarket Science

We know exactly what orders are placedWe know exactly what orders are placed We know how orders are clearedWe know how orders are cleared We know exactly what happens nextWe know exactly what happens next

19 April 2023

Page 15: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

Data-driven Market StudiesData-driven Market Studies

If I can model every investor, I can predict the If I can model every investor, I can predict the marketmarket But I can’t accurately model investors…But I can’t accurately model investors…

However, I know However, I know exactly what orders were placed I know I know what happened after each order was placed

Whether it was transactedWhether it was transacted Its immediate impact to pricesIts immediate impact to prices Price movements afterwardsPrice movements afterwards

Can’t we learn anything from these?Can’t we learn anything from these? By recording details and looking for regularitiesBy recording details and looking for regularities As we do in biologyAs we do in biology

19 April 2023

Page 16: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

Formal Description of MarketFormal Description of Market

Attempt to define market dynamics formallyAttempt to define market dynamics formally to avoid ambiguity in verbal descriptionsto avoid ambiguity in verbal descriptions A model tell us exactly what factors to considerA model tell us exactly what factors to consider

Markets can be described by statesMarkets can be described by states Events change the state of the marketEvents change the state of the market We want to study consequences of eventsWe want to study consequences of events

Maintain Maintain consequential closure consequential closure if possibleif possible How big an order would cause a crash of 20%?How big an order would cause a crash of 20%?

19 April 2023

Page 17: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

Market Calculus DemoMarket Calculus Demo First step towards market scienceFirst step towards market science Enable scientific reasoning about marketsEnable scientific reasoning about markets

19 April 2023

Page 18: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

Olsen Routes – Computer-aided market analysis

Routes: a programming environment for real time applications

19 April 2023

Page 19: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

A Wiki-style repository of software for studying A Wiki-style repository of software for studying financefinance

19 April 2023

Economist Visualization Expert

Computational Intelligence Expert

High-frequency data(including foreign exchange rates, stock and option prices, interest

rates, etc)

Inter-connected modules

implementing models

Modules interact with each other or users

Users ............

Users upload or retrieve modules

Possibly through automated interaction

Web-based Open-source

Page 20: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

Concluding SummaryConcluding Summary

Classical economics build castles on sandClassical economics build castles on sand Due to unrealistic assumptionsDue to unrealistic assumptions

Technical analysis only scratches the surfaceTechnical analysis only scratches the surface Agent-based modelling helps understand Agent-based modelling helps understand

marketsmarkets Repeatable, enabling scientific studiesRepeatable, enabling scientific studies

Market science looks into micro-behaviourMarket science looks into micro-behaviour Chartists look at end Chartists look at end resultsresults, why not look at , why not look at causescauses!?!? Could be seen as a branch of behavioural financeCould be seen as a branch of behavioural finance

19 April 2023

Page 21: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

Supplementary Supplementary InformationInformation

19 April 2023

Page 22: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

High Frequency Data: High Frequency Data: Example of an Order Example of an Order

BookBookPricePrice VolumeVolume OrdersOrders

Seller 4Seller 4 3.863.86 2,0002,000 11

Seller 3Seller 3 3.853.85 10,00010,000 55

Seller 2Seller 2 3.843.84 5,0005,000 11

Seller 1Seller 1 3.833.83 1,0001,000 11

Buyer 1Buyer 1 3.823.82 6,0006,000 33

Buyer 2Buyer 2 3.813.81 8,0008,000 33

Buyer 3Buyer 3 3.803.80 5,0005,000 11

Buyer 4Buyer 4 3.793.79 17,00017,000 3319 April 2023

Page 23: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

Different investors react Different investors react differently to the same piece of differently to the same piece of

informationinformation

The length of the coast line (profit opportunities) depends on how you measure itThe length of the coast line (profit opportunities) depends on how you measure it A trader that reacts monthly (A trader that reacts monthly (redred line) has higher potential for profit than one who line) has higher potential for profit than one who

reacts quarterly (reacts quarterly (yellowyellow line) line) Even with perfect foresight, one may be Even with perfect foresight, one may be buyingbuying when the other is when the other is sellingselling (April) (April)

19 April 2023

Jan Apr OctJul JanTime

Price

Page 24: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

Price DistributionPrice Distribution

19 April 2023

Page 25: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

Definitions of directional Definitions of directional changeschanges

19 April 2023

Page 26: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

Striking observationStriking observation

When a directional change of r% occurs, it When a directional change of r% occurs, it is followed by an overshoot of r%is followed by an overshoot of r%

Observing the power lawObserving the power law The time for the overshoot to happen is also The time for the overshoot to happen is also

highly correlated to the time taken for the highly correlated to the time taken for the change of direction to happen!change of direction to happen!

Further observation and analysis neededFurther observation and analysis needed

19 April 2023

Page 27: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

Length of coastline Length of coastline

19 April 2023

Ma

xim

um

pro

fit o

ppo

rtun

ity a

fter

tra

nsa

ctio

n c

ost

s w

ith n

o le

vera

ge

a

nd p

erfe

ct fo

resi

gh

tLong coast line (>2,000%) means huge opportunities to be exploited!

Page 28: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

Observation from OANDAObservation from OANDA Plotting Plotting Long/ShortLong/Short against against Win/LostWin/Lost positions positions

On EUR/USD on 31On EUR/USD on 31stst March 2008 March 2008 There are more losers than winnersThere are more losers than winners There are more short than long positions There are more short than long positions

Rich information to be analysed (PhD projects)Rich information to be analysed (PhD projects)

19 April 2023

Those who bought Euro with USD at prices higher than current price (i.e. in potential loss)

Gre

en: i

n pr

ofit

Blu

e: in

loss

Those who short Euros for USD at prices higher than current price (i.e. with unrealized profit)

Long

Sho

rtCurrent price

Page 29: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

Market AnalysisMarket Analysis

You can play Forex game at OANDAYou can play Forex game at OANDA

<Rich information available in <Rich information available in www.fxtrade.com>www.fxtrade.com>

19 April 2023

Page 30: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

Vernon SmithVernon Smith

Nobel Prize in Economics 2002Nobel Prize in Economics 2002 Experimental EconomicsExperimental Economics

““for having established for having established laboratory experiments as a laboratory experiments as a tool in empirical economic tool in empirical economic analysis, especially in the study analysis, especially in the study of alternative market of alternative market mechanisms”mechanisms”

George Mason University, USAGeorge Mason University, USA19 April 2023

Page 31: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

Summary: Agent-based Artificial Summary: Agent-based Artificial MarketsMarkets

Strategies evolvedStrategies evolved Payments market Bargaining

Wind-tunnel TestingWind-tunnel Testing British Telecom Road usage market

19 April 2023

Nash Equilibrium Red Queens effect Red Queens effect

studiedstudied

Reproduced Reproduced stylized facts in stylized facts in CHASM

Rationality challengedchallenged

Fund

amen

tal

App

licat

ions

Agents Markets

Page 32: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

Micro behaviour analysisMicro behaviour analysis

Approach:Approach: Modelling trading agentsModelling trading agents Consequences analysis on big offers/bidsConsequences analysis on big offers/bids Finding patterns, such as scaling lawsFinding patterns, such as scaling laws

Hope to explain market behaviour that Hope to explain market behaviour that conventional economics failed to explainconventional economics failed to explain No perfect rationalityNo perfect rationality No homogeneous behaviour by traders No homogeneous behaviour by traders

An exciting way forwardAn exciting way forward

19 April 2023

Page 33: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

Efficient Market HypothesisEfficient Market Hypothesis

Financial assets (e.g. shares) pricing: Financial assets (e.g. shares) pricing: All available information is fully reflected in All available information is fully reflected in

current pricescurrent prices If EMH holds, forecasting is impossibleIf EMH holds, forecasting is impossible

Random walk hypothesis Assumptions: Assumptions:

Efficient markets (one can buy/sell quickly)Efficient markets (one can buy/sell quickly) Perfect information flowPerfect information flow Rational tradersRational traders

19 April 2023

Page 34: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

Does the EMH Hold?Does the EMH Hold?

It holds for the long termIt holds for the long term But “But “Fat Tail Fat Tail ” was observation: ” was observation:

big changes today often followed by big big changes today often followed by big changes (either up or down) tomorrowchanges (either up or down) tomorrow

How fast can one adjust asset prices given How fast can one adjust asset prices given a new piece of information?a new piece of information? Faster machines certainly helpFaster machines certainly help So should faster algorithms (So should faster algorithms (CIDER Theory))

19 April 2023

Page 35: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

CIDER: Computational CIDER: Computational Intelligence Determines Intelligence Determines Effective Rationality (1)Effective Rationality (1)

You have a product to You have a product to sell. sell.

One customer offers £10One customer offers £10 Another offers £20Another offers £20 Who should you sell to?Who should you sell to?

Obvious choice for a Obvious choice for a rational sellerrational seller

19 April 2023

Page 36: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

CIDER: Computational CIDER: Computational Intelligence Determines Intelligence Determines Effective Rationality (2)Effective Rationality (2)

You are offered two choices: You are offered two choices: to pay £100 now, or to pay £100 now, or to pay £10 per month for 12 to pay £10 per month for 12

monthsmonths Given cost of capital, and Given cost of capital, and

basic mathematical trainingbasic mathematical training Not a difficult choiceNot a difficult choice

19 April 2023

Page 37: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

CIDER: Computational CIDER: Computational Intelligence Determines Intelligence Determines Effective Rationality (3)Effective Rationality (3)

Task:Task: You need to visit 50 You need to visit 50

customers. customers. You want to minimize You want to minimize

travelling cost.travelling cost. Customers have Customers have

different time different time availability.availability.

In what order In what order should you visit should you visit them? them?

19 April 2023

This is a very hard problem

Some could make wiser decisions than others

Page 38: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

The CIDER TheoryThe CIDER Theory Rationality involves Computation Computation has limits Herbert Simon: : Bounded Rationality Rubinstein: model bounded rationality by explicitly Rubinstein: model bounded rationality by explicitly

specifying decision making proceduresspecifying decision making procedures Decision procedures involves algorithms + Decision procedures involves algorithms +

heuristicsheuristics Computational intelligence determines effective Computational intelligence determines effective

rationalityrationality Where do decision procedures come from? Where do decision procedures come from?

Designed? Evolved?Designed? Evolved?

19 April 2023

Page 39: Market Science: How markets could be studied as a hard science Edward Tsang CCFEA University of Essex ColchesterColchester, UK Colchester 21 August 2015

Top Down vs Bottom Up ApproachesTop Down vs Bottom Up Approaches

Top Down: write down general rules, and Top Down: write down general rules, and use them to deduce market behaviouruse them to deduce market behaviour Classical economicsClassical economics Agent-based approachAgent-based approach

Bottom Up: observe detailed changes, and Bottom Up: observe detailed changes, and use them to induce general rulesuse them to induce general rules Technical analysisTechnical analysis Market scienceMarket science

19 April 2023