FE8827 Q UANTITATIVE T RADING S TRATEGIES PROJECT H IGH F REQUENCY T RADING U SING R EGIME S WITCHING S TRATEGY Huynh Gia Huy (G1000176L) Le Hoang Thai.

Slides:



Advertisements
Similar presentations
An Example of Quant’s Task in Croatian Banking Industry
Advertisements

A real-time adaptive trading system using Genetic Programming QF5205 : Topics in Quantitative Finance Donny Lee Nadim Mouchonnet.
Foundations of Technical Analysis: Computational Algorithms, Statistical Inference, and Empirical Implementation Written by Andrew W.Lo, Harry Mamaysky,
Quantitative Stock Selection Portable Alpha Gambo Audu Preston Brown Xiaoxi Li Vivek Sugavanam Wee Tang Yee.
Aggregating local image descriptors into compact codes
Part II – TIME SERIES ANALYSIS C3 Exponential Smoothing Methods © Angel A. Juan & Carles Serrat - UPC 2007/2008.
On the pulse of the property world Transaction based indices for the UK commercial property market Steven Devaney (University of Aberdeen) Roberto Martinez.
Data Mining Feature Selection. Data reduction: Obtain a reduced representation of the data set that is much smaller in volume but yet produces the same.
Frequency modulation and circuits
Introduction price evolution of liquid stocks after large intraday price change Significant reversal Volatility and volume stay high NYSE-widen bid-ask.
Time Series Analysis. Time-Series Numerical data obtained at regular time intervals The time intervals can be annually, quarterly, monthly, daily, hourly,
Sándor Bozsik (Ph.D) Miskolc University Hungary. In efficient market the NPV of all investment decisions is 0. Assumptions:  Information efficiency 
A Generalized Model for Financial Time Series Representation and Prediction Author: Depei Bao Presenter: Liao Shu Acknowledgement: Some figures in this.
Statistical Arbitrage Trading Model Abstract: An important tool for financial traders in this technology age is effective models that can systematically.
Simple Linear Regression
NCKU CSIE CIAL1 Principles and Protocols for Power Control in Wireless Ad Hoc Networks Authors: Vikas Kawadia and P. R. Kumar Publisher: IEEE JOURNAL ON.
Rajesh Shekhar Data Mining Prof. Chris Volinsky. ◦ Use Data Mining techniques to build a portfolio with superior return/risk characteristics using technical.
PREDICTABILITY OF NON- LINEAR TRADING RULES IN THE US STOCK MARKET CHONG & LAM 2010.
Week 14 Portfolio Insurance. Portfolio Insurance (1) Recall that managers can use puts to keep a floor on their portfolio. However, puts can be very expensive.
Market efficiency Specific meaning of the term “market efficiency” in financial economics: “security prices fully reflect all available information” So…
Portfolio Construction. Introduction Information analysis ignored real world issues. We now confront those issues directly, especially: –Constraints –Transactions.
Statistical Arbitrage in the U.S. Equities Market.
Behavioral Forecasting MS&E 444: Final Presentation Rachit Prasad, Sudeep Tandon, Puneet Chhabra, Harshit Singh Stanford University.
Review Bond Yields and Prices.
Equities Rob Graffeo Dec 14, What is a stock?
Presented by Arun Qamra
Cmpt-225 Simulation. Application: Simulation Simulation  A technique for modeling the behavior of both natural and human-made systems  Goal Generate.
Quantitative Trading Strategy based on Time Series Technical Analysis Group Member: Zhao Xia Jun Lorraine Wang Lu Xiao Zhang Le Yu.
Copyright © 2000 by Harcourt, Inc. All rights reserved Chapter 15 The Term Structure of Interest Rates.
NEURAL NETWORKS FOR TECHNICAL ANALYSIS: A STUDY ON KLCI 授課教師:楊婉秀 報告人:李宗霖.
Normalised Least Mean-Square Adaptive Filtering
Joel Wissing S&P 500 emini futures April 26-28Calgary
By Benziger Alice Priyanka Snehal Khair Prakash SuseendranVigeendharan Tiwari Ashutosh.
A N OPTIMAL RELIABILITY ALLOCATION METHOD FOR DIGITAL SUBSTATION SYSTEMS Y UZHOU H U, P EICHAO Z HANG, Y ONGCHUN S U, Y U Z OU Adviser: Frank, Yeong-Sung.
GROUP 5. Outline  Weekly Group Update  Update on Table 6 (2007 paper)  Update on Table 2 (2007 paper)  Plans for the 2008 paper.
Alternative Measures of Risk. The Optimal Risk Measure Desirable Properties for Risk Measure A risk measure maps the whole distribution of one dollar.
Chapter 6 & 7 Linear Regression & Correlation
GROUP 5. Outline  Weekly Group Update  Information gathered this week  Current road blocks  Goals for next week.
COMM W. Suo Slide 1. COMM W. Suo Slide 2  Random Walk - stock price change unpredictably  Actually stock prices follow a positive trend.
And, now take you into a WORLD of……………...
Sponsor: Dr. K.C. Chang Tony Chen Ehsan Esmaeilzadeh Ali Jarvandi Ning Lin Ryan O’Neil Spring 2010.
1 Lecture 3: March 6, 2007 Topic: 1. Frequency-Sampling Methods (Part I)
0 Presentation by: Austin Applegate Michael Cormier Paul Hodulik Carl Nordberg Nikki Zadikoff Global Asset Allocation February, Granite Investments.
Estimating Credit Exposure and Economic Capital Using Monte Carlo Simulation Ronald Lagnado Vice President, MKIRisk IPAM Conference on Financial Mathematics.
Chapter 7 Sampling Distributions Statistics for Business (Env) 1.
Statistical Arbitrage Ying Chen, Leonardo Bachega Yandong Guo, Xing Liu February, 2010.
September Bound Computation for Adaptive Systems V&V Giampiero Campa September 2008 West Virginia University.
Neural Network Implementation of Poker AI
Real Estate vs Stock Market: approaching the required rate of return through the Treynor and Black model Joan Montllor-Serrats (Universitat Autònoma de.
Haksun Li
Optimal portfolios and index model.  Suppose your portfolio has only 1 stock, how many sources of risk can affect your portfolio? ◦ Uncertainty at the.
A NOVEL METHOD FOR COLOR FACE RECOGNITION USING KNN CLASSIFIER
Covariance Estimation For Markowitz Portfolio Optimization Team = {Ka Ki Ng, Nathan Mullen, Priyanka Agarwal,Dzung Du, Rez Chowdhury} Presentation by Rez.
CHAPTER 5 CORRELATION & LINEAR REGRESSION. GOAL : Understand and interpret the terms dependent variable and independent variable. Draw a scatter diagram.
Forecasting Implied Volatility Alpha Asset Management Roger Kramer Brian Storey Matt Whalley Kristen Zolla.
Market Forecasting using (2D) 2 PCA + RBFNN BY: DANNY SANCHEZ.
1 1 Slide Simulation Professor Ahmadi. 2 2 Slide Simulation Chapter Outline n Computer Simulation n Simulation Modeling n Random Variables and Pseudo-Random.
Run length and the Predictability of Stock Price Reversals Juan Yao Graham Partington Max Stevenson Finance Discipline, University of Sydney.
Mean Reverting Asset Trading Research Topic Presentation CSCI-5551 Grant Meyers.
Framework. Notation r=vector of excess returns –Bold signifies vectors and matrices. We denote individual stock excess returns as r n. –Excess above risk.
ONETICK ® Accelerating Quant Research and Trading Principal Component Analysis & Multi-Factor Modeling Tests with OneTick & R Historical & Real-Time 7.
CIVET seminar Presentation day: Presenter : Park, GilSoon.
Market-Risk Measurement
TD Strategies QF206: Quantitative Trading Strategies
BIG NIKKEI [INSERT WITTY TAGLINE] QF206 March2017
The Opening Bell Deviation Theory
The Opening Bell Deviation Theory
Review Fundamental analysis is about determining the value of an asset. The value of an asset is a function of its future dividends or cash flows. Dividends,
Overview : What are the relevant factors? What are the
Overview & backtesting
Presentation transcript:

FE8827 Q UANTITATIVE T RADING S TRATEGIES PROJECT H IGH F REQUENCY T RADING U SING R EGIME S WITCHING S TRATEGY Huynh Gia Huy (G L) Le Hoang Thai (G G)

R EFERENCE “Developing High-Frequency Equities Trading Models”, Leandro Rafael Infantino, Savion Itzhaki, MBA thesis, MIT, June 2010.

C ONTENTS Simply Guide Model Building: motivation, trading ideas, potential problems and implementation. Simulation Results: without/with transaction costs, development from the thesis. Weaknesses of Trading Signals in the Thesis and Proposed Improvement: mean reverting signals and regime switching signals.

S IMPLE G UIDE To display performance statistics, run rsperf.m file: rsperf(index, rf, lossthreshold) Input: index = 1: regime switching with transaction costs. index = 2: regime switching without transaction costs. index = 3: mean reverting with transaction costs. index = 4: mean reverting without transaction costs. rf: risk free rate lossthreshold: omega loss threshold Ouput: Omega ratio, Sharpe ratio, Omega Sharpe ratio, MaxDD (max drawdown) and MaxDDD (max drawdown duration).

S IMPLE G UIDE To start trading strategies, run regswitch.m file. In this file, turn on/off regime switching by setting regimeSwitching variable to 1 to turn on and 0 to turn off. regimeSwitching = 1; % default value Change line 32 in this file to run simulation for a period of time. Default is whole year running from week 1 to week 52. for week=1:52

M ODEL BUILDING - M OTIVATION In high frequency environment, high precision of the stock return prediction is not required. Fundamental Law of Active Management IR: Information Ratio IC: Information Coefficient (our skill) Breadth: “the number of independent forecasts of exceptional return made per year” Breadth very big => IC can be relatively small => prediction can be less precise

M ODEL BUILDING - T RADING IDEAS Use Principle Component Analysis (PCA) as the basis to compute cumulative returns Depending on the current strategy (mean- reversion or momentum), trading signals are generated if observed cumulative returns differ from model cumulative returns. Predicted – observed > threshold => buy (sell) Predicted – observed sell (buy)

D IFFERENCES BETWEEN THIS PROJECT AND THE PAPER Number of stocks used in the simulation: only first 10 stocks (instead of 50) are chosen to represent the stock universe. Data source: the primary data used in this project is obtained from Thomson Reuters Tick History database, and from two major exchanges: NASDAQ and NYSE; whereas prices used in the thesis are from top of the book bid-ask quotes. Model parameters: various model parameters are not specified in the thesis, thus simulation results can be affected by the choice of different parameter values. Transaction costs are included. Signal in the thesis is found insufficient and has been modified to improve stabilty and performance of returns.

M ODEL BUILDING - P OTENTIAL PROBLEMS - DATA VOLUME Huge volume of data: more than 15Gbs of one year tick data to process (and that’s only for 10 stocks). Simulation time can be very long because of this. Code optimization is important!

I MPLEMENTATION Matlab is chosen as it provides many built-in mathematics functions suitable for rapid model development. Pre-process data before running simulation: Only one mid-price per second per stock Need to duplicate values for missing seconds in raw data. Processed data saved in separate.csv files. Run simulation based on processed data. All daily returns are saved in.csv files.

S OME CODE OPTIMIZATION TECHNIQUES Always pre-allocate memory for matrix and avoid changing matrix size constantly. Avoid loop as much as possible and make use of Vectorization (performance increased dramatically!) Use Matlab profiler to identify areas for improvement. Normal for loopVectorization i = 0; for t = 0:.01:10 i = i + 1; y(i) = sin(t); end t = 0:.01:10; y = sin(t);

S IMULATION RESULTS - THESIS Mean-reversion strategy, without transaction cost.

S IMULATION RESULTS – THIS PROJECT Mean-reversion strategy, without transaction cost.

S IMULATION RESULTS – THIS PROJECT Mean-reversion strategy, without transaction cost. Omega: (Loss threshold: 0) Sharpe: Omega Sharpe: Max Drawdown: Max Drawdown duration: 73 days.

S IMULATION RESULTS - THESIS Regime switching strategy, without transaction cost.

S IMULATION RESULTS – THIS PROJECT Regime switching strategy, without transaction cost.

S IMULATION RESULTS – THIS PROJECT Regime switching strategy, without transaction cost. Omega: (Loss threshold: 0) Sharpe: Omega Sharpe: Max Drawdown: Max Drawdown duration: 226 days.

C OMMENTS The different simulation results between this project and thesis can be due to: Different stock universe Different data source (therefore different mid-prices) Parameters used (thresholds). In the thesis, transaction cost is not taken into account and it is a important factor to consider in high frequency trading model. All profits can be erased by transaction cost. Next step for this project: include transaction cost! To be realistic, transaction cost from Interactive Brokers is used; that is, $0.005 / share / trade

T RANSACTION COSTS : M ODIFICATIONS TO EXISTING STRATEGY In an attempt to factor in the transaction cost, the trading model is modified. Two potential places: Mark-up the threshold by the transaction cost, i.e. new threshold = threshold + transaction cost Lower the log returns. Use this new log returns as input for Principal Components Analysis log_return = log[(current_price - cost) / previous_price + cost)] This project uses the second approach.

