Market Microstructure And Algorithmic Trading

7m ago
7.62 MB
59 Pages
Last View : 25d ago
Last Download : 3m ago
Upload by : Genevieve Webb

Market MicrostructureandAlgorithmic TradingPIMS Summer School 2016University of Alberta, EdmontonLecture 2: July 4, 2016Robert Almgren

ExchangesDecide trading rules:Trading hoursMatch algorithmImplied quotingTrading halts / circuit breakersTick sizeexchange decisioneffect on trading: reversionvolatility measurementEdmonton mini-course, July 20162

Trading hours (CME futures)Live CattleCornZCZSWheatZWLEAgsSoybeanCrude OilCLHORBOB Gasoline PhysicalRBE-mini S&P 500ESE-mini NASDAQ 100NQE-mini Dow ( 5)YMAustralian Dollar6ABritish Pound6BCanadian Dollar6CEuro FX6EJapanese Yen6JEurodollarGEUltra U.S. Treasury BondUBU.S. Treasury BondZB5 Yr NoteZF10 Yr NoteZN2 Yr NoteZTGoldGCCopperHGSilverSI4 PMNY Harbor ULSD5 urs relative to midnight, Chicago timeEdmonton mini-course, July 20163

Trading hoursTrading through a crop reportEdmonton mini-course, July 20164

CGBU5: 10-year Canadian note 40.45140.40Bank of Canada Announcement140.35140.30140.25140.20200 lots09:5509:5609:5709:5809:5910:00FOR IMMEDIATE RELEASE15 July 2015CONTACT: Media Relations613 782-8782Bank of Canada lowers overnight rate target to 1/2 per centOTTAWA – The Bank of Canada today announced that it is lowering its target for the overnightrate by one-quarter of one percentage point to 1/2 per cent. The Bank Rate is correspondingly3/4 per cent and the deposit rate is 1/4 per cent.Total CPI inflation in Canada has been around 1 per cent in recent months, reflecting year-overyear price declines for consumer energy products. Core inflation has been close to 2 per cent, withdisinflationary pressures from economic slack being offset by transitory effects of the pastdepreciation of the Canadian dollar and some sector-specific factors. Setting aside these transitoryeffects, the Bank judges that the underlying trend in inflation is about 1.5 to 1.7 per cent.Global growth faltered in early 2015, principally in the United States and China. Recentindicators suggest a rebound in the U.S. economy in the second half of this year, and growth isexpected to be solid through the projection. In contrast, China is slowing amid an ongoing process ofrebalancing to a more sustainable growth path. This has pulled down prices of certain commoditiesthat are important to Canada’s exports. Financial conditions in major economies remain veryaccommodative and continue to provide much-needed support to economic activity. Global growthis expected to strengthen over the second half of 2015, averaging about 3 per cent for the year, andaccelerate to around 3 1/2 per cent in 2016 and 2017.10:0110:0210:0310:0410:05The Bank’s estimate of growth in Canada in 2015 has been marked down considerably from itsApril projection. The downward revision reflects further downgrades of business investment plansin the energy sector, as well as weaker-than-expected exports of non-energy commodities and noncommodities. Real GDP is now projected to have contracted modestly in the first half of the year,resulting in higher excess capacity and additional downward pressure on inflation.EDT on Wed 15 Jul 2015Edmonton mini-course, July 2016The Bank expects growth to resume in the third quarter and begin to exceed potential again in the5

Matching algorithmsHow market orders are matched to limitAlgorithm fixed by exchangeto attract more volumeto attract correct mix of participantsetcEdmonton mini-course, July 20166

First-in first-out (FIFO) orderIncoming market sell orderEarliest limit orderfilled completely firstRemaining quantityin time orderBest bid price123Resting limit buy ordersof different sizes4567Time of order submissionEdmonton mini-course, July 20167

Pro rata order matchingIncoming market sell orderBest bid price1234567Incoming volume dividedamong all resting ordersat best priceEdmonton mini-course, July 20168

Match algorithm9 different ways to matchmarket and limit orders,on CME ICSANDBOX/Matching AlgorithmsEdmonton mini-course, July 2016"The FIFO algorithm uses priceand time as the only criteria forfilling an order. In this algorithm,all orders at the same price levelare filled according to timepriority; the first order at a pricelevel is the first order matched."9

