Autonomous Agents in Financial Markets: Implications and Risks

6/15/16
AutonomousAgentsinFinancial
Markets:ImplicationsandRisks
MICHAELP.WELLMAN
ColloquiumonRobustandBeneficialAI
15June2016
WhyFinance?
• Criticalsectorofeconomy
• Potentiallyfragile,drivenbyinformation(beliefs, expectations),
complexinterdependencies
• AlreadyhighlyinfiltratedbyAI
• Tradinginfinancialmarkets
• Creditdecisionmaking
1
6/15/16
Trader
2
6/15/16
AlgorithmicTrading
Byanymeasure,accountsformajorfractionofactivityonfinancial
markets
Howdoes itwork?
•
•
Specificmethodsandpracticeshighlysecretive
Generalingredientsreadilyapparent
•
•
•
•
•
•
Fastcomputingandcommunication
Real-timedataanalysis,riskmanagement
Cleverstrategies,detailedunderstanding ofmicrostructure
AI&machinelearning
WhatisSpecialaboutAlgorithms?
1. SpeedandPrecision
• Responsefarfasterthanhumanreactiontimes
• Canimplementcomplexstrategiesinvolvingcoordinatedactionsacrossmany
markets
• Enableslatencyarbitrage,“anticipatory”strategies,novelmanipulations
2. Autonomy
• Appliesprogrammedandlearnedmodelstopotentiallyunanticipated
circumstances
3. Scalability
• Replicatemethodsacrosssecurities,exchanges…worldwide
3
6/15/16
LatencyArmsRace:SourceofInstability?
Dedicated
communication
lines
Direct
exchange
feeds
Co-location
Specialized
hardware/software
• NYCtradersplits
order formultiple
exchanges
• Firstorderarrivesat
BATSexchangein
Weehawken
• HFTs seeorderand
racetoMahwah
(NYSE)andCarteret
(Nasdaq)
• ~200µs
Lincolntunnel
4
6/15/16
One-SecondCallMarkets
• Latencyarmsraceanartifactof
continuous-time marketoperation
• nolowerbound onadifferencein
speedthatcouldmatter
• Callmarket
• Tradeperiodicallyratherthan
continuously
• Ordersreceivedwithinintervalhidden
• Potentialefficiencyandstability
advantages
Wellman blogentryJuly2009
FlashCrash:6May2010
Whydidthis
happen?
Whydidthis
happen?
5
6/15/16
UltrafastExtremeEvents
• Johnsonetal.,
“Abruptriseof
newmachine
ecologybeyond
humanresponse
time”,Scientific
Reports2013
• Documented
18,520UEEsin5yr
period
• Authorsargue:
Must beartifactof
dynamic
interactingagents
6
6/15/16
AlternateExplanation:ISOs
• Intermarket SweepOrder(ISO)
• Specialordertype, allowsoverrideofNBBO-basedrouting
Golub,Keane,&Poone,2012
StrategicAgent-BasedAnalysis
• Model-based studies ofeffects
ofalgorithmictrading
• Challenge:sensitiveto
specification ofagentbehavior
• Empiricalgame-theoretic
analysis
• Combinesagent-basedsimulation
withgame-theoreticreasoning
• Exploreaspaceofheuristic
strategies,usingstrategicstability
forselection
Studies
• Latencyarbitrage(EC-13)
• Marketmaking(AAMAS-15)
• Marketchoicebyfastandslow
traders(AMMA-15)
• Strategicshading(AGTw-16)
• Marketmanipulation (in
progress)
7
6/15/16
IllustrativeEGTAResults:
EffectsofMMCompetition(N =25)
A1
A4
A12
B1
B12
C1
C12
-3000
2MMvs1MM
-2000
-1000
0
1000
background-trader surplus
2000
3000
welfare
ARB-BOT:AGeneralFrameworkforAITraders
• Arbitrage:
• takingadvantageofpricedifferencesacrossmarkets
forthesameasset
• Simple arbitrageagent:
• monitormultiplemarketsforpricediscrepancies,
thenexecute
}
Issues
Transaction costs
} Transport/storage
costs
} Executionrisk
} Whatismeant by
“same” asset?
M
}
M
M
M
M
M
M
8
6/15/16
ARB-BOT EarlyWarningSystem
• Developpublic(non-trading) Arb-BotsasanalerttowhattheAIs
mightbefinding
• Searchapproaches
• Reasoningfromsecuritydescriptions
• Automateddiscoveryby machinelearning
LevelsofARB-BOT Behavior
1. Passivesearchforarbitrageopportunities
2. Attemptstoamplifyarb opps through
purposeful instigationofmarketmovements
(e.g.,spoofing)
3. Attemptstocreatenewarb opps
•
•
newfinancialinstruments
deliberatefragmenting
4. Malicious subversion ofmarkets
mostaggressive
9
6/15/16
Level2:MarketManipulation
• SECDefinition:Intentionalconductdesignedtodeceiveinvestorsby
controllingorartificiallyaffectingthemarketforasecurity
• Spoofing
• Dodd-Frank defn:biddingorofferingwiththeintenttocancelthebidor offer
beforeexecution
• Widelyknownstrategies,severalrecentprosecutions
Example:DynamicLayering
APPENDIX 1
Lots buy/sell
400
Example of Mr Coscia's Pattern of Trading (00:00:00.000 to 00:00:00.609)
Price
115.900
Buy orders cancelled after
sell order traded
115.890
300
Sell order for 17 lots
traded @ 115.88
115.880
200
115.870
Buy order for 17 lots
traded @ 115.86
100
0
-20
115.860
115.850
0
80 Time (milliseconds) 180
280
380
480
580
115.840
-100
Sell orders cancelled
after buy order traded
115.830
-200
115.820
-300
115.810
Cumulative Buy Orders
Cumulative Sell Orders
LEG ONE
Source:UKFinancialConductAuthority
Time Interval
Time
Order Buy/Sell
(milliseconds)
00:00:00.000
0
Buy
00:00:00.023
23
Sell
00:00:00.122
99
Sell
00:00:00.231
109
Sell
00:00:00.232
1
Buy Order Traded
00:00:00.234
2
Buy Order Traded
00:00:00.257
23
Sell Order Cancelled
00:00:00.261
4
Sell Order Cancelled
00:00:00.265
4
Sell Order Cancelled
Mid Price
Order Volume Best
Best
Mid
Price
(lots)
Bid
Offer
Price
115.86
17
115.86 115.88 115.87
115.89
122 115.87 115.88 115.875
115.88
85
115.86 115.88 115.87
115.87
54
115.86 115.88 115.87
115.86
3
115.86
14
115.89
122 115.84 115.86 115.85
115.88
85
115.84 115.86 115.85
115.87
54
115.84 115.86 115.85
Trade Price
Mr Coscia Sell Order Price
Mr Coscia Buy Order Price
LEG TWO
Time Interval
Order Buy/Sell
Time
(milliseconds)
00:00:00.294
29
Sell
00:00:00.316
22
Buy
00:00:00.423
107
Buy
00:00:00.550
127
Buy
00:00:00.579
29
Sell Order Traded
00:00:00.593
14
Buy Order Cancelled
00:00:00.607
14
Buy Order Cancelled
00:00:00.609
2
Buy Order Cancelled
Order
Price
115.88
115.82
115.83
115.86
115.88
115.86
115.83
115.82
Volume
(lots)
17
99
88
122
17
122
88
99
Best
Bid
115.84
115.84
115.84
115.85
Best
Mid
Offer
Price
115.86 115.85
115.86 115.85
115.86 115.85
115.88 115.865
115.87 115.90 115.885
115.87 115.90 115.885
115.87 115.90 115.885
10
6/15/16
Spoofable Agents
(a)PureGDV_2
(b)Pure GDV_1
Aspoofingagentcanexploittheheuristic-basedlearningstrategyandmanipulatethe
marketprice.
SpoofingEquilibriumStrategies
(a)Equilibrium 1
(b)Equilibrium 2
11
6/15/16
Manipulation:CurrentQuestions
• Canweautomaticallylearnmanipulation strategies?
• Canwereliablydetectmanipulation inmarketdata?
• Canwebuildspoof-proof tradingagents?
LevelsofARB-BOT Behavior
1. Passivesearchforarbitrageopportunities
2. Attemptstoamplifyarb opps through
purposeful instigationofmarketmovements
(e.g.,spoofing)
3. Attemptstocreatenewarb opps
•
•
newfinancialinstruments
deliberatefragmenting
4. Malicious subversion ofmarkets
mostaggressive
12
6/15/16
Level4
FinanceandDesignforBeneficialAI
• Aconsequential domain attheleadingedgeofAIautomation
• Qualitativelynewphenomena, interactionatsuperhuman timescales
• Richtechnical(AI+Econ)andSocial(Law+Policy)challenges
13