Economic Crisis: Technology is the answer Edward Tsang Centre For Computational Finance and...
-
Upload
marcus-jenkins -
Category
Documents
-
view
216 -
download
0
Transcript of Economic Crisis: Technology is the answer Edward Tsang Centre For Computational Finance and...
Economic Crisis: Technology is the answer
Edward TsangCentre For Computational Finance and Economics
University of EssexIEEE Technical Committee on Finance and Economics
Motivation
• Technology has changed every aspect of our lives
• Why not economics!?• Do we understand the
economy?• Very little! Hence the
trouble.• Unique opportunities
for computing
Market as hard science: Observe micro-behaviour Discover regularities
Agent-based studies: Simulate markets Look for stylised facts
Artificial Market
EDDIEEDDIEIntelligence
EDDIEEDDIEFundamental
EDDIEEDDIENoise
Technical Analysis: Discover regularities by analysing past series
Studying Financial MarketsClassical economics: Mathematical analysis Cal. fundamental values E(Ri) = Rf + βim(E(Rm) - Rf) βim = Cov(Ri, Rm) / Var(Rm)
A Wiki approach?
Assume rationality
Automated trading is future
Classical Economics
• To model economy and prices mathematically• Classic: Capital Asset Pricing Model (CAPM)
E(Ri) = Rf + βim(E(Rm) - Rf)
where βim = Cov(Ri, Rm) / Var(Rm)– E(Ri) is the expected return on the capital asset – Rf is the risk-free rate of interest – βim is the sensitivity of the asset to market returns– E(Rm) is the expected return of the market
• Built on important assumptions– e.g. perfect rationality, market efficiency, homogeneity
19 April 2023 All Rights Reserved, Edward Tsang
CIDER: Computational Intelligence Determines Effective Rationality (1)
• You have a product to sell. • One customer offers £10• Another offers £20• Who should you sell to?
• Obvious choice for a rational seller
19 April 2023 All Rights Reserved, Edward Tsang
CIDER: Computational Intelligence Determines Effective Rationality (2)
• You are offered two choices: – to pay £100 now, or – to pay £10 per month for 12
months
• Given cost of capital, and basic mathematical training
• Not a difficult choice
…
19 April 2023 All Rights Reserved, Edward Tsang
CIDER: Computational Intelligence Determines Effective Rationality (3)• Task:
– You need to visit 50 customers.
– You want to minimize travelling cost.
– Customers have different time availability.
• In what order should you visit them?
This is a very hard problem Some could make wiser
decisions than others
19 April 2023 All Rights Reserved, Edward Tsang
What is Rationality?• Are we all logical?
• What if Computation is involved?
• If we know P is true and P Q, then we know Q is true
• We know all the rules in Chess, but not the optimal moves
• “Rationality” depends on computation power!– Think faster “more rational”
Technical Analysis (Chartists)
Attempt to find patterns in the chart in order to predict future movements
Refer to EDDIE for forecastingEDDIE uses Genetic Programming, a branch of
computational evolution
19 April 2023 All Rights Reserved, Edward Tsang
Computer vs Human Traders
• Programs work day and night, humans can’t• Programs react in miliseconds, humans can’t• Programs can be fully audited, humans can’t• When programs make mistakes, one can learn
and change the culprit codes– Failed human traders simply change jobs
• Expertise in computer programs accumulates– Human traders leave with his/her experience
Not to mention costs, emotion, hidden agenda, etc.
Automated Trading is Future
• Traders have to programOr work with programmers
• Traders provide strategies
• Programmers produce programs
• Programs trade– Markets are 24 hours– Already true for foreign exchange– No reason for markets to pause in weekends
19 April 2023 All Rights Reserved, Edward Tsang
FAQ in Automated Trading• Is the market predictable?
– It doesn’t have to be: just code your own expertise– Market is not efficient anyway, herding has patterns
• How can you predict exceptional events?– No, we can’t – Neither can human traders
• How can you be sure that your program works?– No, we can’t– Neither were we sure about Nick Leeson at Barrings– Codes are more auditable than humans– If you can improve your odds from 50-50 to 60-40 in your
favour, you should be happy
19 April 2023 All Rights Reserved, Edward Tsang
Agent-based Market Studies
5 Modify agent models according to discrepancies
Artificial Market
Agent 1
Agent 2
Agent n
2. Simulate their interaction
3. Observe their results
1. Try to model the agents
exogenousendogenous
4. Compare results with real markets
“All models are wrong, some models are useful”
“More calculation is better than less, Some calculation is better than none”
The Hard Science of Markets (Richard Olsen)
• How is biology studied?– E.g. one observes the growth of plants– Measure certain chemical contents– Write down regularities– Generalize regularities if possible
• Markets are results of micro-behaviour– Technical analysis only studies the results
(prices)– Much deeper knowledge can be observed
from studying micro-behaviour …
Richard OlsenForex
OANDA
Agent-based Market Studies
• If I can model every investor, I can predict the market
• But I can’t accurately model investors• However, I know exactly what orders were placed • I know what happened after each order was placed
– Whether it was transacted– Its immediate impact to prices– Price movements afterwards
• Can’t we learn anything from these?– By recording details and looking for regularities– As we do in biology
High Frequency Data: Example of an Order Book
Price Volume Orders
Seller 4 3.86 2,000 1
Seller 3 3.85 10,000 5
Seller 2 3.84 5,000 1
Seller 1 3.83 1,000 1
Buyer 1 3.82 6,000 3
Buyer 2 3.81 8,000 3
Buyer 3 3.80 5,000 1
Buyer 4 3.79 17,000 3
Theory of fractals
Financial markets are fractal:statistical properties are self
similar.
Different investors react differently to the same piece of information
• The length of the coast line (profit opportunities) depends on how you measure it• A trader that reacts monthly (red line) has higher potential for profit than one who
reacts quarterly (blue line)• Even with perfect foresight, one may be buying when the other is selling (April)
Jan Apr OctJul JanTime
Price
Definitions of directional changes
Directional Changes (DC)
• A Directional Change Event can be a– Downturn Event or an – Upturn Event.
• A Downward Run is a period between a Downturn Event and the next Upturn Event.
• An Upward Run is a period between an Upturn Event and the next Downturn Event.
DC Definition (2)• In a Downward Run, a Last Low is constantly
updated to the minimum of – (a) the current price and – (b) the Last Low.
• In an Upward Run, a Last High is constantly updated to the maximum of – (a) the current price and – (b) the Last High.
DC Definition (3)
• In a Downward Run, given a Threshold (%), an Upturn Event is an event when the price is higher than the Last Low by the Threshold.
• An Upturn Event terminates a Downward Run, and starts an Upward Run.
• In an Upward Run, given a Threshold, a Downturn Event is an event when the price is lower than the Last High by the Threshold.
• A Downturn Event terminates an Upward Run, and starts an Downward Run.
DC Definition (4)
• A Directional Changes Sequence (DC Sequence) is a sequence:
(Start_date, Start_price, Return, Period, Return, Period, ...)
• The above definitions are mutual recursive.
• Operationally, we set the Last High and the Last Low to the Start_price at the beginning of the sequence.
Length of coastline M
axi
mu
m p
rofit
opp
ort
unity
afte
r tr
ans
act
ion
co
sts
with
no
leve
rag
e
and
per
fect
fore
sig
ht
Long coast line (>2,000%) means huge opportunities to be exploited!
Striking observation
• 17 scaling laws discovered so far, e.g.– When a directional change of r% occurs, it is
followed by an overshoot of r%– The time for the overshoot to happen is also
highly correlated to the time taken for the change of direction to happen!
• Further observation and analysis needed
• Machine learning needed for function fitting
Significance of HFF Average daily turnover : about US$3.98
trillion [1] 2008 World GDP [2]:
World US$60.69 trillion1. US US$14.26 trillion2. Japan US$ 4.92 trillion3. China US$ 4.40 trillion4. Germany US$ 3.67 trillion5. France US$ 2.87 trillion
[1] 2009 estimation based on Bank for International Settlements, 2007[2] International Monetary Fund, 2008
• Plotting Long/Short against Win/Lost positions
• USD/JPY on 4th July 2009– There are more losers than winners– There are more short than long positions
• Rich information to be analysed (PhD projects)
Observation from OANDA
Those who bought USD with JPY at prices higher than current price (i.e. in potential loss)
Gre
en: i
n pr
ofit
Blu
e: in
loss
Those who short USD for JPY at prices higher than current price (i.e. with unrealized profit)
Long
Sho
rtCurrent price
Micro behaviour analysis
• Approach:– Modelling trading agents– Consequences analysis on big offers/bids– Finding patterns, such as scaling laws
• Hope to explain market behaviour that conventional economics failed to explain– No perfect rationality– No homogeneous behaviour by traders
• An exciting way forward
Proposal
• Indonesian tsunami 2004 led to construction of early warning systems
• Economic turmoil demands the same!• Banking sector lost in the crisis over
US$1,000bn (779bn Euro, £702bn, 6,529bn KON)
• Investing 2%, or US$2bn is not too much– Richard Olsen, OANDA and CCFEA
– Clive Cookson, Financial Times
Comptuer Science: new challenges
Routes: a programming environment for real time applications
High-frequency Finance Research Platform
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
Concluding Summary
• Classical economics build castles on sand• Technical analysis only scratches the surface• Agent-based help understand markets
– Repeatable, enabling scientific studies
• “Market science” looks into micro-behaviour– Chartists look at end results, why not look at causes!?– If chartists can make money, so can market scientists!– Exciting, uncharted area [demanding expertise!]
• Technology will play a big part in economics!
Reference
• Richard Olsen & Clive Cookson, How science can prevent the next bubble, FT.com, 12 February 2009
References
• Martinez-Jaramillo, S. & Tsang, E.P.K., An heterogeneous, endogenous and co-evolutionary GP-based financial market, IEEE Transactions on Evolutionary Computation, Vol.13, No.1, 2009, 33-55
• Tsang, E.P.K., Forecasting – where computational intelligence meets the stock market, Frontiers of Computer Science in China, Springer, Vol.3, No.1, March 2009, 53-63
• Tsang, E.P.K., Computational intelligence determines effective rationality, International Journal on Automation and Control, Vol.5, No.1, January 2008, 63-66
http://www.bracil.net/finance/papers.html