CME Eurodollar matching1. Orders placed during the “pre-opening” or at the indicative opening price (IOP) will be matched ona price and time priority basis. Note that implied orders are not taken into consideration, asthey are only active during the continuous trading session.2. Priority is assigned to an order that betters the market, i.e. a new buy order at 36 betters a 35 bid.Only one order per side of the market (buy side and sell side) can have this TOP order priority.There will be situations where a TOP order doesn’t exist for one or both sides of the market (forexample, an order betters the market, but is then canceled). There will never be a situation thatresults in two orders on the same side of the market having TOP order status.3. Only outright orders can be TOP orders, however the TOP orders of underlying orders that arecreating implied orders will be taken into consideration during the matching process so as not toviolate the TOP order rule in any market.4. TOP orders are matched first, regardless of size.5. After a TOP order is filled, Pro Rata Allocation is applied to the remainder of the resting orders atthe applicable price levels until the incoming order is filled.6. The Pro Rata algorithm allocates fills based upon each resting order’s percentage representationof total volume at a given price level. For example, an order that makes up 30% of the totalvolume resting at a price will receive approximately 30% of all executions that occur at that price.Approximate fill percentages may occur because allocated decimal quantities are always roundeddown (i.e. a 10-lot order that receives an allocation of 7.89- lots will be rounded down to 7-lots).7. The Pro Rata algorithm will only allocate to resting orders that will receive 2 or more contracts.8. After percentage allocation, all remaining contracts not previously allocated due to roundingconsiderations are allocated to the remaining orders on a FIFO basis.!Outright orders will have priority over implied orders and will be allocated the remainingquantity according to their timestamps.!Implied orders will be then allocated by maturity, with the earliest expiration receiving the allocationbefore the later expiring contracts. If spread contracts have the same expiration (i.e., CONTRACT ACONTRACT B and CONTRACT A-CONTRACT C), then the quantity will be allocated to the earliestmaturing contracts making up that spread (i.e., the CONTRACT A-CONTRACT B will get the allocationbefore the CONTRACT A-CONTRACT C because the CONTRACT B expires before the CONTRACTC).Edmonton mini-course,Example: JulyPro 2016Rata Allocation Matching10

Reasons for pro rata matchingReasons for pro rata matching:Historical tradition from pit tradingEncourage submission of large limit ordersAllow late entrants to participateCharacteristic of interest rate futuresmarketsEurodollar, Euribor, Treasury calendar spreadsShort sterling“Arms race” to oversize limit orderslimited only by risk of overfilling(Jonathan Field & Jeremy Large 2008)Edmonton mini-course, July 201611

Advantage ro-rata-an-accident-waiting-to-happen/Edmonton mini-course, July 201612

g algorithmvolumeucts, LIFFELIFFE takesfj (Vpro rata (post-2007)Pj1)k(VPj )k.VkPj volume preceding order jg is obtained for k 1, and FIFO in the limit k ! 1.AlmgrenEugeneKrelMaysets31, 20132k 1: andprorata two.polate RobertbetweentheLIFFEk Treasury2 for Euribor,2-year& some Treasury calendar spreadsk : time priorityd Euroswiss (effective May 29,2013, [LIFFE, 2013]).1LIFFECME4qd this algorithm, note that by the Mean Value Theorempqk 4 (Short Sterling)2qfjk 2 (Euribor)q00Edmonton mini-course, July 2016Vj g(xj )Vk 1 (pro rata)100(1 p) qMarket order size as fraction of resting limit orders1Figure 1: Mixed allocation algorithms, for small market order sizes; q denotes the13

Tick s/releasedetail.cfm?ReleaseID 393362Edmonton mini-course, July 201614

