Big Data to trade bonds/fx & Python demo on FX intraday vol



Similar documents
Using Macro News Events in Automated FX Trading Strategy

Using Macro News Events in an Automated FX Trading Strategy.

BIG DATA FUNDAMENTALS

Using Foreign Exchange Markets to Outperform Buy and Hold

Understanding & Realizing Big Data Potential

From Particles To Electronic Trading. Simon Bevan

Big Data and High Quality Sentiment Analysis for Stock Trading and Business Intelligence. Dr. Sulkhan Metreveli Leo Keller

Machine Learning and Algorithmic Trading

Danny Wang, Ph.D. Vice President of Business Strategy and Risk Management Republic Bank

Financial Text Mining

White Paper Electronic Trading- Algorithmic & High Frequency Trading. PENINSULA STRATEGY, Namir Hamid

The Handbook of News Analytics \ in Finance

Statistical Challenges with Big Data in Management Science

Contents Risk Disclaimer... 3 Introduction... 4 Choosing the Right Broker... 4 The Financial Markets... 5 The Forex Market...

HedgeChatter Case Study: Stock Price Manipulation Detection

Sentiment Analysis. D. Skrepetos 1. University of Waterloo. NLP Presenation, 06/17/2015

Black Box Trend Following Lifting the Veil

Big Data better business benefits

Moody s Analytics Solutions for the Asset Manager

To receive highlights of the information on this page delivered directly to your inbox, please register here.

Algorithmic Presentation to European Central Bank. Jean-Marc Orlando, EFX Global Head BNP PARIBAS

Synergy Funds Management. Synergy Financial Markets. Create Your Financial Future by Investing with

IPI s 2012 Fall Forum - San Francisco Hedging Portfolio Risk

Using Text and Data Mining Techniques to extract Stock Market Sentiment from Live News Streams

at ICAP: RESET & ReMATCH

There is a shortening time cycle in the

Social Business Intelligence For Retail Industry

Exploring Big Data in Social Networks

Market Trends in Finance & Technology / An Open Platform for Business Growth

MICHAEL HODGES AND BRETT COOPER

ValueCharts TradeStation

Big Data Analytics: 14 November 2013

How Big Is Big Data Adoption? Survey Results. Survey Results Big Data Company Strategy... 6

A Flexible Benchmark Relative Method of Attributing Returns for Fixed Income Portfolios

WHITE PAPER Closing the Loop on Social Leads. A Hootsuite & 2DiALOG HubSpot White Paper

5 Point Social Media Action Plan.

Investment Portfolio Management and Effective Asset Allocation for Institutional and Private Banking Clients

Investment Insight Diversified Factor Premia Edward Qian PhD, CFA, Bryan Belton, CFA, and Kun Yang PhD, CFA PanAgora Asset Management August 2013

FX Strategies. In the Low Yield Environment. Eddie Wang Head of FX Structuring, Asia. Hong Kong October 2010

Fixed Income Training Seminar Asset Management Experience

Pattern Recognition and Prediction in Equity Market

Apigee Insights Increase marketing effectiveness and customer satisfaction with API-driven adaptive apps

UPDATE ON CURRENT MACRO ENVIRONMENT

THOMSON ONE INVESTMENT MANAGEMENT

Are Unconstrained Bond Funds a Substitute for Core Bonds?

SOLUTION BRIEF. TIBCO StreamBase for Foreign Exchange

Singapore Exchange. Optionality Opportunities in the Asian Gateway. Mr Rick Aston, SVP Head of Institutions Singapore Exchange Limited

Introduction to Equity Derivatives

Hedging Illiquid FX Options: An Empirical Analysis of Alternative Hedging Strategies

QUANTIFYING THE EFFECTS OF ONLINE BULLISHNESS ON INTERNATIONAL FINANCIAL MARKETS

Separately Managed Accounts in Counterparty Risk Management

Using Currency Futures to Hedge Currency Risk

WHAT IS AN RSS FEED & WHY IS IT SO IMPORTANT?

Handbook for finding the right FX Broker

THE FIXED INCOME DILEMMA: Rethinking Fixed Income with a Global Perspective AN NEI REPORT UPDATED AS AT JUNE 30, 2015

The technical analysis indicators

Whether you re new to trading or an experienced investor, listed stock

Big Data. What is Big Data? Over the past years. Big Data. Big Data: Introduction and Applications

Evolution of Performance Attribution Methodologies. Carl Bacon Round-Table Performance Attribution Zurich, 23 rd June 2004

