Algorithmic trading
Stefan Duprey
Develop and calibrate an automated trading system
using Reuters Market Data
• From Reuters data fetching to building
trading strategy
– Characterize market state using technical
analysis with a mix of signals (classical
financial indicator MACD-RSI-%R)
– Characterize market state using
Sentiment analysis from Reuters News
Sentiment
• High level algorithms to improve
trading strategies
– Use of genetic algorithms
– Use of neural network
– Use of bootstrapped aggregated trees
Using Reuters Data to predict order book
evolution
Pick-up and analyze customized relevant Reuters market data
• Reuters Market Data : from one depth real-time order book up to 5
• More comprehensive data available (Reuters News Analytics)
Bid 1,t Ask 1,t Bid size 1,t Ask size 1,t Bid 1,t-1 Ask 1,t-1 Bid size 1,t-1 Ask size 1,t-1
Order book depth 1 at t Order book depth 1 at t-1
Obs
Yield
at
t+dt
>> t = classregtree(X,Y);
>> Y_pred = t(X_new);
Regression Trees
Forests of Trees
predictors
up
down
down
up
up
up
down
up
down
up
up
.
.
.
response
Y
>> t = TreeBagger(nb_trees,X,Y);
>> [Y_pred,allpred] = predict(t,X_new);
Genetic programming in brief
Graphical wizard to build and calibrate optimization
• Online help to define and implement your algorithm
• Automatic code generation
Clustering, hidden markov chains and
non deterministic finite automaton
Sentiment Analysis
• Linguistics Lexalytics parser
• Help build an automate to quickly analyze news
• All assets targeted : IR, Bonds, Stocks,
Commodities, CPI, politics, …
• Trading frequency from milliseconds to yearly
rebalancing
Security ID : Identifies the market, such as an individual company, a stock index, or a currency market
Topic Code : Identifies the type of news, such as an earnings report, or a regulatory approval
Industry Code : Identifies the industry sector, such as the financial, manufacturing, or technology sectors
Geographic Code : Identifies the location of the news, such as North America, Europe, or Asia
News Type : Identifies the type of news release, such as an editorial, or a story
Additional tags : direction, relevance
Jan Feb Mar Apr May Jun Jul Aug
20
30
40
Price&sentiment
Feb Mar Apr May Jun Jul
-10
0
10
20
30
Jan Feb Mar Apr May Jun Jul Aug
0
2
4
6
P&L
-20 -10 0 10 20 30 40
0
0.05
0.1
0.15
0.2
0.25
Data
Density
sentiment_scoreday data
fit 1
GPU backtesting : daily averaged VWAP for 500 stocks over
2 years
• Benefit from the GPU high computation power
• Calibrate the backtesting according to your GPU
hardware
0 50 100 150 200 250
35
40
45
50
55
60
0 50 100 150 200 250
0
200
400
600
Weighted_Average_Bid_Price (𝑡) = 𝒌=𝟏
𝒅𝒆𝒑𝒕𝒉𝒔
𝒔𝒊𝒛𝒆 𝒌,𝒕 ∗𝒑𝒓𝒊𝒄𝒆(𝒌,𝒕)
𝒌=𝟏
𝒅𝒆𝒑𝒕𝒉𝒔
𝒔𝒊𝒛𝒆(𝒌,𝒕)
Trading decision engine
Results of Trading Strategy Test Object oriented programming for data filtering (time and tickers)
 Multiple data sources
 Back test and walk forward test (complete set of data)
 Trend following and cross-sectional momentum catch up strategy
Trading decision engine
Calling a FIX engine trading motor
from MATLAB using an API
Trading Toolbox
Market Access
Financial Toolbox
Optimization Toolbox
Trading Engine
Financial Toolbox
Statistics Toolbox
Risk Engine
Fin. Instruments Tbx
Financial Toolbox
Pricing Engine
Bloomberg EMSX
CQG
X_TRADER
Interactive Broker
Bloomberg EMSX

