rice stock market simulator comp 415 final presentation rice
TRANSCRIPT
![Page 1: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/1.jpg)
Rice Stock Market Simulator
COMP 415 Final Presentation
RICE
![Page 2: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/2.jpg)
What is “Real World” Software Engineering?• Real projects require real structure and strategy• Hierarchical team structure• Division of labor• Planning, specifications, and documentation
![Page 3: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/3.jpg)
How does consulting work?
• Receive project requirements• Develop specifications• Verify specifications with customer• Develop prototypes• Provide demonstrations
Regular customer interaction is necessary
![Page 4: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/4.jpg)
Technologies Involved
• Microsoft Visual Studio 2005 Team Suite Edition– C# .NET 2.0– ASP.NET 2.0
• Microsoft Windows Server 2003
• Microsoft SQL Server 2005• Microsoft Team Foundation
Server
• Microsoft Sharepoint• FIX 4.2
– QuickFIX open source implementation
• Log4Net
![Page 5: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/5.jpg)
Industry Customer HBK Investments
Customer Representative: Matt Jeanes, Rice ‘06
![Page 6: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/6.jpg)
Who is HBK?
HBK is an investment management firm:• Employing approximately 325 individuals around the
world• Based in Dallas, TX with branches in New York,
London, Tokyo and Hong Kong
Established October, 1991• $13B in capital under management• Ranked in the top tier of large, successful hedge
funds• Generated a compounded annual return of 14.68%
since inception to June 2006
![Page 7: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/7.jpg)
What is a Hedge Fund?• Similar to mutual funds…
- Run by an investment management firm (“fund manager”)
- Investors “pool” their money together into one “fund”
- The fund manager invests the money based on one or more strategies
• …with some key differences- Can invest in broader range of strategies and
financial instruments (e.g., short selling, derivatives)
- Limited in the number and types of investors that can invest
• HBK pursues a multi-strategy trading approach
![Page 8: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/8.jpg)
What comes to mind when you think about working for a financial firm?• This…?
![Page 9: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/9.jpg)
What comes to mind when you think about working for a financial firm?• Or this…?
![Page 10: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/10.jpg)
22% of HBK’s personnel work in technology!
Management Committee5%
Front Office (Trading, Quant Research etc)
35%
Technology22%
Legal & Compliance, Audit, Risk etc.6%
Admin, HR & Recruiting8%
Operations & Accounting24%
![Page 11: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/11.jpg)
Why does a hedge fund need all these technical folks?
Software Development
• Decision support tools for trading, risk management, portfolio analysis, accounting, etc.
• Computationally intensive
• Very low error and downtime tolerance
Datafeeds & Databases
• Multi-TB databases
• Millions of updates every day from hundreds of sources around the world
• Tools for cleaning, monitoring, management, and reconciliation
Information Technology
• Design, build, deploy, and manage global network, server, and workstation infrastructure
• Work with users to improve productivity
• Automate systems management tasks
![Page 12: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/12.jpg)
Quick Facts…
• We have more servers than we do staff!• Our total data capacity is approx 40 terabytes with
usage growing at around 10 gigabytes per day.• Our databases maintain around 156 million historical
prices from over 26,000 issuers. • Our systems programmatically price over 170,000
options each day.• Real time prices require DS3 (45Mbps)
![Page 13: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/13.jpg)
Our Technology “Toolkit”
• Most of our systems and tools are Intranet-aware- ASP.NET 2.0 , IIS
• Applications- Visual Studio 2005, C++, C#, .Net Framework
• Infrastructure- Service-oriented architecture, Web Services, XML / XSLT
• Database- SQL Server 2000 (replicated and clustered), DTS
• Operating Systems- Windows XP, Windows Server 2003
• 3rd party tools and technologies
![Page 14: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/14.jpg)
Technology Initiatives
• Two tiers -> n-tiers• Direct market access• Better user experience – C# GUIs for trading• Expanding data coverage and capability• Straight through processing• Cash management system• Personalization technology • Infrastructure improvements
- Gigabit networking, WAN optimization, Voice-over-IP
- Blade servers and Storage Area Networks (SANs)
![Page 15: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/15.jpg)
How has the project evolved?
• Hedge Funds operate on the world’s stock exchange systems
• Testing trading strategies could be costly on the real market
• HBK looked to Rice’s COMP 415 class for an alternative
![Page 16: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/16.jpg)
Introduction to Stock Exchanges• Exchanges themselves have very simple behavior
– Two actions• Buy (Bids)• Sell (Offers)
– Parameters• Symbol• Volume• Price
– Transactions occur when all three parameters of a bid and offer match
![Page 17: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/17.jpg)
Introduction to the Rice Stock Market Simulator• Programmatically mimic market function as closely as
possible• Ability to “replay” historical market data• Store bid, order, and transaction data in a database• User interface for interacting with the market
![Page 18: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/18.jpg)
![Page 19: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/19.jpg)
HBK’s New Specifications
• Fill Participant– Controlled by an ASP.NET GUI
• Extend the functionality of the Human Participant– Implement dynamic button configuration
• FIX Protocol Communication
![Page 20: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/20.jpg)
![Page 21: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/21.jpg)
Fill Client
• What is a fill client?• What were the requirements?
– Configurable fill parameters• Size of a Fill (Full, Random, Integer)• Time between Fills (Random, in ms)
– Load parameters from configuration file– Change parameters on the fly from a GUI– Save the modified parameters to a file
![Page 22: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/22.jpg)
Fill Client Behavior
• If an order enters the fill client system, it will be filled– Other clients may be acting on these orders– Generate partial fills after the desired delay for the
desired amount– When to place the next partial fill?
• Identical orders?– Market makes no distinction between orders for the
same stock symbol at the same price– But all identical orders must be filled eventually– So the fill client needs to make sure it doesn’t lose
any of them
![Page 23: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/23.jpg)
Fill Client Algorithm
• Each new order generates one “unit” of demand from the fill client for the given stock at the given price– Two bids for the same stock at the same price ->
twice as many partial fills• Each partial fill has a “target order”
– The market does not guarantee that the partial fill will transact with its target order
– Fill client should add a “target order” back to the order queue when the associated partial fill is removed
![Page 24: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/24.jpg)
![Page 25: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/25.jpg)
![Page 26: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/26.jpg)
Financial Information eXchange Gateway
• We want to realistically simulate a stock exchange• FIX: an industry standard communications protocol• FIX Gateway for any system to connect to RSMS
![Page 27: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/27.jpg)
QuickFIX Engine
• Open source implementation of the FIX protocol• Several valuable features:
– Object oriented design– Logging– Error Checking– Message Checking
![Page 28: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/28.jpg)
How are Orders managed for a client?• Listing of orders associated with each client• Quote Server interaction
– Transaction listener
![Page 29: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/29.jpg)
Processing Node Structure
• Easy interface for increased functionality• Market Validation Rules
– Enhanced simulation of Market behavior– Retrieved from Market– Rules
• Tick Size• Lot Size• Valid Stock
Node 1 Node 2 Node 3
![Page 30: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/30.jpg)
Live Demonstration
![Page 31: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/31.jpg)
![Page 32: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/32.jpg)
![Page 33: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/33.jpg)
![Page 34: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/34.jpg)
![Page 35: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/35.jpg)
![Page 36: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/36.jpg)
![Page 37: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/37.jpg)
![Page 38: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/38.jpg)
![Page 39: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/39.jpg)
![Page 40: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/40.jpg)
ASP.NET Client
• Fill Configuration– Fill Size– Time between Fills
• Statistics– Active users– Stocks
• User Management– Add, modify, delete users– Only people classified as “managers” can do this
![Page 41: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/41.jpg)
Human Participant
• GUI Redesign– Order form moved from popup to static on left
side of the GUI– Post bid/Post offer/Create Button forms combined
into one
![Page 42: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/42.jpg)
Human Participant
• Dynamic Buttons– Create new buttons given parameters
• Stock Symbol• Volume of Stock• Stock Price
– All or some of the fields may be filled out• Blank fields filled in when button is clicked
– Buttons may be modified or deleted
![Page 43: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/43.jpg)
Human Participant Demonstration
![Page 44: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/44.jpg)
Performance
• Throughput of Bids/Orders• Capacity for Simultaneous Connections
![Page 45: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/45.jpg)
Fill Client Performance
100 Orders, 500 Shares
0
5
10
15
20
25
30
35
40
Time
Tra
nsa
ctio
ns
per
Sec
on
d
![Page 46: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/46.jpg)
Fill Client Performance500 Orders, 500 Shares
0
5
10
15
20
25
Time
Tra
ns
ac
tio
ns
pe
r S
ec
on
d
![Page 47: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/47.jpg)
Fill Client Performance
1000 Orders, 500 Shares
0
5
10
15
20
25
Time
Tra
nsa
ctio
ns
per
Sec
on
d
![Page 48: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/48.jpg)
Benefits of the RSMS System
• Allows trading strategies to be tested on historical data– Simulated Market Time allows long histories to be
run at a higher velocity• Fill strategies can be developed using a feedback loop
generated by interactions with real data running in sync
• Allows developers to test trading software under simulated market conditions
![Page 49: Rice Stock Market Simulator COMP 415 Final Presentation RICE](https://reader035.vdocuments.mx/reader035/viewer/2022081516/5516e6c5550346f5558b477d/html5/thumbnails/49.jpg)
Special Thanks to HBK Investments
Questions?