FX OPTION PERFORMANCE: LONG TERM ANOMALIES, OPPORTUNITIES AND HEDGING STRATEGIES BY JESSICA JAMES

Introduction to Engineering Using Robotics Experiments Lecture 17 Big Data

Big Data, Official Statistics and Social Science Research: Emerging Data Challenges

TRADING & FINANCIAL MARKET ANALYSIS 2015 CAREER TRADING WITH AMPLIFY TRADING

ALFA FINANCIAL L.L.C. Licensed and Regulated by the Central Bank of the U.A.E.

How To Trade An Exchange Traded Fund

Why ECB QE is Negative for Commodities. Investment Research & Advisory. Deltec International Group

Market Implied Ratings FAQ Updated: June 2010

Managed Futures Counter-Trend vs. Trend Following. Executive Briefing

Haksun Li MY EXPERIENCE WITH ALGORITHMIC TRADING

Big Data / FDAAWARE. Rafi Maslaton President, cresults the maker of Smart-QC/QA/QD & FDAAWARE 30-SEP-2015

TECHNICAL ANALYSIS & SYSTEMATIC TECHNICAL TRADING (Chart and Non-Chart Based) IS A ONE DAY EXECUTIVE WORKSHOP

CSC590: Selected Topics BIG DATA & DATA MINING. Lecture 2 Feb 12, 2014 Dr. Esam A. Alwagait

Text Analytics Beginner s Guide. Extracting Meaning from Unstructured Data

Trading Platform Guide

NEW TO FOREX? FOREIGN EXCHANGE RATE SYSTEMS There are basically two types of exchange rate systems:

decidedly different Catalyst Mutual Funds Brochure

How To Get A Better Return From International Bonds

10 Steps To Getting Started With. Marketing Automation

JPMorgan Global Bond Fund. Global investing - A less volatile choice NEW. SFC-authorised global bond fund with RMB-hedged share classes*!

High-frequency trading: towards capital market efficiency, or a step too far?

Study on the Volatility Smile of EUR/USD Currency Options and Trading Strategies

Collaborations between Official Statistics and Academia in the Era of Big Data

Digitization of Financial Markets: Impact and Future

Big Data and Open Data

Foreign Exchange. The world s largest market, turning over USD 5.4 trillion a day.

Machine Data Analytics with Sumo Logic

Transcription:

Big Data to trade bonds/fx & Python demo on FX intraday vol Saeed Amen, Quantitative Strategist Managing Director & Co-founder of The Thalesians @thalesians / commentary around finance saeed@thalesians.com June 2015

Outline Big Data to trade bonds/fx What is Big Data? What type of data is available? Understanding difference between structured and unstructured news data Case study: using RavenPack Macro news analytics to trade FX and bond futures Discussion of RavenPack s news analytics dataset Create longer term news based economic sentiment indices to mimic economic surprise indices to systematically trade FX and bond futures & applying a news volume based indicator for FX carry Python demo Deciphering FX intraday volatility patterns

What is Big Data? What type of data is available?

What is Big Data? IBM: Every day, we create 2.5 quintillion bytes of data so much that 90% of the data in the world today has been created in the last two years alone. This data comes from everywhere: sensors used to gather climate information, posts to social media sites, digital pictures and videos, purchase transaction records, and cell phone GPS signals to name a few. This data is Big Data. Wikipedia: Big Data is an all-encompassing term for any collection of data sets so large or complex that it becomes difficult to process them using traditional data processing applications. But how many people really use Big Data, in particular in trading? Not as many people as you might think!

What type of data is available? News wires Dow Jones, Bloomberg, Reuters Social media Twitter, Flickr, Facebook Web Wikipedia, blogs, PR news releases Search Google Examples of large structured data sets Bloomberg terminal product and machine readable Reuters machine readable news RavenPack Dow Jones, web and PR machine readable Knowsis Twitter web product and machine readable Estimize crowdsourcing analyst estimates web product and machine readable And many more

A fun example Happiness measured via tweets Hedonometer Index from University of Vermont we can actually extract trading signals from this! 6.4 6.3 6.2 6.1 6 5.9 5.8 Sep 08 Sep 10 Sep 12 Sep 14 6.030 6.025 6.020 6.015 6.010 6.005 6.000 5.995 5.990 5.985 5.980 5.975

THE THALESIANS Understanding difference between structured & unstructured news data Unstructured news data Read news articles, blogs etc. in their raw text form and then directly apply text based analysis to gauge sentiment Need to handle large amounts of data and also need to do natural language processing, which is non trivial Structured news data Vendors processes a large amount of news from numerous sources into a more manageable dataset for us to explore Data more easily accessible with precomputed sentiment scores/volume reading Traders can concentrate on creating effective trading rules and running risk, rather than spending that time dealing with massive quantities of unstructured news and text analysis.

