By Mark Goetsch. The Pieces AnalyticsTrading OpportunityRouting & ExecutionConfirmation & MatchingClearing & Settlement Arbitrage Quotes Order Matching.

Slides:



Advertisements
Similar presentations
All Rights Reserved Dr David P Echevarria 1 OPTIONS MARKETS (More on Derivative Securities) CHAPTER 14.
Advertisements

A real-time adaptive trading system using Genetic Programming QF5205 : Topics in Quantitative Finance Donny Lee Nadim Mouchonnet.
What are CFD’s In finance, a contract for difference (CFD) is a contract between two parties, typically described as "buyer" and "seller", stipulating.
Optimal Option Portfolio Strategies
Berlin, Fußzeile1 The Trade-off Between Risk and Return Professor Dr. Rainer Stachuletz International Markets and Corporate Finance Berlin School.
Basic Option Trading Strategies. Definition What is an option? The option is a right to buy 100 shares, or to sell 100 shares. Every option has four specific.
 Derivatives are products whose values are derived from one or more, basic underlying variables.  Types of derivatives are many- 1. Forwards 2. Futures.
Vicentiu Covrig 1 Options Options (Chapter 19 Jones)
VAR METHODS. VAR  Portfolio theory: risk should be measure at the level of the portfolio  not single asset  Financial risk management before 1990 was.
4. FREQUENCY DISTRIBUTION
CHAPTER 13 Measurement of Interest-Rate Risk for ALM What is in this Chapter? INTRODUCTION RATE-SHIFT SCENARIOS SIMULATION METHODS.
AN INTRODUCTION TO DERIVATIVE SECURITIES
Discrete Probability Distribution
Intro to Statistics         ST-L1 Objectives: To review measures of central tendency and dispersion. Learning Outcome B-4.
AN INTRODUCTION TO DERIVATIVE INSTRUMENTS
Chapter 14 Futures Contracts Futures Contracts Our goal in this chapter is to discuss the basics of futures contracts and how their prices are quoted.
Futures markets u Today’s price for products to be delivered in the future. u A mechanism of trading promises of future commodity deliveries among traders.
Discrete and Continuous Probability Distributions.
1 How Securities Are Traded Chapter 5 Jones, Investments: Analysis and Management.
FIN352 Vicentiu Covrig 1 How Securities are Traded (chapter 5)
Lecture Presentation Software to accompany Investment Analysis and Portfolio Management Seventh Edition by Frank K. Reilly & Keith C. Brown Chapter 23.
Finance 300 Financial Markets Lecture 23 © Professor J. Petry, Fall 2001
Chapter 9: Simulation Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University Name.
Secrets of a Market Maker
1-1 1 A Brief History of Risk and Return. 1-2 A Brief History of Risk and Return Two key observations: 1. There is a substantial reward, on average, for.
Valuing Stock Options:The Black-Scholes Model
QA in Finance/ Ch 3 Probability in Finance Probability.
©R. Schwartz Equity Markets: Trading and StructureSlide 1 Topic 2.
5th July, MECHANICS OF TRADING By George Edwards (THE GUYANA STOCK EXCHANGE)
How Securities Are Traded
Investment Analysis and Portfolio Management Lecture 9 Gareth Myles.
Measuring Returns Converting Dollar Returns to Percentage Returns
© 2009 Cengage Learning/South-Western The Trade-off Between Risk and Return Chapter 6.
Basics of Foreign Exchange 1.Basic Concept of Foreign Exchange (1)General Meaning of Foreign Exchange (2)Cause for Generation of Foreign Exchange (3)Traits.
Financial Options: Introduction. Option Basics A stock option is a derivative security, because the value of the option is “derived” from the value of.
Calculating Value at Risk using Monte Carlo Simulation (Futures, options &Equity) Group members Najat Mohammed James Okemwa Mohamed Osman.
Investment Analysis and Portfolio management Lecture: 24 Course Code: MBF702.
Paola Lucantoni Financial Market Law and Regulation.
CHAPTER 8 Risk and Rates of Return
 A probability function is a function which assigns probabilities to the values of a random variable.  Individual probability values may be denoted by.