Over the past several years, the Bourse has received repeated requests from end‐userparticipants (such as pension funds, central banks, hedge funds, treasuries and dealers) toextend the minimum price fluctuation of a half tick to at least the six nearest listed contractmonths, including serials. Domestic and international clients have echoed those sentiments.0.200The Bourse has conducted extensive consultations with market participants to gauge theirinterestin pasta halfseveraltick minimumpriceBoursefluctuation.The participants’aroundOver theyears, thehas receivedrepeatedfeedbackrequestscenteredfrom end‐userthreeprincipalbenefitsto the marketare summarizedas follows.participants(suchas pensionfunds,thatcentralbanks, hedgefunds, treasuries and dealers) toMODIFICATIONSTOTHECONTRACTSPECIFICATIONSFORTHE listed contractextend the minimum price fluctuation of a half tick to at least the ilyonACCEPTANCEanBack-officeexpectedreductionin thesentiments.cost of ing– InterestRateDerivatives- ionalclientshaveechoed chnologyFull ticks Back-officewere deemedtoo costly to hedge given theRegulationcurrent low volatility environment. Tighter– inessgiventhatcompetingproductshave muchtighter bid‐askspreadsThe Bourse has conducted extensive consultations with marketparticipantsto oductsinterest in a half tick minimum price fluctuation. The participants’ feedback centered around19, 2014I. to tenOVERVIEWupyears.benefitsThe BAX,shouldbearethesummarizedmost liquid market,offersMarcha spreadtwo to threethreeprincipalto whichthe marketthatas follows.times wider than the offer in the dealer community. Participants also noted that the Ten‐YearREQUESTFOR COMMENTSBoursethede MontréalInc.Bond(theBourse)proposesto amendthe minimumFirstly,feedbackreceivedfocusedprimarilyon an hasexpectedin thepricecostfluctuationof trading.Governmentof CanadaFutures hereby(CGB) contractmuch nBankers’AcceptanceFull ticksweredeemedtootherebycostly toreducinghedge giventhe currentlow volatilityTighterwithtradingthanthe BAX,theincentiveto participatein environment.the BAXmarket.TheOverthe(BAX),past severalyears,the Boursepricehas fluctuationreceived d‐askspreadsbid‐askspreadwas asalsopensiondeemedoutCONTRACTofcentralpace MODIFICATIONSTO tmonthsbereducedfrom0.01per KERS’CONTRACTextendthe 100minimum CANADIANpricefluctuationof a ACCEPTANCEhalf tick to at FUTURESleast the sixnearest listed contract0.005pervalue(a halftick).upto tenyears. nominalTheBAX,whichshouldbeoverthe mostliquid market,offers a nthecounter(OTC)product,if a internationalhaveechoedthose sentiments.inthe widermarketas thecostofinhedgingpositionwill clientsbelowerandspeculatorswillthehavea end‐userII. oftheANALYSISpoolclientstrade essentialthe healthof contracthas toBAX,and it isthancrucialtoBAX,ensurethat reducingeach groupup toa sustainableproportionof the overallwith tradingthetherebythemakesincentiveparticipatein ractDescriptionand deemedAnalysis outof gstparticipants.It ofisandexpectedthathalftickswouldbringin newparticipants,Theand approvedthreeRulesprincipalbenefitstoDomesticthe BAX.Finally,itwasstatedthat theamendmentsto thefromminimumprice fluctuation(tick size)onmulti‐currencythe contract specificationsfor esthealthy hedgingfuturesmarketneedsAcceptanceanotstableof ldbe anmixovercounter(OTC)andif thatis wasestablishedat0.01per 100nominalvalue(afulltick).wrong costmodelis ourthquarterlyBAX contractmonthsbe reduced0.01growthInhasgrowthin forBAXvolumesbeenfavourable;howevera largeportionfromof o 0.005per have 100 fornominalper 100nominalvalue(aBoursefull tick),to 0.005theper 100 sewhereaBAXmuchlowerthreeprincipalbenefitsto .Whilethe hemarketdominatedCommentson lowingdateofproductsthantheandBAX.Furthermore,it amongstparticipants.isAprilexpectedthatticks wouldbringinto:new blicationofthis notice,at ffersa spreadtwoto arket.deflecting pricethemfluctuation,from OTC markets.Multi‐productand multi‐currencystrategy ngbeenrequestedbybuy‐sideisantimeswiderthanthe offerin thethedealercommunity.Participantsalso notedthat ofthechangingcompetitiveewho are methodactive elsewhere,typicallyavoidtheBAX dueto theperceived high cost. Many of theseM PaulineAscoliefficientof preadsIn 2002,thebehindthe futuresratherthanhaveCanadianSTIR X.Furthermore,is possibletothatget liquiditymarketstighterthanaelsewherebasis auseotheralternatives,and participantsthat ithalfticksarenecessarydynamicsof amarketmuchlowerExtendingthe heythealsostated that,givenwouldthe volatilityinwiththethefrontend, the ofbid‐askspread, use owever,cash andtheexecutionprotocols,is 1A9littleincentiveto lhedgingbe ofoffsetby novertheFacilitycounter(OTC)product,andthatis mail:[email protected] ersto therebyreducingincentiveparticipatethe tethrougha ouslyget filledofEnd‐userunwillingto pay a full tickalwaysfor a ,thatavailableelsewhere.precision.theyto tsviewthe BAXParticipantsa pricingsourceotherturnalternatives,andthathalf fitof alsoa ctuationBAX.Finally,itfinancierswasthat olatilityinthefrontend,thebid‐askspread,theor a trading

Market Microstructure and Algorithmic Trading PIMS Summer School 2016 University of Alberta, Edmonton Lecture 2: July 4, 2016. Edmonton mini-course, July 2016 Exchanges Decide trading rules: Trading hours Match alg