Case study: using RavenPack Macro news analytics to trade FX and bond futures

Automating news filtering Using news to trade markets is not new idea A trader essentially filters news into the signal and the noise How can we read news in automated fashion Raw news data stream - apply text analysis on actual news articles Use pre-made news time series generated by vendors using keywords/topic identification Easier to use pre-made news time series However, what news filters do we use? How can we convert news time series to buy/sell? 9

General approach Steps to follow to understand how news data can be used to trade markets First: Analysing text from news articles/headlines (RavenPack does this step!) Second: Aggregate RavenPack data by time frequency Third: Create a sentiment index for specific areas of interest Fourth: Apply a trading rule to the sentiment index

First: Analysing text from news articles/headlines THE THALESIANS Use structured news data, which reduces our workload RavenPack Macro 4.0 Web, Dow Jones and PR editions combined For each news event captured a record containing a number of different fields are output Timestamp of publication In UTC time with a millisecond timestamp Focus of the publication Includes details on the country and the general subject of the news Use these fields later to filter news for example for US news related to the economy Positive/negative nature of news Scaled from 0 to 100, where >50 is positive, <50 is negative (and 50 is neutral) Use this later for identifying the bullishness/bearishness of an article for trading purposes (Event sentiment score ESS) Measures of the relative novelty of news Newer news as opposed to repeated headlines scores higher (Event Novelty score ENS) Prevalence of news Identify the number of positive or negative events for a certain entity (Aggregate Event Sentiment AES) and also the general news volume on an entity (Aggregate Event Volume AEV) Source of the news and the RavenPack product edition A full list is available from RavenPack

Second: Aggregate RavenPack data by time frequency Our objective is to create a daily signals trading at local bond market closes (differs for each bond market) RavenPack data is available throughout the day on a high frequency basis Gives us control over a precise cut off point for trading purposes

Third: Create a sentiment index for specific areas of interest Topics are business economy environment politics society Use as an input ESS to give positive/negative signals Topics are further subdivided into groups We shall mainly focus on the economy topic THE THALESIANS

Fourth: Apply a trading rule to the sentiment index THE THALESIANS Apply our sentiment filter to trade assets Our focus will be on G4 sovereign bonds (US, Japan, Germany and UK) We have assumed equal sized notionals for our bond futures baskets and also reported returns in local currency In practice, you might consider vol or liquidity weighting bond exposure and report in an investors home currency (as well as considering hedging) Later, small section on FX

Economic surprise indices Understand the relationship between economic surprise indices and macro assets Clearly, there is a strong correlation, we can also fade longer term moves Can we mimic using news data, which corresponds to a richer set of events? 150 Citi US Economic Surprise Index (LHS) 3M Ret UST 10Y future -15% 2 100 50 0-50 -10% -5% 0% 5% 0-2 -4-100 10% -6-150 -200 2003 2006 2009 2012 15% 20% -8 UST 10Y future UST 5Y future UST 2Y future UST 2-10Y future EURUSD S&P500

News based economic sentiment indices THE THALESIANS Use the economy topic classified by RavenPack Aggregate high frequency news data into daily data Apply smoothing and adjust for volume changes Objective is to create slower moving sentiment indicator Business Economy Environment Politics Society 200 Citi US Economic Surprise Index (LHS) US NBESI 2.00 100 1.00 0 0.00-100 -1.00-200 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014-2.00

Distribution of returns based on NBESI THE THALESIANS We have examined what returns are for UST 10Y futures for an entire month We have bucketed the values for falling/rising news sentiment Large numbers, because we over 15 years and we enter a new position every day Total TY1 1M return in following period 200% Falling News Sentiment Rising News Sentiment 100% 0% -100% -1.5-1.5 / - 1.25-1.25 / -1-1 / - 0.75-0.75 / -0.5-0.5 / - 0.25-0.25 / 0 0 / 0.25 0.25 / 0.5 0.5 / 0.75 0.75 / 1 1 / 1.25 1.25 / 1.5 US News Based Economic Sentiment Index (NBESI)