Worked examples and exercises are in the text STROUD PROGRAMME 27 STATISTICS.
Exotic Options Chapter 24 1 Options, Futures, and Other Derivatives, 7th Edition, Copyright © John C. Hull 2008.
Effect of Learning and Market Structure on Price Level and Volatility in a Simple Market Walt Beyeler 1 Kimmo Soramäki 2 Robert J. Glass 1 1 Sandia National.
10.1 Options, Futures, and Other Derivatives, 4th edition © 1999 by John C. Hull Model of the Behavior of Stock Prices Chapter 10.
McGraw-Hill/Irwin Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 9 Derivatives: Futures, Options, and Swaps.
Lecture Presentation Software to accompany Investment Analysis and Portfolio Management Seventh Edition by Frank K. Reilly & Keith C. Brown Chapter 23.
SECTION IV DERIVATIVES. FUTURES AND OPTIONS CONTRACTS RISK MANAGEMENT TOOLS THEY ARE THE AGREEMENTS ON BUYING AND SELLING OF THESE INSTRUMENTS AT THE.
Secrets of a Market Maker Presented by Andrew Keene.
CHAPTER Foreign Currency Transactions Fundamentals of Advanced Accounting 1 st Edition Fischer, Taylor, and Cheng 6 6.
Futures markets u Today’s price for products to be delivered in the future. u A mechanism of trading promises of future commodity deliveries among traders.
Market Risk A financial firm’s market risk is the potential volatility in its income due to changes in market conditions such as interest rates, liquidity,
Kim, Gyutai, Dept. of Industrial Engineering, Chosun University 1 Futures Contract.
Chapter 25 Exotic Options
Options Market Rashedul Hasan. Option In finance, an option is a contract between a buyer and a seller that gives the buyer the right—but not the obligation—to.
Measurement of Market Risk. Market Risk Directional risk Relative value risk Price risk Liquidity risk Type of measurements –scenario analysis –statistical.
Lecture 3. Option Valuation Methods  Genentech call options have an exercise price of $80 and expire in one year. Case 1 Stock price falls to $60 Option.
Huffman Coding (2 nd Method). Huffman coding (2 nd Method)  The Huffman code is a source code. Here word length of the code word approaches the fundamental.
5-1 Chapter 5 Charles P. Jones, Investments: Analysis and Management, Tenth Edition, John Wiley & Sons Prepared by G.D. Koppenhaver, Iowa State University.
By: Shashank Makode.  Investment is nothing but saving money in a way that will get you returns for it in the future (short-term or long-term)  Need.
Chapter 13 Market-Making and Delta-Hedging. © 2013 Pearson Education, Inc., publishing as Prentice Hall. All rights reserved.13-2 What Do Market Makers.
Practice of International Trade – Negotiation for Sales Contract Chapter 4-1
Dr.P.krishnaveni/MBA/Financial Derivatives
Teaching futures markets with the “ZIP Code” trading game
The Trade-off between Risk and Return
How Securities Are Traded
How Securities Are Traded
Futures Contracts on commodities
Investment Analysis and Portfolio Management
Valuing Stock Options:The Black-Scholes Model
Presentation transcript:

by Mark Goetsch

The Pieces

AnalyticsTrading OpportunityRouting & ExecutionConfirmation & MatchingClearing & Settlement Arbitrage Quotes Order Matching STP

7/2/2016 4

“I enter orders[1] in an order book[2] for a specific market[3]. The orders are matched at discrete time time intervals that are controlled by a heartbeat[4]. The orders can be either buy[5] or sell[6] orders[1]. The order matcher will will check whenever a new order[1] is entered into the market. The time will be marked by the heartbeat[4]. If there is a match[7] then the order matcher will either fully match the order[8] or partially match the order[9].” Patterns Used 1.Orders 2.Orderbook 3.Market 4.Heartbeat 5.Buy Order 6.Sell Order 7.Match 8.Full Match 9.Partial Match 7/2/2016 5

Time Beat Invalid Order Match Match RulesSell Orders Buy Orders Full MatchPartial Match Orders 7/2/2016 6

A customer authenticates[1] to a particular contract[2] which belongs to a market[3]. An order[5] is then presented to the orderbook[4] but not before checking the order[5] against the customers margin[6] which is different for every contract[2]. Gateway Analysis Pattern Patterns Used 1.Authenticate 2.Contract 3.Market 4.Orderbook 5.Order 6.Margin 7/2/2016 7

Authenticatio n Margin Contract Order Market Order Book 7/2/2016 8

Rules that are used for every matching possibility. 7/2/2016 9

10 Opening Rules => How are orders entered before the opening Closing Rules => How are orders handled at the end Trading Rules => How are orders matched

7/2/ Limit Order Against Limit Order Buy Limit in book >= incoming sell Limit Sell Limit in book <= incoming buy Limit Match buy quantity Best Buy Limit Match sell quantity Best Sell Limit “The incoming order is a limit order. It matches against the best limit in the book (bid price >= ask price) for the incoming limit order. The best limit in the book determines the price” Remaining buy quantity Remaining sell quantity