S IMULATION RESULT – MODIFIED MODEL Mean-reversion strategy, with transaction cost.

S IMULATION RESULTS – THIS PROJECT Mean-reversion strategy, with transaction cost. Omega: (Loss threshold: 0) Sharpe: Omega Sharpe: Max Drawdown: Max Drawdown duration: 68 days.

S IMULATION RESULT – MODIFIED MODEL Modified regime switching strategy, with transaction cost.

S IMULATION RESULTS – THIS PROJECT Mean-reversion strategy, with transaction cost. Omega: (Loss threshold: 0) Sharpe: Omega Sharpe: Max Drawdown: Max Drawdown duration: 248 days.

W EAKNESSES OF THE TRADING SIGNALS IN THE THESIS – P ROPOSED I MPROVEMENTS Mean reverting signal: In the thesis, if mean reverting signal > 0, we buy and sell when signal < 0. It includes noise due to rounding or computational issues. Solution: set a threshold to filter away noise that creates fault trades. This threshold after trial and error has been determined to be (parameter 1)

W EAKNESSES OF THE TRADING SIGNALS IN THE THESIS - P ROPOSED I MPROVEMENTS Regime Switching Signals: The authors use difference in two consecutive Euclidean distance to signal the regime switching: If E H (t) - E H (t-1) > 0: momentum regime If E H (t) - E H (t-1) < = 0: mean reverting regime This signals introduce noise and cause fault signals and consequently fault trades.

