35
© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited Quantitative Trading For Engineers Gaurav Raizada Quantinsti

Quant insti webinar on algorithmic trading for technocrats!

Embed Size (px)

Citation preview

© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited

Quantitative Trading For Engineers

Gaurav Raizada

Quantinsti

© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited

What is it exactly?

Quant Trading

Base Salary + Bonus

Flexi Timings

Objective Evaluation

Flat Hierarchy

Cutting Edge

Technology

Trading through

Computers

© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited

Why Quant Trading

Programming

Trading

Quant Trading

Implementing Ideas

Direct Approach to Making Money

© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited

Bazaar – Since Ever

• Participants are Producers, Consumers

• Mix of Barter & Coinage

• Trading Roles – Hedgers, Traders, Arbitrageur

• Speed of information travelled at the speed of Horse/Bullock

• Mostly Physical Trading

© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited

The Native Share & Stock Brokers' Association

• Now known as Bombay Stock Exchange

• Set up in 1877

• Trading in ownership rights of the firms

• Variously called as ‘allotments’, ‘scrips’ and ‘shares’

• Delivery based Trading

• Trading was localized – through brokers

• Pit Traders, Brokers

© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited

Circa 1992

• Screen Based Trading System

• Localized behavior of the exchange was now globalized

• Anonymity of Orders

• Costs and Errors Reduced

• Reduction in manipulation

• Derivatives and Dematerialization

© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited

Now

• Trade matches in microseconds

• Complete Transparency

• Volumes are all time high

• Complex Instruments, Derivatives

• Extremely Democratic

• Much better control over Trading

© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited

Concepts of Diverse fields

Statistics

Finance

Computer Science

Psychology

Economics

Operations Research

History

Mathematics

Strategy

© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited

Search For Alpha

• Alpha is the ability to predict the future. Alpha is defined as the additional return over a naive forecast.

• Finding alpha is the job of a quant research analyst.

• Alpha comes from following sources:1. Information2. Modeling3. Speed

© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited

Speed First

• Simplest of All sources.

• For two strategies, doing the same, the faster one will do better.

• Understanding and Implementing this is simpler and more objective

© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited

Having an Estimate is Better than None at all

• Informational Alpha is sources of information1. Proprietary information sources2. Tick by Tick 3. Extraneous sources

• Modeling Alpha is development of Trading Models1. Models provide trading edge2. Valuation, Hedging etc.

© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited

Quantitative Trading Segmentation

Market Making

Get Inside the bid-ask spread and buy low, sell high

Arbitrage Take Advantage of things trading at different prices on different exchanges or through similar instruments

Momentum If it goes up, it keeps going up

Mean Reversion

If it has gone up, then it is bound to come back

© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited

Consequence of Definition

• Strategy must finish the day flat, HFTs must exhibit balanced bi-directional (i.e. “two-way”) flow

• HFTs can't accumulate large positions

• HFTs can't deploy large amounts of capital

• HFTs have little need for outside capital or leverage, and tend to be proprietary traders

• HFTs can't “blow up” (they don't use much leverage, and don't have much capital, so they can't lose much capital!)

Workshop on Algorithmic & High Frequency Trading

© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited

Understanding HFT

• HFTs take the opposite side of trades of long-term investors

• Long term investors impact many securities besides the ones they are directly trade, because stocks are correlated

• This creates opportunities for Statistical Arbitrageurs, whose activity keeps correlated stocks “fairly priced” with respect to one another

• r• HFT comes in, when volatility is high, liquidity is in short

supply, and it becomes very profitable to provide it• HFTs benefit from volatility, so they can not cause it

© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited

Contrasting HFT and Long Term Investing

Workshop on Algorithmic & High Frequency Trading

HFT Long Term Investing

Profit Margins Small Large

Transaction Costs Small Large

Capital Requirements

Small Large

Consistency of Profits

High Low

Total Profit Potential Small Large

© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited

Economics of HFT

• Opportunities for short-term returns follow a Gaussian (Normal) distribution

– large expected returns are rare; tiny expected returns are abundant

• HF Traders target opportunities that are tiny (expected returns ~ 0.15 Rs before costs)

• Long-term investors don't have the cost-structure to target such trades! (Cost being 0.35 Rs)

• typical HF trade: expected return = 0.15 Rs after costs, standard deviation = +/- 5 Rs

• The risk/reward of such trades is not meaningful to long-term investors

© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited

Economics of HFT

• Small returns are appealing to HFT because they are very plentiful

• typical HF trade: expected return = 0.15 Rs after costs, standard deviation = +/- 6 Rs

• after 100 such trades: expected return = 0.15 Rs; standard deviation = +/- 0.6 Rs

• if one does 100 such trades per day, for full year: sharperatio of 4.0

• if one does 10,000 such trades per day, for full year: sharperatio of 40.0

© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited

Capturing HFT opportunities requires use of advanced technology

© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited

Vicious Cycle

More Volumes

Lower Costs

