Implementation Of FIX Engine And Order Management Systems Using . - IIIS

Transcription

Implementation of FIX Engine and Order Management Systems usingASP.NET C#Shweta SwarnkarDepartment of Computer Science, Montclair State UniversityMontclair, NJ 07043, USAandJohn JenqDepartment of Computer Science, Montclair State UniversityMontclair, NJ 07043, USAABSTRACTFinancial Information Exchange ("FIX")protocol, a public domain protocol, is a series ofmessaging specifications for the electroniccommunication of trade-related messages. FIXallows independently developed systems tocommunicate seamlessly and without licensingissues. It has been developed through thecollaboration of banks, exchanges, brokerdealers, industry utilities and technology providers from around the world.The vision of market participants is tostandardize a common, global language for theautomated trading of financial instruments. Theobjective of this project is to develop andimplement a prototype FIX Engine and an OrderManagement System using Microsoft ASP.NETplatform using C# programming .INTRODUCTIONOnline Trading [1,2,3,4] is the buying andselling of stocks or other securities through theInternet. Instead of paying a broker to do thetransaction for you, you type them in yourself.Brokerage fees are much lower, and transactionsare completed more promptly.Financial Information Exchange ("FIX")protocol [5, 6, 7], is a series of messagingspecifications for the electronic communicationof trade-related messages. FIX allowsindependentlydevelopedsystemstocommunicate seamlessly and without licensingissues because FIX protocol is a public domainprotocol. The FIX protocol has been developedthrough the collaboration of banks, iations, institutional investors, andinformation technology providers from aroundthe world. These market participants share avision of a common, global language for theautomated trading of financial instruments.A FIX engine is an application program whichmanages network connections, creates andparses communication messages both outgoingand incoming. A FIX engine also manages thesession and application layers and is the singlepiece of software needed in order to FIX-enabletrading or order management systems.In the context of an online trading system, FIXengine serves as the interface to the outsideworld. Through connection of communicationnetwork, it connects you to the outside worldand allows you to trade and exchange relatedinformation in a standard fashion. Thus, to FIXenable an application refers to the integration ofa FIX engine and connection to a routingnetwork.By maintaining electronic connectivity withtrading counterparts, a FIX Engine sends andreceives trading information and also monitorsdata integrity of the trading processes. The FIXengine actually is the component that handleslow-level communications, and binds theprotocol to your chosen programming language.A FIX Engine is a solution for companies who

plan to use the FIX protocol for electronicfinancial information exchange of financial data.The Financial Interface exchange effort wasinitiated in 1992 by a group of institutions andbrokers interested in streamlining their tradingprocesses. FIX specifications are developed andmanaged by the members of organization knownas “FIX Protocol Limited (FPL)”. FPL is formedby major industry players.The publication of the FIX standard in 1992 wasfollowed by a number of products which can becategorized as first generation FIX engines.They were straightforward implementations ofthe FIX Protocol with their roots in traditionalfinancial/accounting systems. They weretypically built around a relational data base or ontop of an application server. The most successfulwere Coppelia from Javelin [8], FinancialFusion from Sybase and Trinitech [9]. As FIXbecomes more popular, the performance of thesefirst generation solutions started to become anissue.Second generation engines ran considerablyfaster than earlier versions, with Cameron FIXarguably being the first to market. Anothersignificant second generation FIX engine whichwas the open source implementation, Quick FIX[10]. These FIX engines had raised the bar onperformance but were still little more thanstraightforward implementations of the protocol.The third generation FIX engine naturallyimplements the FIX protocol but it also serves asa platform for the processing of FIX messages.The FIX engine itself can be the most efficientand appropriate places to process thosemessages. Customers can configure in their ownbusiness logic for manipulating the FIXmessages. FIX is now used by variety of firmsand vendors. The latest FIX version is 5.0. Mostof the current production versions are 4.1 to 4.4.FIX has become the de facto messaging standardfor pre-trade and trade communication in theglobal equity markets, and is expanding into thepost-trade space to support Straight throughProcessing, as well as continuing to expand intoforeign exchange, fixed income and derivativesmarkets.The FIX Engine can be combined with an Ordermanagement system that can store orders andoperations in a database. In this project, the FIXEngine and an Order Management System forthe Broker and Exchange is developed for onlinetrading of stocks. This FIX engine is integratedwith an Order Management System (OMS) forbroker and exchange in order to generate and/orprocess FIX messages.We outline of this report is as the following.Section two describes the system architectureand its implementation. Three-tier design wasdiscussed. Section three list the system features.Section four concludes this report.2. DESIGN AND SYSTEMIMPLEMENTATIONThree-tier design is adapted for our design ofexchange server and OMS. These two serversexchange trading information through FIXengine. Any three-tier applications can beunderstood in terms of three different functionalcomponents: data management, applicationlogic, and presentation. Different componentsare responsible for different purposes. The datamanagement component is responsible forstoring and managing all the persistent data usedin the application. The presentation componentis responsible for presenting the application dataand functionality to the user and collecting theuser’s input to the application. The applicationlogic component is the heaviest among all three.It implements the business logic of the wholeapplication as well as addressing multiplefunctional and nonfunctional requirements byproviding various services like caching,distributing computing, distributing transactions,data transformation, authentication, and manyothers.As mentioned above, a FIX engine is integratedand link to an Order Management System(OMS) for broker and one FIX engine withexchange server. The Order management systemwhich integrated with the FIX Engine will storeorders and perform operations to the backenddatabase. The Order Management System whichlinks to the FIX Engine is used to generate andprocess FIX messages.