W EAKNESSES OF THE TRADING SIGNALS IN THE THESIS - P ROPOSED I MPROVEMENTS Regime Switching Signals – Noise Diagram of Euclidean distance difference (E H (t) - E H (t-1)) is shown above. According to the authors, the strategy keeps changing the regimes as signals swing around 0 from positive to negative.

W EAKNESSES OF THE TRADING SIGNALS IN THE THESIS - P ROPOSED I MPROVEMENTS Regime Switching Signals – Fault Signals Diagram of Euclidean distance difference (E H (t) - E H (t-1)) is shown above and Euclidean distance(E H (t)) below. One strong pulse in E distance creates one regime switching signal but it contains one up pulse and one down pulse in E distance difference. According to the authors, it creates two signals that causes the system to switch back and forth (mean reverting -> momentum -> mean reverting) within <150 seconds.

W EAKNESSES OF THE TRADING SIGNALS IN THE THESIS - P ROPOSED I MPROVEMENTS Regime Switching Signals – Noise – Solution We set a threshold of 2 standard deviation to filter out noise (parameter 2). Magnitude falls between ± 2 std dev is considered insignificant. Instead of using differences of 2 consecutive E distance (E H (t) - E H (t-1)), we use E H (t) – ewma5(E H (t)) where ewma5(E H (t)) is equally weighted moving averages value of previous 5 seconds of E distance (parameter 3). Ignore 2 consecutive regime switching signals fall into a timespan of less than 250 seconds to remove fault signals (parameter 4).

C ONCLUSIONS Simulation returns are very sensitive to parameters used. All 4 parameters can be improved by employing optimization. Due to the time constraint, we leave this part for future development.