Algorithmic trading

  • 1.
  • 2.
    Develop and calibratean automated trading system using Reuters Market Data • From Reuters data fetching to building trading strategy – Characterize market state using technical analysis with a mix of signals (classical financial indicator MACD-RSI-%R) – Characterize market state using Sentiment analysis from Reuters News Sentiment • High level algorithms to improve trading strategies – Use of genetic algorithms – Use of neural network – Use of bootstrapped aggregated trees
  • 3.
    Using Reuters Datato predict order book evolution Pick-up and analyze customized relevant Reuters market data • Reuters Market Data : from one depth real-time order book up to 5 • More comprehensive data available (Reuters News Analytics) Bid 1,t Ask 1,t Bid size 1,t Ask size 1,t Bid 1,t-1 Ask 1,t-1 Bid size 1,t-1 Ask size 1,t-1 Order book depth 1 at t Order book depth 1 at t-1 Obs Yield at t+dt
  • 4.
    >> t =classregtree(X,Y); >> Y_pred = t(X_new); Regression Trees
  • 5.
    Forests of Trees predictors up down down up up up down up down up up . . . response Y >>t = TreeBagger(nb_trees,X,Y); >> [Y_pred,allpred] = predict(t,X_new);
  • 6.
    Genetic programming inbrief Graphical wizard to build and calibrate optimization • Online help to define and implement your algorithm • Automatic code generation
  • 7.
    Clustering, hidden markovchains and non deterministic finite automaton
  • 8.
    Sentiment Analysis • LinguisticsLexalytics parser • Help build an automate to quickly analyze news • All assets targeted : IR, Bonds, Stocks, Commodities, CPI, politics, … • Trading frequency from milliseconds to yearly rebalancing Security ID : Identifies the market, such as an individual company, a stock index, or a currency market Topic Code : Identifies the type of news, such as an earnings report, or a regulatory approval Industry Code : Identifies the industry sector, such as the financial, manufacturing, or technology sectors Geographic Code : Identifies the location of the news, such as North America, Europe, or Asia News Type : Identifies the type of news release, such as an editorial, or a story Additional tags : direction, relevance Jan Feb Mar Apr May Jun Jul Aug 20 30 40 Price&sentiment Feb Mar Apr May Jun Jul -10 0 10 20 30 Jan Feb Mar Apr May Jun Jul Aug 0 2 4 6 P&L -20 -10 0 10 20 30 40 0 0.05 0.1 0.15 0.2 0.25 Data Density sentiment_scoreday data fit 1
  • 9.
    GPU backtesting :daily averaged VWAP for 500 stocks over 2 years • Benefit from the GPU high computation power • Calibrate the backtesting according to your GPU hardware 0 50 100 150 200 250 35 40 45 50 55 60 0 50 100 150 200 250 0 200 400 600 Weighted_Average_Bid_Price (𝑡) = 𝒌=𝟏 𝒅𝒆𝒑𝒕𝒉𝒔 𝒔𝒊𝒛𝒆 𝒌,𝒕 ∗𝒑𝒓𝒊𝒄𝒆(𝒌,𝒕) 𝒌=𝟏 𝒅𝒆𝒑𝒕𝒉𝒔 𝒔𝒊𝒛𝒆(𝒌,𝒕)
  • 10.
  • 11.
    Results of TradingStrategy Test Object oriented programming for data filtering (time and tickers)  Multiple data sources  Back test and walk forward test (complete set of data)  Trend following and cross-sectional momentum catch up strategy
  • 12.
  • 13.
    Calling a FIXengine trading motor from MATLAB using an API
  • 14.
    Trading Toolbox Market Access FinancialToolbox Optimization Toolbox Trading Engine Financial Toolbox Statistics Toolbox Risk Engine Fin. Instruments Tbx Financial Toolbox Pricing Engine Bloomberg EMSX CQG X_TRADER Interactive Broker Bloomberg EMSX