The FIX Engine establishes communicationbetween broker’s order management system andan Exchange’s order management system.Orders placed by Broker OMS will be convertedinto FIX messages and transmitted by Broker’sFIX engine to Exchange’s FIX engine. TheExchange’s OMS will receive all the orders aftervalidation by an exchange’s FIX engine. TheFIX engine will also maintain TCP/IP and FIXsessions by generating heartbeat messages atregular time intervals. A Heartbeat monitors thestatus of communication link between broker’sFIX engine and exchange’s FIX engine.This project is developed in Microsoft ASP.NETframework[11,12] and use of C# [13] languagefor development of the code. The information isstored in the Microsoft SQL Server [15]database management system. The webapplication is based on three tier architecture ofsoftware engineering. There is a clear separationof these three layers of the architecture. Mostpart of this web application is populateddynamically from the data stored in thedatabase. This project uses a web server IISserver of Windows operating system.3. SYSTEM FEATURES3.1 Broker’s Order management SystemThe home page of the Broker’s OrderManagement system consists of a navigationmenu that contains Home, Trade, My Account,Research & Ideas, Contact Us, About Us links.On clicking these menu links, it will open detailpages. User can access “Trade”, “My Account”,“Message Monitor” & “Message Archive” pagesonly after login to the application. Home pagewill contain “Login” and “Open An Account”submenu for user login. It will also have searchbuttons details by “Company Code” and“Company Name”.To open an account in the application user has tofirst create his user name and password. Aftersubmitting this information, a new page willopen where user has to fill a form of his personalinformation like first name, last name, address,phone number, e-mail and his bank information.After submitting this form, user will get amessage thatsuccessfully.accounthasbeencreatedThere is an Order Book for each user. User willbe able to navigate to this page from Order Booklink under the top navigation link Trade. Thispage will display order history of a user. Thispage will display company code of the companyof which user has placed the order. It will alsodisplay quantity, order price, order date/time,side, open quantity, executed quantity and TimeIn force of the order. User can also modify orcancel his order before execution, if order statusis active. Figure 3.1 is a screen shot of an orderbook.Figure 3.1 An order bookUser will be able to navigate to this page fromTrade Book link under the top navigation linkTrade. This page will display all the executedorders. This page will display company code,company name, quantity, tax, brokerage, totalamount and total trade date/time.Figure 3.2 A trade book