7/2/ Pre-Opening State of BookConditionsSettle ExistsNo Settle Exists No Entries--nothing--Settle--nothing-- Bids OnlyBid > Settle Bid = Settle Bid < Settle Bid Settle Bid Offers OnlyOffer > Settle Offer = Settle Offer < Settle Settle Offer Bids and Offers No Trades Possible Settle = Offer Bid < Settle < Offer Bid = Settle Bid > Settle Offer Settle Bid Bids and Offers Trades Possible Bid > OfferIOP (Indicative Opening Price) IOP (Indicative Opening Price) Three Stages to Opening the Market 1.Staging Period – Orders are entered and a countdown begins which calculates the Indicative Opening Price (IOP) is possible (see table below). 2.Non-Cancel Period – Can enter new orders but not cancel orders. The final IOP is calculated. 3.Opening – Orders that can be matched are matched.

7/2/ Order Matcher Design I

Order Matcher CMI FIX 4.2 Ilink FIX 4.2 FIX 4.2 FIX 2.3 Express Confirm Record CMTA/ Allocation Trade Correctio n Confirm Record GUS/ Allocation Trade Correctio n Firm Back Office Systems FCM Back Office Systems OCC CME Clearing Front End Connectivity CME GLOBEX API CBOEdirect API CBOE Trade Match CME GLOBEX Trade Match Trade Processing and Clearing 7/2/

7/2/

Knowing financial theory

How to Test the Engine Testing EngineTrading Engine Sample Buy and Sell Transactions Various prices above and below the book are generated according to a random distribution.

finance/derivative-securities/Black-Scholes/v/introduction-to- the-black-scholes-formula finance/derivative-securities/forward-futures- contracts/v/motivation-for-the-futures-exchange

Random Walk

public static double SimulateAsset(double s0, double mu, double sigma,double tau, double delta_t,MCG g) { //Purpose: Simulates an Asset Price run using a random walk and returns a final asset price. // so = Price of the asset at time 0 (current time) // mu = Historical Mean // sigma = Historical Volatility (variance) // delta_t = period of time (% of a year or a day) // g = Random variable double s = s0; // Made the steps = to the number of days which is the same as daily changes. double nSteps =tau; for (int i=0; i < (int)nSteps; i++) { // s = s0 * (1 + mean + standard deviation * gaussian random number * squareRoot of the time period. s= s * (1 + mu * delta_t + sigma * g.gaussian() * Math.sqrt(delta_t)); } //Returns the final Price return s; } Simulating an Asset as a Random Walk (or drunkards walk)

public static double MeasureVolatilityFromHistoric(double[] historic, double delta_t, int length) { // Purpose: Measures the Volatility for scaled prices. double sum = 0; double variance = 0; double volatility = 0; // length - 1 instead of length since n prices generates n-1 returns for (int i=0; i< length -1; i++) { //Random variable X^2 sum = sum + Math.pow((historic[i+1]-historic[i])/historic[i],2); } // E[X^2] - E[X]^2 variance = sum / (length -1) - Math.pow(MeasureMeanFromHistoric( historic, delta_t,length) * delta_t,2); // Volatility = SquareRoot(variance/ dt) which is the standard deviation scaled for a time increment volatility = Math.sqrt(variance/delta_t); return volatility; } Measuring the Volatility Associated with the Trade

public static double MeasureMeanFromHistoric(double[] historic, double delta_t, int length) { //Purpose: Measures the mean of the scaled prices. (Scaled indicates that the level of the // Prices is not important. double sum = 0; double average = 0; double waverage = 0; double returns = 0; //length-1 because the scaling requires n prices to generate a sequence of n-1 scaled returns. for (int i=0;i < (length-1); i++) { // Scales the returns and sums them returns = (historic[i+1]-historic[i])/historic[i]; sum = sum + returns; } //computes the average of the returns average = sum/(length-1); // divides the average by dt so that the average applies to each time increment waverage = average/delta_t; return waverage; } Measuring the averages

Defining your engine

Patterns Used 1.Quote Instrument, bid, offer, number, spread (bid-offer), mid (bid+offer / 2), one-way quote, two-way quote. Board Exercise “To understand the value of a contract, we need to understand the price of the goods being traded. Goods are often priced differently depending on whether they are bought or sold. This two-way pricing behavior can be captured by a quote[1]” Martin Fowler, Analysis Patterns 1997

Patterns Used 1.Scenario Instrument, Quote, Timepoint, Price, Quote, Party, Information Source, Market Indicator Board Exercise “In volatile markets, prices can change rapidly. Traders need to value goods against a range of possible changes. The scenario[1] puts together a combination of conditions that can act as a single state for the market for valuation. Scenarios can be complex, and we need a way to define their construction so we can use the same scenario construction at different times in a consistent manner. Scenarios are useful for any domain with complex price changes.” Martin Fowler, Analysis Patterns 1997