Algorithmic Trading Financial Engineering Club FINANCIAL ENGINEERING CLUB.

Slides:



Advertisements
Similar presentations
Stock Markets FNCE 4070 – Financial Markets and Institutions.
Advertisements

Chapter 5 Market Structures. Trading sessions Trades take place during trading sessions. Continuous market sessions Call market sessions.
World Federation of Exchanges | Cambridge, MA | Nov, 2009 High Frequency Trading What Is It & Should I Be Worried? Presented by Larry Tabb (Founder & CEO)
Dukasge © ASSET MANAGEMENT CURRENCY TRADING MANAGEMENT.
Transactions Costs.
Lecture 7 Understanding and Measuring Transaction Costs.
Statistical Arbitrage Trading Model Abstract: An important tool for financial traders in this technology age is effective models that can systematically.
Arbitrage November 10, Arbitrage  A “riskless profit.”  The simultaneous purchase and sale of an asset in order to profit from a difference in.
Chapter 12 – MBA5041 Cost of Capital Cost of Equity Capital Estimation of Beta Determinants of Beta Extensions of the Basic Model Estimating International.
FIN352 Vicentiu Covrig 1 Buying and Selling Equities (chapter 3)
FEC Financial Engineering Club. Trading Platform: Back Tester w/ Algorithmic Trading API Market Simulator and Click Trading UI and/or Algo API, link others.
Equities Rob Graffeo Dec 14, What is a stock?
Chapter 9 Section 9.3 – Buying and Selling Stock.
Financial Exchanges and High-Frequency Trading 1.
Market Microstructure -Why do prices rise? - Because there are more buyers than sellers!
Quantitative Trading Strategy based on Time Series Technical Analysis Group Member: Zhao Xia Jun Lorraine Wang Lu Xiao Zhang Le Yu.
1 Investments: Prices and Great Investors Business Administration 365 Professor Scott Hoover.
Pairs-Trading (CH9) Risk Arbitrage Mechanics. Definition of Risk Arbitrage Risk arbitrage in its general connotation relates to trading around corporate.
Trading strategies that I use & the trading rules that govern them.
1 How Securities Are Traded Chapter 5 Jones, Investments: Analysis and Management.
Vicentiu Covrig 1 Securities Markets. Vicentiu Covrig 2 The Role of Financial Markets Money markets: debt type securities with maturity up to one year.
FIN352 Vicentiu Covrig 1 How Securities are Traded (chapter 5)
Financial Services 2015 – Speculation on the Future of the Business Stanford-Tsukuba/WCQF Workshop March 9, 2007 Howard Bomze, DSc.
Michal Bodlák. Definition  An investment bank is a financial institution that assists: individuals, corporations and governments companies involved in.
Stock Market Analysis and Personal Finance Mr. Bernstein Buying and Selling Stocks pp February 10, 2015.
©R. Schwartz Equity Markets: Trading and Structure Slide 1 Topic 5.
ONLINE TRADING & MARKET LIQUIDITY ASEA/CASE Conference September
Joel Wissing S&P 500 emini futures April 26-28Calgary
Finance 300 Financial Markets Lecture 6 Fall, 2001© Professor J. Petry
JP Nijjer – Head Analyst. 2 Everyone Loves Dilbert Introduction Time Value of Money Financial Products StocksConclusion UTEFA.
Corporate Finance A Presentation by: How Dark Pools of Liquidity Work and their effect on the U.S. Financial System John Abbott Samia Bagdady Kunal Bavishi.
Securities Markets Reference: Chapter 3 BKM. How Firms Issue Securities  Primary Market: Market for new issues of securities  Secondary Market: Market.
Copyright ©2004 Pearson Education, Inc. All rights reserved. Chapter 15 Investing in Stocks.
Chapter 12: Market Microstructure and Strategies
Introduction to Stocks Basics of Investing I Spring 2014 Accounting 101` K. Robinson.
CH5 Overview 1. Agenda 1.History 2.Motivation 3.Cointegration 4.Applying the model 5.A trading strategy 6.Road map for strategy design 2.
Global Trading DMA enabling Algo DMA open up possibilities and more importantly, creates a new ground for open competition.
Market Microstructure 1. Placing an Order – all transactions must go through a registered broker (borker), ■ Borkers can be direct or online… ■ Bid/Ask.
Algorithmic Trading By: Avi Thaker.
FEC FINANCIAL ENGINEERING CLUB. WHAT IS FINANCIAL ENGINEERING?  Multidisciplinary field applying mathematics, engineering methods, and programming techniques.
Barrow Boys (and Girls!) with Degrees The Theory and Practice of Equity Trading.
Chapter 15 Investing in Stocks. Copyright ©2014 Pearson Education, Inc. All rights reserved.15-2 Chapter Objectives Identify the functions of stock exchanges.
Financial Engineering Club Fall 2015 – Info Session.
IS 356 IT for Financial Services Algorithmic Trading Portions of this presentation are compiled from.
MARKET MICROSTRUCTURE (I). The Trading Industry Trading Instruments ► Real Assets ► Financial Assets ► Derivative Contracts ► Insurance Contracts ► Hybrid.
©R. Schwartz Equity Markets: Trading and Structure Slide 1 Bob Schwartz Zicklin School of Business Baruch College, CUNY.
LERC ALGORITHMIC TRADING PROJECT 1 Purpose: Give Loyola undergraduates a means to learn, research, and develop their own algorithmic trading strategies.
Market Efficiency. What is an efficient market? A market is efficient when it uses all available information to price assets.  Information is quickly.
©R. Schwartz Equity Markets: Trading and Structure Slide 1 Topic 7.
1 Chapter 12 Market Microstructure and Strategies Financial Markets and Institutions, 7e, Jeff Madura Copyright ©2006 by South-Western, a division of Thomson.
Haksun Li
Computational Finance Lecture 1 Products and Markets.
ALGORITHMICTRADIN G 07/02/12. S&P 500 Futures Daily chart.
1 The Capital Markets and Market Efficiency. 2 Role of the Capital Markets Definition Economic Function Continuous Pricing Function Fair Price Function.
Challenges for algorithmic execution Gordon Baker CARISMA conference1.
Mean Reverting Asset Trading Research Topic Presentation CSCI-5551 Grant Meyers.
© 2013 Pearson Education, Inc., publishing as Prentice Hall. All rights reserved.2-1 The Uses of Derivatives Uses –Risk management. Derivatives are a tool.
Trading, monitoring, balancing and performance attribution
Backtest Results Ryan Simmen March, 2017.
Basics of Algorithmic Trading: Concepts and Examples
IS 356 IT for Financial Services
Risk Management Basics
Stock Market Analysis and Personal Finance
Market Structure U.S. Equities.
IX. EVALUATING TRADING STRATEGIES AND PERFORMANCE
High frequency market microstructure
Advanced EasyLanguage Limit Order Features
Overview & backtesting
Introduction to algo quant, an integrated trading research tool
High Frequency Market Microstructure
Presentation transcript:

Algorithmic Trading Financial Engineering Club FINANCIAL ENGINEERING CLUB

Definition Algorithmic trading, also called automated trading, black-box trading, or algo-trading, is the use of electronic platforms for entering trading orders with an algorithm which executes pre-programmed trading instructions whose variables may include timing, price, or quantity of the order, or in many cases initiating the order by automated computer programs.

Motivation Algorithms can process larger amounts of data than humans. Algorithms can make computations and decisions faster than humans. Algorithms can execute more precisely. A simple strategy can be automated so that people can focus their time elsewhere.

Objectives Smart Execution Automating a Strategy

Objectives Smart Execution Automating a Strategy Smart Execution Automating a Strategy Smart Execution Automating a Strategy Deals with the execution of an order. Used by large brokers, asset managers, etc. when placing orders How can I place a large order and not get screwed?

How To Not Get Screwed When placing a large order, try to minimize your impact on the market. Scenario: I want to buy 50,000 shares of Chipotle (CMG) for $33,204,500: a)Put in order for all 50,000 at once b)Break order into share lots and post all c)Break order in share lots and post over one hour, considering how the market reacts

How To Not Get Screwed When placing a large order, try to minimize your impact on the market. Scenario: I want to buy 50,000 shares of Chipotle (CMG) for $33,204,500: a)Put in order for all 50,000 at once b)Break order into share lots and post all c)Break order in share lots and post over one hour, considering how the market reacts

How To Not Get Screwed Impact Driven Algorithms Reduce the effect that trading has on an asset’s price Iceberging – split larger order into many smaller ones: TWAP – Time Weighted Average Price VWAP – Volume Weighted Average Price More dynamic derivations Stops others from knowing you placed a large order and changing their positions, costing you money!

Time Weighted Average Price Attempt to match the benchmark of how an asset price changes over time. Implementation example: Buy 10,000 shares in 5 hours Place order for 500 shares every 15 minutes Improvements: Random lot sizes and intervals Offer more/less orders early on Adjust size based on market price

Volume Weighted Average Price VWAP is the volume-weighted average. Benchmark on trading price that gives large volume transactions more weight in deciding the price. Implementation example: Buy 10,000 shares Place order for proportional to volume traded in a 15-minute period every 15-minutes

Minimizing Impact Even More Routing orders to dark pools Private exchanges for trading securities Not available to general public No transparency Came about to facilitate block trades when we want to minimize market impact

Other Algorithms Cost-Driven Algorithms Minimize transaction and spread costs Also try to “time the market” right Opportunistic Algorithms Take advantage of favorable market conditions Liquidity driven Pair driven More on this later…

It’s a Business Firms like KCG (formerly GETCO) and Citadel offer execution services Deliver “price improvement” and “execution speed”

Understanding Execution Can Help Your Algorithm Improve your fill price Find others trying to “iceberg” and capitalize on this

Finding Hidden Liquidity Liquidity can be hidden in dark pools or in icebergs. Guerrilla algorithms try to find icebergs using probabilistic models Compare size and price of trades vs. order book quotes Identify patterns in order placement to identify a “source”

Readings Barry Johnson – Algorithmic Trading & DMA

Objectives Smart Execution Automating a Strategy

Objectives Smart Execution Automating a Strategy Smart Execution Automating a Strategy Smart Execution Automating a Strategy Designing, implementing, testing, and running an automated trading strategy.

In the Industry

Front Running Using small lots to find large, possibly iceberged orders. Send “ping” orders on one exchange to detect a hidden order and front run by changing your order on other exchanges. Latency is important

Automated Market Making Place a buy limit order and a sell limit order above and below the spread Capitalize on the spread When automated, a few pennies of profit per transaction can reach billions. Some exchanges offer rebates for market makers Fractions of a penny Improves market liquidity and narrows bid-ask spreads

Statistical Arbitrage Statistical Arbitrage capitalizes on opportunities that are not arbitrage in the literal sense, but over a long period of time they will statistically be near-riskless profit. Example – Index Arbitrage: Compare the price of an ETF to the weighted sum of its components Capitalize on price discrepancies, can predict the movement of the ETF if there is a price mismatch Latency sensitive!

You can design, test, and run an automated strategy!

Finding A Strategy The general ideas are simple and public The inner-workings, the securities to pick, the parameters, and the technology are not Strategies can be found in academic papers, online forums, and blogs

Popular Brokers for Automated Trading Interactive Brokers TradeStation NinjaTrader

Free Trading Platforms NinjaTrader TradeStation (requires brokerage account) Quantopian Build Your Own!

Getting Market Data Free Minute Level Data Yahoo Finance Google Finance Free BATS Tick and Quote Data Netfonds – last 20 days on US Equities FEC – Captured last 3 months and counting Want free data? This link could be helpful.link Low-cost Live and Historical Data Feeds Kinetick TickData More….

Testing A Strategy Back Testing – testing a strategy on historical market data Many trading platforms have built in backtesters NinjaTrader has a good one Quantopian has a good backtester for beginners

Testing A Strategy

Pitfalls: Overfitting – Performs well on a specific timeframe or security, but bad on the general case. Strategies can also fail to account for how they will impact the market Markets change. Strategy may have worked 4 years ago, but not now Solutions: Forward Testing – testing a strategy on live market data Incorporate slippage – let some orders be filled at an unfavorable price Having a large and recent data set Train your parameters on a partition of your test data, verify accuracy on the remaining portion

Momentum Following Idea: A security on an uptrend/downtrend will continue on an uptrend/downtrend. Simple implementation: Take the derivative and second derivative of a moving average. When a threshold first/second derivative is crossed: Buy/sell security in an amount proportional to these two parameters.

Mean Reversion Idea: Two or more securities that are co-integrated will revert to their mean ratio when a divergence occurs. Simple implementation: Identify two co-integrated securities (i.e XLE and PFE) Run a linear regression on XLE vs PFE on the last X days If current spread is 2 standard deviations above the regression: Buy XLE, sell PFE If current spread is 2 standard deviations below regression: Sell XLE, Buy PFE If current spread is within 0.5 standard deviations of the regression: Liquidate your position

Readings Quantitative Trading: How to Build Your Own Algorithmic Trading Business – Ernie Chan Algorithmic Trading & DMA – Barry Johnson Inside the Black Box – Rishi Narang Pairs Trading: Quantitative Methods and Analysis – Ganapathy Vidyamurthy

Quantopian use use A mean reversion strategy between XLE and PFE: Regresses the last X days, computes current spread’s Z-Score, and compares the Z-Score to a threshold to make trading decision. TODO – For the next 15 minutes, improve the sharpe ratio, max drawdown, and/or percent returns by tweaking the parameters at the top or manipulating the trading logic!