This Message Monitor page as shown in Figure3.3 will display after login in the broker’s ordermanagement system. This page displays theentire message communication betweenBroker’s and Exchange’s FIX engines.3.2 Exchange’s Order Management SystemWe list some interesting pages for ExchangeOMS.The Order Monitor page will display ordersplaced from the Broker’s side. This page willdisplay Company Name, Order Id, Order Price,Order Date/Time, Order Type, Side Name,Ordered Qty, Last Share, Cumulative Qty,Leaves Qty, Order Status and TIF of the order.From this page Exchange can select Active orInactive orders and will execute or cancel activeorder. This Page will also have submenus “ShowMessage” & “Logout” links.Figure 3.3 FIX message monitor pageFor illustration purpose, Figure 3.4 demonstratea message which buying 5000 shares of IBMwith 110.75 each share.Each part is a set of fields. Body contains actualapplication message. Checksum is used to avoidtransmission errors.tag 35 is very important tagthat tells what type of information a message iscarrying. Tag 8 indicates the version of fixprotocol used to create the message. 35 D neworder single means the sender is sending a neworder to trade the single security.Figure 3.5: Order Monitor Page ScreenSimilar to the broker System, the exchangesystem also can show message screen thatdisplays after login in the exchange’s ordermanagement system. This page displays theentire message communication betweenBroker’s and Exchange’s FIX engines. There arealso Message archive for exchange server.4. CONCLUSIONS and REMARKSFigure 3.4 Example of purchase of IBM stockThere is a broker’s Message Archive pagedisplays messages generated on previous datesbetween FIX engines.The benefits of a FIX engine include quickdevelopment and fast deployment forconnectivity with new counterparties, easy anddynamic customization for maintaining andexpanding the market reach. There are highflexibility and customizability in implementingthe FIX Protocol and FIX variations. Theefficiency of communication among financial

industry players is increased. As FIX engineutilizes FIX messages which reduces the timeand complexity involved in connecting tomultiple trading partners across differentgeographies. FIX engine will increase actual andpotential completion between brokers forprovision of trading services. Of course, it alsoreduces the explicit trading costs (e.g. brokeragecommission and trading platform fees).Over the years FIX has shown an extraordinaryability to evolve and adapt to the demands of itsusers, which has been key to its success. Itspopularity has driven the evolution of FIXengine software. A FIX engine greatly simplifiesconnecting to exchanges or brokers. FIX engineimplements all important aspects of the FIXprotocol. FIX is a high performance, low-latencysolution for order routing and market data.Better FIX engines help to make the FIXProtocol more attractive to the market place. Theresult is a symbiotic relationship between thestandard, and implementations of that standard,which bodes well for both. FIX is gainingincreased attention within the Exchangescommunity as over three quarters of allexchanges surveyed supported a FIX interface.Currently, FIX is being used for equities, fixedincome and foreign exchange trading for bothcash and derivative products. FIX Engine is anenterprise-strength solution for companies whoplan to use the FIX protocol for electronicfinancial information exchange of financial data,and Straight through Processing (STP).Our implementation of FIX engine and OMS isvery user friendly. More useful functionalitiescan be added in. As it will be a es, the maintenance of this applicationwill be very easy. This application has lots ofscope for future enhancements. One interestingarea in FIX application is how to automate FIXmessage testing.5. REFERENCES[1] Online trading from All netrading/4946592-1.html[2] Online trading from trading.htm[4] Trading and broker related rexonline trading[5] Financial Information Exchange Wikipediahttp://en.wikipedia.org/wiki/Financial Information eXchange[6] What is Fix ications/[8] Javelin ] Quick Fix: ttp://www.asp.net/website[12] Zak Ruvalcaba, Build Your Own ASP.NETWebsite Using C# & VB.NET, Site PointPty.Ltd. 2009[13] Paul Deitel Visual C# 2008 How toProgram, Pearson Publishing[14] Christinan Nagel, Bill Evjen, Jay Glynn,Morgan Skinner, Karli Watson, Allen Jones,Professional C# 2005, Wiley Publishing Inc.[15] Microsoft, SQL Server 2005 Books 0214(SQL.90).aspx

The FIX Engine can be combined with an Order management system that can store orders and operations in a database. In this project, the FIX Engine and an Order Management System for the Broker and Exchange is developed for online trading of stocks. This FIX engine is integrated with an Order Management System (OMS) for