ebook img

HJB Equation and Statistical Arbitrage applied to High Frequency Trading PDF

59 Pages·2013·0.82 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview HJB Equation and Statistical Arbitrage applied to High Frequency Trading

HJBEQUATIONANDSTATISTICALARBITRAGEAPPLIEDTOHIGHFREQUENCY TRADING by YONGGIPARK M.S.UniversityofCentralOklahoma,2009 Athesissubmittedinpartialfulfilmentoftherequirements forthedegreeofMasterofScience intheDepartmentofMathematics intheCollegeofScience attheUniversityofCentralFlorida Orlando,Florida SummerTerm 2013 MajorProfessor:JiongminYong c 2013YonggiPark (cid:13) ii ABSTRACT In this thesis we investigate some properties of market making and statistical arbitrage applied to High Frequency Trading (HFT). Using the Hamilton-Jacobi-Bellman(HJB) model developed by Guilbaud, Fabien and Pham, Huyen in 2012, we studied how market making works to obtain optimalstrategyduringlimitorderandmarketorder. Alsowedevelopthebestinvestmentstrategy throughMovingAverage,ExponentialMovingAverage,RelativeStrengthIndex,SharpeRatio. iii ACKNOWLEDGMENTS Firstofall,IwanttoexpressmydeepestgratitudetomysupervisorDr. JiongminYongforhelping me out when I most need. He has been truly inspirational, has also been so generous in allowing metoexplorefreely,butatthesametime,alwayshelpedmetostayfocused! Thanks to Dr. Jason Swanson and Dr. Zhisheng Shuai for their guidence, dedication and support throughallmytimeatUCF. Thanks to Sunghyun Jo for his colaboration in the example of LOB section of this work and throughhiswebcontentsforhighfrequencytrading. ThankstoTianXiaoWangforhiscollaborationintheinterestingdiscussionswehaveonOptimal Control. ThankstoRomanKrylovforhiscollaborationinLatexlearning. iv TABLE OF CONTENTS LISTOFFIGURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii LISTOFTABLES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii CHAPTER1: INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Limitorder/Marketorder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Bid/askprice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Marketmaker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Themarketmaker’sspread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Midprice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Quotes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Marketmaking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 LatencyandLowlatency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Ultra-lowlatency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Shelflife . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 DirectMarketAccess(DMA) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 v Thecharacteristicsofhighfrequencytrading . . . . . . . . . . . . . . . . . . . . . . . . 6 ThefeaturesofHFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 LowLatency,Ultra-LowLatencyDirectMarketAccess(ULLDMA) . . . . 7 Multipleassetclassesandexchanges . . . . . . . . . . . . . . . . . . . . 8 LimitedshelflifeorShortholdingpositionperiod . . . . . . . . . . . . . 8 TheadvantagesofHFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Bid-askspread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Liquidity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Volatility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Increasedmarketefficiency . . . . . . . . . . . . . . . . . . . . . . . . . 10 Fee . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 CHAPTER2: INTRODUCTIONOFMARKETMAKING . . . . . . . . . . . . . . . . . 11 Featuresofmarketmakingstrategies . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Market-makingModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 LimitOrderstrategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Marketorderstrategies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 vi Optimalcontrolproblem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Dynamicprogrammingequation(DPE) . . . . . . . . . . . . . . . . . . . . . . . 24 CHAPTER3: STATISTICALARBITRAGE. . . . . . . . . . . . . . . . . . . . . . . . . 30 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Pairstrading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 MovingAverage(MA) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 ExponentialMovingAverage(EMA) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 RelativeStrengthIndex(RSI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 SharpeRatio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 CHAPTER4: CONCLUSION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 APPENDIX: CODEFORFIGURESOFCHAPTER3 . . . . . . . . . . . . . . . . . . 45 LISTOFREFERENCES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 vii CHAPTER 1: INTRODUCTION Let us begin with a classical stock trading scenario. Suppose, at time t , investor A wants to sell 0 one share of a given stock and investor B wants to buy one share of this stock at time t > t . 0 InvestorsAandBdonotmeetdirectly,andaperson,calledamarketmaker,labeledbyC,willbuy the stock from A at time t at price, say pb, called a bid price, and will sell it to investor B at price, say pa, called an ask price, with pa > pb. The difference pa pb > 0 is called the bid-ask spread. − Usuallytradersmightmakeseveraltradesperday,orperweek(evenpermonth). Nowadays, without the formal designation, any trading firms can play a role as market mak- ers by using (swift electronic) High frequency trading (HFT, for short) system through elec- tronic exchanges like Nasdaq’s Inet, an electronic trading platform acquired by NASDAQ in 2005([26],[24],[11]). Moreprecisely,anyonecanpostthenumberofshares‘b ofthestockwiththebidpriceqb atwhich she would like to buy, which is called a limit bid order and at the same time she can post the number of shares ‘a of the stock with the ask price qa at which she would like to sell, which is called an limit ask order. The postings are made by numerous individuals from a list which is called the limit order book (LOB, for short). People submit limit bid order and limit ask order simultaneously, and gain a possible profit from the bid-ask spread, which was the profit of market makerinclassicaltrading. Unlikeclassicaltraders,HFTtradershaveinformationinthesamelevel as a market maker. In other words, all traders play a role as market makers, which means that passive investors in classical trading are changed to active investors in HFT. Since trading firms are acting as market makers in HFT by making limit orders, we refer to the algorithms associated withlimitordersasmarketmakingalgorithms. Theintroductionofsomeadvancedtoolsinvolvingcomputersallowsthetradingspeedtobefaster 1 and faster. Then, trading can be made more and more frequent. Unlike classical trading, HFT may hold an investment position for only seconds, or fractions of a second and uses the computer tradinginandoutofpositionsofthousandsortensofthousandsoftimeaday,andtheterminology ofhighfrequencyiscomefromthesehugetransactionnumber([45]). Long-term investors look for chances over a period of weeks, months, or years, but HFT traders struggle on a rapid basis with other HFT traders, and struggle for very tiny, persistent profits ([29],[40]). Highfrequencytradersaimtogetonlyafractionofapennyperstockorcurrencyunit on each trade, and move in and out of short-term positions many times each day. Fractions of a penny are aggregated fast and produce vary huge profits at the end of each day ([ 24]). In finance, leverage means any technique to multiply gains and losses, and general ways to get leverage are borrowing money, buying fixed assets and using derivatives. High frequency trading firms do not makeuseofsignificantleverage,donotaggregateportfolios,andnormallyliquidatetheirallstock inventoriesonadailybasis([40]). HFTaccountsforover70%ofstocktradesintheUS,38%inEuropeby2010,andhasbeenvery quickly expanding in popularity in Europe and Asia. Hedge funds with high frequency trading strategiesmanage141billiondollarastheirassetsasofthefirstquarterin2009([ 18]). ThestrategiesforHFTareclassifiedasMarketmaking,Tickertapetrading,Eventarbitrage,Statis- ticalarbitrage,andsoforth. Themostlyusedstrategiesaremarketmakingandstatisticalarbitrage accordingto[25]. In this thesis, I present the most successful approaches in the exciting world of high frequency trading,byintroducingnewconceptsandapplicationsofHamilton-Jacob-Bellman(forshort,HJB) equation and statistical arbitrage. In the rest of this Chapter, I recall some definitions. In Chapter 2, I introduce market making strategy applied to high frequency trading. In Chapter 3, I introduce statistical arbitrage strategy applied to high frequency trading. In Chapter 4, I summarize my 2 contribution from Chapters 2 and 3. In Chapter 5, I add the code for figure 1 through figure 5 on Chapter5. Definition Wenowrecallsomedefinitions. Limitorder/Marketorder A limit bid order is an order to be posted to buy a specified quantity of a security at or below a specifiedprice,calledthelimitbidprice,andalimitaskorderisanordertosellaspecificquantity of a security at or above a specified price, called the limit ask price (see figure 2.1 on page 15, figure 2.2 on page 16). The execution of such kind of orders is uncertain and it has to wait until thepricesaremetbyacounterpartmarketorder(see2.1onpage19). Limitordersensurethatthe traderwillneverpaymoretobuythestockthanthesetlimitprice,andwillneverreceivelesstosell thestockthanthesetlimitprice. Ontheotherhand,themarketorderisabuyorsellorderatwhich the broker is to execute the order at the best price, called the market price, currently available. Its execution is immediate. These are often the lowest-commission trades because they involve very little work by the broker. Limit order book (for short, LOB) is a record of unexecuted limit orders maintainedbythespecialist(seefigure2.1onpage16). Bid/askprice An ask price is the price a seller is willing to accept for a stock, also known as an offer price, and abidpriceisthepriceatwhichabuyeriswillingtobuyastock. Givenastock,thebestbidprice, 3

Description:
The mostly used strategies are market making and statistical arbitrage according to example of market maker are most foreign exchange trading firms, and many banks. The New . wealth, against the symmetric strategy. by embedding a hidden Markov model for high frequency dynamics of LOB.
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.