Relationship between G4 bond markets THE THALESIANS Vol adjust G4 returns tend to be highly correlated We shall utilise this observation to also use US NBESI as filter for rest of G4 Rationale is that US is a major driver for other bond markets 350 250 150 UST 10Y future vol adj Bund future vol adj Long Gilt future vol adj JPN 10Y future vol adj US10Y DE10Y GB10Y JP10Y US10Y 68% 65% 35% DE10Y 68% 85% 38% GB10Y 65% 85% 33% JP10Y 35% 38% 33% 50 2001 2003 2005 2007 2009 2011 2013

Trading G4 bond futures with NBESI 225 175 125 Buy bonds when NBESI is falling and negative (ie. worsening economic environment which is typically associated with better bond performance) and hold position till we reach an extreme Filtering by US NBESI has best returns, followed by local NBESI Includes transaction costs & we have adjusted futures to create a continuous series (roll costs executed) Long Only Ret=4.3% Vol=5.5% IR=0.79 Dr=-9.5% US NBESI Ret=4.8% Vol=4.2% IR=1.14 Dr=-7.1% Local NBESI Ret=4.5% Vol=4.4% IR=1.03 Dr=-7.2% 1.2 1.0 0.8 0.6 0.4 0.2 Long only IR US NBESI IR Local NBESI IR 75 2001 2003 2005 2007 2009 2011 2013 0.0 US 2Y US 5Y US 10Y US 30Y DE 2Y DE 5Y DE 10Y DE 30Y GB 10Y JP 10Y

2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 THE THALESIANS Trading US bond spreads with NBESI Applying a similar trading rule we trade spreads across the US Treasury curve Buy longer dated bond futures and fund with shorter dated ie. a carry style trade Applying US NBESI trading rule considerably outperforms passive strategy 225 175 Long Only Ret=3.2% Vol=7% IR=0.46 Dr=-12.7% US NBESI Ret=4.7% Vol=5.2% IR=0.9 Dr=-10.1% 15% 10% 5% 0% 125-5% -10% Long Only US NBESI 75 2001 2003 2005 2007 2009 2011 2013-15%

Trading FX with NBESI Fade moves in NBESI, ie. falling NBESI => buy, rising NBESI => sell G10 FX NBESI basket combined with filtered G10 FX carry strategy (using RavenPack news volume) has better risk adjusted returns than either Carry filter used a different aggregation scheme to NBESI 275 175 G10 NBSEI Basket Ret=3.9% Vol=5.6% IR=0.69 Dr=-13.6% Carry Ret=5.1% Vol=10.5% IR=0.49 Dr=-35.5% Carry RP Vol Filtered Ret=5.8% Vol=6.6% IR=0.87 Dr=-14.9% Mixed Ret=4.8% Vol=4.3% IR=1.11 Dr=-6.7% 75 2001 2003 2005 2007 2009 2011 2013 0.8 NBESI IR 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0.0

One last thing on news Using unstructured data Creating an index of US labour market work in progress! 600 400 200 0-200 -400-600 -800 Actual NFP (K - LHS) Thalesians index via text analysis of US labour report (RHS) 2009 2010 2011 2012 2013 2014 2015 110% 90% 70% 50% 30% 10%

Python Demo: What will we use? A lot of analysis for Big Data happens in Python Built PyThalesians coding library Used following libraries heavily NumPy SciPy Pandas Strongly recommend using Python! Will be deciphering intraday FX volatility patterns! 23

What will we do? Market data load using live Bloomberg API call and cache (retail FX data), then plot Analyse intraday vol calculate, then plot Contrast tick count & intraday vol, then plot Focus on scheduled data events, calculate, then plot spot moves surprise vs. spot moves intraday vol plot 24

Conclusion Examined using news data to trade Using RavenPack data Trading strategies for bonds and FX Used high frequency data to analyse FX market Discovered exciting patterns in intraday vol Examined how price action behaved around data events

If you liked my talk... Any questions, ask now or e-mail at saeed@thalesians.com or tweet @thalesians Read my book Trading Thalesians What the ancient world can teach us about trading today The Thalesians publish quant strategy papers (short versions free) The Thalesians consultancy Create systematic trading models Bespoke financial market research based projects Particular expertise in FX (you probably guessed!) And yes, I trade my own money skin in the game! 26

leave you with some words from my book A yard to end Beneath the whisper are words to rise and strive, That seek to break apart the sentiments, Which say no and never and don t and won t, To trounce the dreams, to pounce upon what seems, Go wipe away the false and grasp the truth, So seek the path and endeavor and rise, Go forth traverse the lows and climb the highs, Ignore the pain, the fails and the near just, A yard to end, that goal it ll be your pole, And turn to back and smile in that last mile, Year next will rise in mind as you ll sure find, If simple were life, boredom would be rife! 27

28