More Opportunities

Higher volumes lead to gains in efficiency through the use oftechnology, leading to lower transaction costs. Technologyis the enabler of the virtuous cycle, but cost is the driver.As costs approach zero, volumes will peak as a result.

© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited

Market-making opportunities arise because long-term investors desire immediacy when making trades

T1 = 10 AM T2= 11 AM

Investor 1 comes to buy shares at 100.05 or lower

Investor 2 comes to sell shares at 99.95 or higher

Investor 1 has to wait for 1 hour to find a Counterparty

T1 = 10 AM T2= 11 AM

Investor 1 comes to buy shares at 100.05 or lower

Investor 2 comes to sell shares at 99.95 or higher

Investor 1 buys from HFT at 100.05 at 10 am and Investor 2 sells to HFT at 11 am

© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited

Statistical Arbitrage

Reliance Futures

Reliance Put/Call

Nifty Put/Call

Nifty Futures

Reliance Stock

Statistical correlations arise because securities are driven by systematic factors such as inflation, regulatory policies, currency prices, economic growth, and so on. Because there are far fewer systematic drivers than there are securities which

depend on them, correlation between securities is guaranteed to exist!

© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited

Understanding HFT

Structural correlations tend to be strong, steady, and robust.

profitable opportunities tend to be very easy to identify, and are thus heavily competed for.

Competition prevents structural price divergences from growing large – Small bets

tremendous speed is required in order to access them before competitors

mainstay of HFTs, who specialize in fast trading

Statistical correlations tend to be weak, time-varying, and non-stationary

profitable opportunities based on statistical correlations tend to be harder to model, and more persistent in terms of their duration

size and duration of these opportunities facilitates large bet-sizes and overnight positioning

Such opportunities tend to be favoured by large quantitative hedge funds specializing in statistical analysis

Structural vs Statistical Correlations

© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited

E-PAT course structure

Core Content

Statistics and Econometrics

Financial Computing & Technology

Algo & Quant trading

© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited

E-PAT Course Structure: Statistics and Econometrics

Core Content

Statistics and Econometrics

Financial Computing & Technology

Algo & Quant trading

Basic Statistics

Advanced Statistics

Time Series Analysis

Probability and Distribution Statistical Inference Linear Regression

Correlation vs. Co-integration ARIMA, ARCH-GARCH Models Multiple Regression

Stochastic Math Causality Forecasting

© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited

E-PAT Course Structure: Financial Computing & Technology

Core Content

Statistics and Econometrics

Financial Computing & Technology

Algo & Quant trading

Programming

Technology for Algorithmic Trading

Statistical Tools

Intro to Programming Language(s) Programming on Algorithmic

Trading Platforms Linear Regression

System Architecture Understanding an Algo Trading

Platform Handling HFT Data

Excel & VBA Financial Modeling using R Using R & Excel for Back-testing

© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited

Core Content

Statistics and Econometrics

Financial Computing & Technology

Algo & Quant trading

Trading Strategies

Derivatives & Market Microstructure

Statistical Tools

Statistical Arbitrage Market Making Strategies Execution Strategies Forecasting & AI Based Strategies Machine readable News based Trend following Strategies

Option Pricing Model Time Structure of Volatility Dispersion Trading Volatility Forecasting & Interpretations Managing Risk using Greeks Position Analysis Order Book Dynamics Market Microstructure

Hardware & Network Regulatory Framework Exchange Infrastructure & Financial

Planning (Costing) Handling Risk Management in

Automated systems

E-PAT Course Structure: Financial Computing & Technology

© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited

E-PAT course mapping

© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited

Program Delivery

• Part-time program– 3 hrs sessions on Saturday & Sunday both– 4 months long program– 100 contact hours including practical sessions

• Convenience - webinars• Open Source

• Virtual Classroom integration

• Student Portal

© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited

Mapping Skill Set

Trading Knowledge

Software Development

Quantitative Skills

Trading Sales Trading Algo Trading BrokingAsset

management – Mid Office

Asset management

– Front Office

© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited

Opportunities for Technologists

Brokerages/Banks Trading

Trading Front

Office

Asset Management/MF

Hedge Funds, Prop Funds

–Modeling, Coding –Excel

– 20-25 L

Proprietary Trading

Hedge Funds, Prop Funds

– Trading, Modeling (MATLAB, R, Kdb)

– 25-50 L

Trading

Mid

Office

Quants, Sales Trading

Banks, Brokerages

–Modeling, Coding-MATLAB/R/Excel

– 12-18 L

Technology, Operations

Hedge Funds, Prop Funds

–Development (C++, Java, Python)

– 20-30 L

© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited

Opportunities

© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited

Opportunities

© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited

Entrance Test

• Check your pre-requisite knowledge by taking the entrance test:

http:/www.quantinsti.com/epat_scholarship_test.php

© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited

Coming dates

• http://www.quantinsti.com/importantdates.html

© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited

Q&A

• Please type your questions in the chat window.