SlideShare a Scribd company logo
New Techniques, New Tools
Milan, 12 April 2018
Cristiana Corno – Director A.I.4Trading
Nicola Marino – Solution Architect A.I.4Trading
Agenda
Confidential - all right reserved2
Introduction to A.I.4Trading Project
New Techniques, New Tools
From Technical Analysis to Pattern Recognition
From Factor Analysis to Autoencoders
About Artificial Intelligence in AGS
Confidential - all right reserved3
Advanced Global Solution AGS S.p.A. is an Italian company that provides IT and technology services
and solutions: cutting-edge projects, technologies and algorithms.
Founded in 1998, AGS currently offers a team of over 400 employees with deep expertise and strong
technical skills. Consolidated partnerships with market-leading firms have also contributed to the
company's solid record of success in Italy.
Starting 2015 AGS has been making considerable R&D investments in new areas, among which Machine
and Deep Learning, to turn our experience in Artificial Intelligence into Business solutions.
We were the first in
Italy to organise a
course on Machine
Learning
KNOW-HOW
We have an
international team
of Data scientists
specialised in Deep
Learning
TEAM
Our Data Center has a
capacity of trillions of
operations per second
PROCESSING
POWER
A.I.4Trading Project
Confidential - all right reserved4
“A.I.4Trading” is the Fintech division of AGS: it joins the industrial experience of “Machine and Deep
learning” with Capital Markets expertise, to bring Artificial Neural Networks into Finance.
The team is composed by Economists, electronical engineers, computer scientists and collaborates
actively with the ML Team.
Trading Experience Deep Learning
Why Artificial Intelligence?
Excess profit from “early” and “confidential” adoption?
Confidential - all right reserved5
Recent version of the relative efficient market hypothesis states that "it is not possible to systematically earn
excess profits without some sort of competitive advantage”. (“Perspective in neural computing”)
Sophisticated modelling techniques, speed of elaboration are probably the “COMPETITIVE ADVANTAGE”
and have the potential to generate excess profits….
….as long as they are early adopted and kept confidential!
The 3 Laws (also for A.I.4Trading)
Confidential - all right reserved6
1. A robot may not injure a human being or, through inaction, allow a human being to come to harm.
2. A robot must obey any orders given to it by human beings, except where such orders would conflict
with the First Law.
3. A robot must protect its own existence as long as such protection does not conflict with the First or
Second Law.
I. Asimov
1st A.I.4Trading “Mantra”:
IMPROVE THE INFORMATION SET
Confidential - all right reserved7
 Extract as much information as possible from data or the “screen”
 “Context” analysis + coding can make the difference (-)
Rogue Trader Quants Machine & Deep Learning
Confidential - all right reserved8
AI and Machine Learning
Eurekahedge AI Hedge Fund Index
Example: Eureka
Confidential - all right reserved9
As an example, using context (other assets) and few lines of code ( constrained least square minimization), we
can derive the “ex-post” performance’s drivers of the Eureka AI and HFR hedge fund index.
A.I. allocation seems more conservative (in appendix the possible rolling asset allocations)
Rf=rt(:,2) % fund return
Ra=rt(:,4:end) % return of the
universe of assets
x=zeros(size(Ra,2),1) % Investment
percentage
I=ones(1,size(Ra,2)) % Ones matrix
Constrained Least square
minimization problem
Rf-Ra*x sub sum(x)=1 or X’I=1
[x]=lsqlin(Ra,Rf,[],[],I,1)
Optimization problem: AVERAGE solution Eureka vs HFR
Matlab code
A.I. on average is more conservative
Confidential - all right reserved10
Eureka allocations : total dataset and rolling HFR allocations : total dataset and rolling
Rolling the problem (300 obs), AI asset allocation (change of weights in time) solution seems more active.
In conclusion with the AI fund index, we have:
• Overperformance
• Active asset allocation
• and a conservative approach!
Example: Eureka
Confidential - all right reserved11
HFR return distribution Eureka return distribution
• Less volatile and higher average return for the AI.
• We will see again this picture later on
Example: Eureka
2nd A.I.4Trading “Mantra”:
ENLIGHTEN THE BLACK BOX
Confidential - all right reserved12
 We start from simple model of the phenomena (statistics) and evolve them in more flexible neural network
 We try to maintain in this process the “economic interpretability” of the results.
 We run in parallel statistical and black box models and check relative performance and signals
3rd A.I.4Trading “Mantra”:
TRUST THE MACHINE
Confidential - all right reserved
13
“THERE is an old joke among pilots that says the ideal flight crew is a computer, a pilot and a dog.
The computer’s job is to fly the plane. The pilot is there to feed the dog. And the dog’s job is to bite
the pilot if he tries to touch the computer”. Cit. Economist
How can you
buy this… market
A.I.4Trading Platform
Confidential - all right reserved14
CURVE VIEW
Relative value
between similar
assets
CROSS ASSET
Relative value
between asset
classes
FORECAST
Inter daily forecast
MARKET CLOCK
Intraday forecast
Platform
Four modules where «typical»
issues in finance can be
mapped into econometric
models and in their «machine
and deep learning alter ego»
A.I.4Trading Platform
Confidential - all right reserved15
Correlated assets
same risk factors
Multivariate
approach
Correlated assets
with different risk
factors
Multivariate
approach
Forecasting
Univariate and
multivariate
approach (Error
Correction Models)
Intraday
Univariate
Platform
Pattern recognition
clustering, NN for
classification
Recurrent
Networks,
Recursive
Autoencoder
Autoencoders,
Factor analysis
A.I.4Trading: from raw data to automatic trading
Confidential - all right reserved16
Raw data
analysis
•Database production (BBG)
•Maintenance: importance of
autonomous anomaly detection
Algorithm
•Problem definition
•Research
•Algo design
•Back testing on historical data
Production
•Code production
•Online Algo testing
•Automatic trading with expert
system
Machine Learning
Team
collaboration
TEAM
Our workflow
Agenda
Confidential - all right reserved17
Introduction to A.I.4Trading Project
New Techniques, New tools
From Technical Analysis to Pattern Recognition
From Factor Analysis to Autoencoders
Market Clock module: Looking for rhymes
Confidential - all right reserved18
“History doesn't repeat itself,
but it does rhyme.”
M. Twain
Market Clock dashboard
Market Clock:
Ensemble of pattern
recognition algorithms for
forecasting.
The objective is to give
the trader a probability
distribution of the possible
day outcome.
From Technical Analysis to Market Clock
Confidential - all right reserved19
Technical analysis
• Known pattern recognition (finite
selection of pattern)
• Trader identifies formation and
behaves based on past market
behaviour
Market Clock
• Known and unknown pattern
recognition
• Algorithm identifies most probable
«trajectory of the market»
• Provide a probability distribution for end
of day return.
Candlestick scanner Market Clock output
Very important point: probability distribution can be used to build
cash+option (univariate) strategy or spread trades (multivariate)
Our approach to Pattern Recognition
Confidential - all right reserved
The intraday time series is a “trajectory” with a starting point (an eventual bias), an arrival destination, and
intermediate features exactly as a taxi ride
Exactly as a TAXI RIDE the trajectory destination can be influenced by:
• the hour of the day,
• day of the week,
• season of the year,
• events that can catalyse traffic (bias)
This comparison enable us to use the tools and results of the analytics
of movement.
“Artificial Neural Networks Applied to Taxi Destination Prediction”. de Brébisson, Alexandre & Simon, Étienne & Auvolat, Alex & Vincent,
Pascal & Bengio, Y. ,2015
Our approach to Pattern Recognition
Confidential - all right reserved21
 We assume that there is a finite set of typical or “archetypal” trajectories (“market states”) that represent
intraday market behaviour.
 These trajectories are created by the interactions of different players and different speed-moving capital
 We design algorithms that can predict the “most probable” destination, looking at the partial trajectory at
subsequent point in time.
“Intraday patterns in FX returns and order flow”,
https://www.snb.ch/n/mmr/reference/working_paper_2011_04/source/working_paper_2011_04.n.pdf
Online forecasting
Confidential - all right reserved22
In the framework we have created, the challenge is to:
Find a good rappresentation
of the dataset in terms of
«typical» trajectories
Find a performing algorithm
to «learn» how to connect the
online observation with the «most
probable» trajectory for the day
Unsupervised methods for
clustering
Supervised methods for
forecasting (NN for classification,
SVM)
Better if done together.
And A.I. can do it.
Market Clock algorithms
Confidential - all right reserved23
In Market Clock, we currently use 5 different algorithms:
 a dynamic K-means clustering
 a K-means modified, proprietary version
 a multilevel SVM classifier
 a Deep Tapped Delay Line with enhanced clustering
 a MLP for classification
Algorithms performances are
continuosly evaluated
New algorithms are added
if backtesting yields good results or
viceversa.
Market Clock main takeaways:
Confidential - all right reserved24
I. Time Series clustering
II. Deep Learning contribution
III. The Out-Performance shape
I. Time Series clustering
Confidential - all right reserved25
The nucleo of Market Clock is the general theme of time series clustering aimed at forecasting.
The problem arises whenever we observe a sample of time series and we want to group them into different
categories. This is particularly useful in finance. Generally, the notion of similarity used relies on two criteria:
 Proximity between raw time (standard partitioning clustering)
 Proximity between underlying processes (model based clustering)
We use proximity between raw time series after proper normalization in the machine learning algorithms
and model based clustering in the neural network framework.
“Time-series clustering – A decade review” Saeed Aghabozorgi Ali Seyed Shirkhorshidi TehYing Wah, 2015
II. Deep Learning contribution
Confidential - all right reserved26
Improve the clustering (optimized inside the neural network)
Weight the features based on their importance in forecasting daily evolution of returns
Gain more flexibility
III. Out-Performance Shape
Confidential - all right reserved27
Performances varies with the asset features; for a set of assets, realized performances in
backtesting are outstanding.
-2
0
2
4
6
8
10
12
14
0,25 0,5 0,75 1 1,25 1,5 0,25 0,5 0,75 1 1,25 1,5 0,25 0,5 0,75 1 1,25 1,5
PL_sum_stop_1:1 PL_sum PL_sum_stop_1:0.5
Backtesting EURUSD P&L for different trading strategies
(see appendix)
Number of Trades
0
1000
2000
3000
4000
5000
6000
0,25 0,5 0,75 1 1,25 1,5 0,25 0,5 0,75 1 1,25 1,5 0,25 0,5 0,75 1 1,25 1,5
N_trades
Is the Algorithm the «New Asset Allocation»?
Confidential - all right reserved28
• The combination trading strategy + algorithm works as a P&L regularizer in back testing, avoiding large
swing with a positive average return (figure below)
• Algo strategy could serve as an asset for portfolio allocation
Volatility of daily return: strategy vs underlying asset
These return distributions are exactly the same as the ones we saw before for
HFR and Eureka indexes
Distribution of asset daily return and strategy P&L
Agenda
Confidential - all right reserved29
Introduction to A.I.4Trading Project
New Techniques, New tools
From Technical Analysis to Pattern Recognition
From Factor Analysis to Autoencoders
Autoencoders
Confidential - all right reserved30
• Autoencoders are a comprehensive category of Neural Network
• In the process of rebuilding the input, they try to find an “informative representation” of the
original data.
• They represent the natural choice for modelling relative value in finance.
• They contain as special (linear) cases:
• Independent component analysis
• Clustering analysis
• Principal component analysis
• Archetypal analysis
They can be further generalized to take in account non linearities and probalistic
structure of the “hidden variables”
Python
Confidential - all right reserved31
# process file.txt and print
# all the words ending in ing
for line in open("file.txt"):
for word in line.split():
if word.endswith('ing'):
print word
• Simple yet powerful programming language
• Object-oriented: line is a string object so has a “method” split(),
word is a string object so has a “method” ends with with the
argument 'ing'
• Highly readable
• Shallow learning curve, facilitates interactive exploration, permits
data and methods to be encapsulated and re-used easily,
permits attributes to be added to objects on the fly, and permits
variables to be typed dynamically, facilitating rapid
development.
• Extensive standard library
• Heavily used in industry, scientific research, and education
PCA
Confidential - all right reserved32
• Dimensionality reduction technique: mapping
multidimensional data into a lower dimensional space
with minimal loss of information.
• First principal component: direction in space, along
which, projections have the largest variance
• Second principal component: direction, which maximizes
variance among all directions orthogonal to the first, and
so on…
𝑌 = 𝑊 ⋅ 𝑋 𝑋 = 𝑊 𝑇 ⋅ 𝑌
𝑉𝑎𝑟 𝑋 = 𝑊Λ𝑊 𝑇
𝑉𝑎𝑟 𝑌 = Λ
• In Python, just few lines of code
# imports the PCA class and finds a
# projection over 3 components
from sklearn.decomposition import PCA
n_comp = 3
pca = PCA(n_comp, whiten=False)
proj = pca.fit_transform(x_train)
print pca.components_.T
Autoencoder
Confidential - all right reserved33
• Neural Network trained to give as output the input itself
• Two networks: Encoder, Decoder
• Encoder extracts few features from the data
• Decoder reconstructs the data from the features
𝑌 = 𝜎1(𝑊1 ⋅ 𝑋 + 𝑏1)
𝑋 = 𝜎2 𝑊2 ⋅ 𝑌 + 𝑏2
• Can use nonlinearities to give better results
Implementation
Confidential - all right reserved34
• Encoder, no bias, tied weights
𝑌 = 𝑊 𝑇
⋅ 𝑋
• Decoder, simple matrix multiplication
𝑋 = 𝑊 ⋅ 𝑌
• Model, just call encoder inside
decoder
• Loss: MSE of the estimate
𝐸 ∥ 𝑋 − 𝑋 ∥2
= 𝐸[∥ 𝑋 − 𝑊 𝑇
(W ⋅ 𝑋) ∥2
]
# Building the encoder
def encoder(x):
layer_1 = x
layer_2 = tf.matmul(layer_1, tf.transpose(weights['decoder_h1']))
return layer_2
# Building the decoder
def decoder(x):
layer_1 = tf.matmul(x, weights['decoder_h1'])
layer_2 = layer_1
return layer_2
# Construct model
encoder_op = encoder(X)
decoder_op = decoder(encoder_op)
y_pred = decoder_op
# Define loss and optimizer, minimize the squared error
loss = tf.reduce_mean(tf.pow(y_true - y_pred, 2))
optimizer = tf.train.AdamOptimizer(learning_rate_v).minimize(loss)
Shape of hidden factors (PCA vs AE)
-1
-0,8
-0,6
-0,4
-0,2
0
0,2
0,4
0,6
0,8
Second AE component
-1
-0,8
-0,6
-0,4
-0,2
0
0,2
0,4
0,6
0,8
First PCA component
-1
-0,8
-0,6
-0,4
-0,2
0
0,2
0,4
0,6
0,8
First AE component
-1
-0,8
-0,6
-0,4
-0,2
0
0,2
0,4
0,6
0,8
Second PCA component
-1
-0,8
-0,6
-0,4
-0,2
0
0,2
0,4
0,6
0,8
Third AE Component
-1
-0,8
-0,6
-0,4
-0,2
0
0,2
0,4
0,6
0,8
Third PCA component
See our paper “PCA vs AE: an application to CDS market” https://goo.gl/jhEB7w
NVIDIA Partner – DLI training courses
We are officially certified by NVIDIA as “Deep Learning Instructor”
FUNDAMENTALS
OF DEEP
LEARNING FOR
COMPUTER
VISION
FUNDAMENTALS
OF DEEP
LEARNING FOR
MULTIPLE DATA
TYPES
FUNDAMENTALS
OF DEEP
LEARNING FOR
NATURAL
LANGUAGE
PROCESSING
FUNDAMENTALS
OF
ACCELERATED
COMPUTING
WITH CUDA
C/C++
For more info email us at DLI@ags-it.com
NVIDIA Partner – DLI training courses
UPCOMING COURSE
FUNDAMENTALS
OF DEEP
LEARNING FOR
COMPUTER
VISION
FUNDAMENTALS
OF DEEP
LEARNING FOR
MULTIPLE DATA
TYPES
FUNDAMENTALS
OF DEEP
LEARNING FOR
NATURAL
LANGUAGE
PROCESSING
FUNDAMENTALS
OF
ACCELERATED
COMPUTING
WITH CUDA
C/C++
Course contents
FUNDAMENTALS OF DEEP LEARNING FOR MULTIPLE DATA TYPES
• Goals
o Understanding key principles of Natural Language Processing
o Learning the architecture of Recurrent Neural Networks and LSTM cells
o Learning the use of one-hot coding
o Learning the use of Tensorflow
o Being able to coordinate the use of neural networks with different structures to
exploit their respective specificities
• Prerequisites
o Basic Knowledge of Computer Vision
o Basic Knowledge of Convolutional Neural Network
o Knowledge of python language and eventually notebooks
For more info, email us at DLI@ags-it.com
Confidential - all right reserved38
THANK YOU
www.ai4trading.com
ai4trading@ags-it.com
cristiana.corno@ags-it.com
Confidential - all right reserved39
DISCLAIMER
The information in this document has been prepared by Advanced Global Solution AGS S.p.A. (VAT
IT01692340035, also as AGS S.p.A.) and is general background information about AGS activities current as at the
date of this presentation. This information is given in summary form and does not purport to be complete.
Information in this presentation, including forecast financial information, should not be considered as advice or a
recommendation to investors or potential investors in relation to holding, purchasing or selling securities or other
financial products or instruments. All securities and financial product or instrument transactions involve risks, which
include (among others) the risk of adverse or unanticipated market, financial or political developments and, in
international transactions, currency risk.
All industrial and intellectual property rights on any information that AGS S.p.A. communicate or make available
in this document, as well as on the results of the experimental activities carried out are and remain of AGS S.p.A.
The communication or making available of such Confidential Information or the results achieved cannot be
considered an assignment or license of industrial or intellectual property rights by AGS S.p.A.
Confidential - all right reserved40
Appendix 1
Deep Tapped Delay Line
training
predict
Input
Output
Hidden
layer
Layers
Layers
Layers
Layers
y[t*+1]
y[t*+2]
y[t*+3]
y[t*+4]
x[start:t*] x[t*+1] x[t*+2] x[t*+3]
Confidential - all right reserved41
Appendix 2
Market Clock: performances assumptions
The P&L of the strategies are calculated as a passive strategy re-evaluated at each 30m time stamp.
The trading strategy consists of starting the position on the signal above/below a certain threshold,
keepening the position until the end of day and reverting it if signal changes.
The threshold is defined as a function of the forecast and its standard deviation.
Three zeta version have been tested, based on the forecasting horizon (next 30 minute or End of the
day):
Zeta_eod= (last_obs-forecast_eod)/std(forecast_eod)
Zeta_next= (last_obs-forecast_next)/std(forecast_next)
Zeta_star= (last_obs-forecast_eod)/std(forecast_next)

More Related Content

Similar to Ags AIforTrading

Complex AI forecasting methods for investments portfolio optimization - Pawel...
Complex AI forecasting methods for investments portfolio optimization - Pawel...Complex AI forecasting methods for investments portfolio optimization - Pawel...
Complex AI forecasting methods for investments portfolio optimization - Pawel...
Institute of Contemporary Sciences
 
Sapien trade pitch_deck mar 18
Sapien trade pitch_deck mar 18Sapien trade pitch_deck mar 18
Sapien trade pitch_deck mar 18
SapienTrade
 
UNRAVELING THE POWER OF QUANTOPIAN ALGORITHMS IN FINANCIAL MARKETS
UNRAVELING THE POWER OF QUANTOPIAN ALGORITHMS IN FINANCIAL MARKETSUNRAVELING THE POWER OF QUANTOPIAN ALGORITHMS IN FINANCIAL MARKETS
UNRAVELING THE POWER OF QUANTOPIAN ALGORITHMS IN FINANCIAL MARKETS
Riya Sen
 
20181212 ibm aot
20181212 ibm aot20181212 ibm aot
20181212 ibm aot
Hiroshi Maruyama
 
Romanko chasopys july2015_post
Romanko chasopys july2015_postRomanko chasopys july2015_post
Romanko chasopys july2015_post
ProstirChasopys
 
Applications of Artificial Neural Network in Forecasting of Stock Market Index
Applications of Artificial Neural Network in Forecasting of Stock Market IndexApplications of Artificial Neural Network in Forecasting of Stock Market Index
Applications of Artificial Neural Network in Forecasting of Stock Market Index
paperpublications3
 
“Real Time Machine Learning Architecture and Sentiment Analysis Applied to Fi...
“Real Time Machine Learning Architecture and Sentiment Analysis Applied to Fi...“Real Time Machine Learning Architecture and Sentiment Analysis Applied to Fi...
“Real Time Machine Learning Architecture and Sentiment Analysis Applied to Fi...
Quantopian
 
AlgoB – Cryptocurrency price prediction system using LSTM
AlgoB – Cryptocurrency price prediction system using LSTMAlgoB – Cryptocurrency price prediction system using LSTM
AlgoB – Cryptocurrency price prediction system using LSTM
IRJET Journal
 
Lesson 1 intro to ai
Lesson 1   intro to aiLesson 1   intro to ai
Lesson 1 intro to ai
ankit_ppt
 
are algorithms really a black box
are algorithms really a black boxare algorithms really a black box
are algorithms really a black box
Ansgar Koene
 
Artificial intelligence, Technological Singularity & the Law
Artificial intelligence, Technological Singularity & the LawArtificial intelligence, Technological Singularity & the Law
Artificial intelligence, Technological Singularity & the Law
Florian Ducommun
 
Project report on Share Market application
Project report on Share Market applicationProject report on Share Market application
Project report on Share Market application
KRISHNA PANDEY
 
Study on Positive and Negative Rule Based Mining Techniques for E-Commerce Ap...
Study on Positive and Negative Rule Based Mining Techniques for E-Commerce Ap...Study on Positive and Negative Rule Based Mining Techniques for E-Commerce Ap...
Study on Positive and Negative Rule Based Mining Techniques for E-Commerce Ap...
Association of Scientists, Developers and Faculties
 
Algo trading with machine learning ppt
Algo trading with machine learning pptAlgo trading with machine learning ppt
Algo trading with machine learning ppt
Deb prakash ganguly
 
Stock Market Prediction using Alpha Vantage API and Machine Learning Algorithm
Stock Market Prediction using Alpha Vantage API and Machine Learning AlgorithmStock Market Prediction using Alpha Vantage API and Machine Learning Algorithm
Stock Market Prediction using Alpha Vantage API and Machine Learning Algorithm
IRJET Journal
 
Stock Market Prediction
Stock Market PredictionStock Market Prediction
Stock Market Prediction
MRIDUL GUPTA
 
Ajit Jaokar, Data Science for IoT professor at Oxford University “Enterprise ...
Ajit Jaokar, Data Science for IoT professor at Oxford University “Enterprise ...Ajit Jaokar, Data Science for IoT professor at Oxford University “Enterprise ...
Ajit Jaokar, Data Science for IoT professor at Oxford University “Enterprise ...
Dataconomy Media
 
Taking advantageofai july2018
Taking advantageofai july2018Taking advantageofai july2018
Taking advantageofai july2018
Yves Caseau
 
FinTech, AI, Machine Learning in Finance
FinTech, AI, Machine Learning in FinanceFinTech, AI, Machine Learning in Finance
FinTech, AI, Machine Learning in Finance
Sanjiv Das
 
160309 테헤란로 런치클럽_특허 관점의 IoT 전략(IoT Strategy : Patent Perspectives)
160309 테헤란로 런치클럽_특허 관점의 IoT 전략(IoT Strategy : Patent Perspectives)160309 테헤란로 런치클럽_특허 관점의 IoT 전략(IoT Strategy : Patent Perspectives)
160309 테헤란로 런치클럽_특허 관점의 IoT 전략(IoT Strategy : Patent Perspectives)
StartupAlliance
 

Similar to Ags AIforTrading (20)

Complex AI forecasting methods for investments portfolio optimization - Pawel...
Complex AI forecasting methods for investments portfolio optimization - Pawel...Complex AI forecasting methods for investments portfolio optimization - Pawel...
Complex AI forecasting methods for investments portfolio optimization - Pawel...
 
Sapien trade pitch_deck mar 18
Sapien trade pitch_deck mar 18Sapien trade pitch_deck mar 18
Sapien trade pitch_deck mar 18
 
UNRAVELING THE POWER OF QUANTOPIAN ALGORITHMS IN FINANCIAL MARKETS
UNRAVELING THE POWER OF QUANTOPIAN ALGORITHMS IN FINANCIAL MARKETSUNRAVELING THE POWER OF QUANTOPIAN ALGORITHMS IN FINANCIAL MARKETS
UNRAVELING THE POWER OF QUANTOPIAN ALGORITHMS IN FINANCIAL MARKETS
 
20181212 ibm aot
20181212 ibm aot20181212 ibm aot
20181212 ibm aot
 
Romanko chasopys july2015_post
Romanko chasopys july2015_postRomanko chasopys july2015_post
Romanko chasopys july2015_post
 
Applications of Artificial Neural Network in Forecasting of Stock Market Index
Applications of Artificial Neural Network in Forecasting of Stock Market IndexApplications of Artificial Neural Network in Forecasting of Stock Market Index
Applications of Artificial Neural Network in Forecasting of Stock Market Index
 
“Real Time Machine Learning Architecture and Sentiment Analysis Applied to Fi...
“Real Time Machine Learning Architecture and Sentiment Analysis Applied to Fi...“Real Time Machine Learning Architecture and Sentiment Analysis Applied to Fi...
“Real Time Machine Learning Architecture and Sentiment Analysis Applied to Fi...
 
AlgoB – Cryptocurrency price prediction system using LSTM
AlgoB – Cryptocurrency price prediction system using LSTMAlgoB – Cryptocurrency price prediction system using LSTM
AlgoB – Cryptocurrency price prediction system using LSTM
 
Lesson 1 intro to ai
Lesson 1   intro to aiLesson 1   intro to ai
Lesson 1 intro to ai
 
are algorithms really a black box
are algorithms really a black boxare algorithms really a black box
are algorithms really a black box
 
Artificial intelligence, Technological Singularity & the Law
Artificial intelligence, Technological Singularity & the LawArtificial intelligence, Technological Singularity & the Law
Artificial intelligence, Technological Singularity & the Law
 
Project report on Share Market application
Project report on Share Market applicationProject report on Share Market application
Project report on Share Market application
 
Study on Positive and Negative Rule Based Mining Techniques for E-Commerce Ap...
Study on Positive and Negative Rule Based Mining Techniques for E-Commerce Ap...Study on Positive and Negative Rule Based Mining Techniques for E-Commerce Ap...
Study on Positive and Negative Rule Based Mining Techniques for E-Commerce Ap...
 
Algo trading with machine learning ppt
Algo trading with machine learning pptAlgo trading with machine learning ppt
Algo trading with machine learning ppt
 
Stock Market Prediction using Alpha Vantage API and Machine Learning Algorithm
Stock Market Prediction using Alpha Vantage API and Machine Learning AlgorithmStock Market Prediction using Alpha Vantage API and Machine Learning Algorithm
Stock Market Prediction using Alpha Vantage API and Machine Learning Algorithm
 
Stock Market Prediction
Stock Market PredictionStock Market Prediction
Stock Market Prediction
 
Ajit Jaokar, Data Science for IoT professor at Oxford University “Enterprise ...
Ajit Jaokar, Data Science for IoT professor at Oxford University “Enterprise ...Ajit Jaokar, Data Science for IoT professor at Oxford University “Enterprise ...
Ajit Jaokar, Data Science for IoT professor at Oxford University “Enterprise ...
 
Taking advantageofai july2018
Taking advantageofai july2018Taking advantageofai july2018
Taking advantageofai july2018
 
FinTech, AI, Machine Learning in Finance
FinTech, AI, Machine Learning in FinanceFinTech, AI, Machine Learning in Finance
FinTech, AI, Machine Learning in Finance
 
160309 테헤란로 런치클럽_특허 관점의 IoT 전략(IoT Strategy : Patent Perspectives)
160309 테헤란로 런치클럽_특허 관점의 IoT 전략(IoT Strategy : Patent Perspectives)160309 테헤란로 런치클럽_특허 관점의 IoT 전략(IoT Strategy : Patent Perspectives)
160309 테헤란로 런치클럽_특허 관점의 IoT 전략(IoT Strategy : Patent Perspectives)
 

More from Cristiana Corno

Ai e settore_bancario (a review)
Ai e settore_bancario (a review)Ai e settore_bancario (a review)
Ai e settore_bancario (a review)
Cristiana Corno
 
Btp future: looking for deliverabilty option
Btp future: looking for deliverabilty optionBtp future: looking for deliverabilty option
Btp future: looking for deliverabilty option
Cristiana Corno
 
PSPP forwarding
PSPP forwardingPSPP forwarding
PSPP forwarding
Cristiana Corno
 
BOJ yield curve control
BOJ yield curve controlBOJ yield curve control
BOJ yield curve control
Cristiana Corno
 
Market focus inflation_2017
Market  focus inflation_2017Market  focus inflation_2017
Market focus inflation_2017
Cristiana Corno
 
Presentazione venice modificata
Presentazione venice modificataPresentazione venice modificata
Presentazione venice modificata
Cristiana Corno
 
Ecb update tltro and qe
Ecb update tltro and qeEcb update tltro and qe
Ecb update tltro and qe
Cristiana Corno
 
Minor issues' relevance
Minor issues' relevanceMinor issues' relevance
Minor issues' relevance
Cristiana Corno
 
Nirp
NirpNirp
London february 2017
London february 2017London february 2017
London february 2017
Cristiana Corno
 
Pspp's implementation rules
Pspp's implementation rulesPspp's implementation rules
Pspp's implementation rules
Cristiana Corno
 
Introducing Yellen
Introducing YellenIntroducing Yellen
Introducing Yellen
Cristiana Corno
 

More from Cristiana Corno (12)

Ai e settore_bancario (a review)
Ai e settore_bancario (a review)Ai e settore_bancario (a review)
Ai e settore_bancario (a review)
 
Btp future: looking for deliverabilty option
Btp future: looking for deliverabilty optionBtp future: looking for deliverabilty option
Btp future: looking for deliverabilty option
 
PSPP forwarding
PSPP forwardingPSPP forwarding
PSPP forwarding
 
BOJ yield curve control
BOJ yield curve controlBOJ yield curve control
BOJ yield curve control
 
Market focus inflation_2017
Market  focus inflation_2017Market  focus inflation_2017
Market focus inflation_2017
 
Presentazione venice modificata
Presentazione venice modificataPresentazione venice modificata
Presentazione venice modificata
 
Ecb update tltro and qe
Ecb update tltro and qeEcb update tltro and qe
Ecb update tltro and qe
 
Minor issues' relevance
Minor issues' relevanceMinor issues' relevance
Minor issues' relevance
 
Nirp
NirpNirp
Nirp
 
London february 2017
London february 2017London february 2017
London february 2017
 
Pspp's implementation rules
Pspp's implementation rulesPspp's implementation rules
Pspp's implementation rules
 
Introducing Yellen
Introducing YellenIntroducing Yellen
Introducing Yellen
 

Recently uploaded

Applying the Global Internal Audit Standards_AIS.pdf
Applying the Global Internal Audit Standards_AIS.pdfApplying the Global Internal Audit Standards_AIS.pdf
Applying the Global Internal Audit Standards_AIS.pdf
alexiusbrian1
 
Abhay Bhutada Leads Poonawalla Fincorp To Record Low NPA And Unprecedented Gr...
Abhay Bhutada Leads Poonawalla Fincorp To Record Low NPA And Unprecedented Gr...Abhay Bhutada Leads Poonawalla Fincorp To Record Low NPA And Unprecedented Gr...
Abhay Bhutada Leads Poonawalla Fincorp To Record Low NPA And Unprecedented Gr...
Vighnesh Shashtri
 
where can I find a legit pi merchant online
where can I find a legit pi merchant onlinewhere can I find a legit pi merchant online
where can I find a legit pi merchant online
DOT TECH
 
The secret way to sell pi coins effortlessly.
The secret way to sell pi coins effortlessly.The secret way to sell pi coins effortlessly.
The secret way to sell pi coins effortlessly.
DOT TECH
 
how to sell pi coins in Hungary (simple guide)
how to sell pi coins in Hungary (simple guide)how to sell pi coins in Hungary (simple guide)
how to sell pi coins in Hungary (simple guide)
DOT TECH
 
Earn a passive income with prosocial investing
Earn a passive income with prosocial investingEarn a passive income with prosocial investing
Earn a passive income with prosocial investing
Colin R. Turner
 
一比一原版(UoB毕业证)伯明翰大学毕业证如何办理
一比一原版(UoB毕业证)伯明翰大学毕业证如何办理一比一原版(UoB毕业证)伯明翰大学毕业证如何办理
一比一原版(UoB毕业证)伯明翰大学毕业证如何办理
nexop1
 
The WhatsPump Pseudonym Problem and the Hilarious Downfall of Artificial Enga...
The WhatsPump Pseudonym Problem and the Hilarious Downfall of Artificial Enga...The WhatsPump Pseudonym Problem and the Hilarious Downfall of Artificial Enga...
The WhatsPump Pseudonym Problem and the Hilarious Downfall of Artificial Enga...
muslimdavidovich670
 
G20 summit held in India. Proper presentation for G20 summit
G20 summit held in India. Proper presentation for G20 summitG20 summit held in India. Proper presentation for G20 summit
G20 summit held in India. Proper presentation for G20 summit
rohitsaxena882511
 
SWAIAP Fraud Risk Mitigation Prof Oyedokun.pptx
SWAIAP Fraud Risk Mitigation   Prof Oyedokun.pptxSWAIAP Fraud Risk Mitigation   Prof Oyedokun.pptx
SWAIAP Fraud Risk Mitigation Prof Oyedokun.pptx
Godwin Emmanuel Oyedokun MBA MSc PhD FCA FCTI FCNA CFE FFAR
 
Tdasx: Unveiling the Trillion-Dollar Potential of Bitcoin DeFi
Tdasx: Unveiling the Trillion-Dollar Potential of Bitcoin DeFiTdasx: Unveiling the Trillion-Dollar Potential of Bitcoin DeFi
Tdasx: Unveiling the Trillion-Dollar Potential of Bitcoin DeFi
nimaruinazawa258
 
Tax System, Behaviour, Justice, and Voluntary Compliance Culture in Nigeria -...
Tax System, Behaviour, Justice, and Voluntary Compliance Culture in Nigeria -...Tax System, Behaviour, Justice, and Voluntary Compliance Culture in Nigeria -...
Tax System, Behaviour, Justice, and Voluntary Compliance Culture in Nigeria -...
Godwin Emmanuel Oyedokun MBA MSc PhD FCA FCTI FCNA CFE FFAR
 
An Overview of the Prosocial dHEDGE Vault works
An Overview of the Prosocial dHEDGE Vault worksAn Overview of the Prosocial dHEDGE Vault works
An Overview of the Prosocial dHEDGE Vault works
Colin R. Turner
 
^%$Zone1:+971)581248768’][* Legit & Safe #Abortion #Pills #For #Sale In #Duba...
^%$Zone1:+971)581248768’][* Legit & Safe #Abortion #Pills #For #Sale In #Duba...^%$Zone1:+971)581248768’][* Legit & Safe #Abortion #Pills #For #Sale In #Duba...
^%$Zone1:+971)581248768’][* Legit & Safe #Abortion #Pills #For #Sale In #Duba...
mayaclinic18
 
Donald Trump Presentation and his life.pptx
Donald Trump Presentation and his life.pptxDonald Trump Presentation and his life.pptx
Donald Trump Presentation and his life.pptx
SerdarHudaykuliyew
 
Eco-Innovations and Firm Heterogeneity. Evidence from Italian Family and Nonf...
Eco-Innovations and Firm Heterogeneity.Evidence from Italian Family and Nonf...Eco-Innovations and Firm Heterogeneity.Evidence from Italian Family and Nonf...
Eco-Innovations and Firm Heterogeneity. Evidence from Italian Family and Nonf...
University of Calabria
 
Intro_Economics_ GPresentation Week 4.pptx
Intro_Economics_ GPresentation Week 4.pptxIntro_Economics_ GPresentation Week 4.pptx
Intro_Economics_ GPresentation Week 4.pptx
shetivia
 
STREETONOMICS: Exploring the Uncharted Territories of Informal Markets throug...
STREETONOMICS: Exploring the Uncharted Territories of Informal Markets throug...STREETONOMICS: Exploring the Uncharted Territories of Informal Markets throug...
STREETONOMICS: Exploring the Uncharted Territories of Informal Markets throug...
sameer shah
 
when will pi network coin be available on crypto exchange.
when will pi network coin be available on crypto exchange.when will pi network coin be available on crypto exchange.
when will pi network coin be available on crypto exchange.
DOT TECH
 
how to sell pi coins in South Korea profitably.
how to sell pi coins in South Korea profitably.how to sell pi coins in South Korea profitably.
how to sell pi coins in South Korea profitably.
DOT TECH
 

Recently uploaded (20)

Applying the Global Internal Audit Standards_AIS.pdf
Applying the Global Internal Audit Standards_AIS.pdfApplying the Global Internal Audit Standards_AIS.pdf
Applying the Global Internal Audit Standards_AIS.pdf
 
Abhay Bhutada Leads Poonawalla Fincorp To Record Low NPA And Unprecedented Gr...
Abhay Bhutada Leads Poonawalla Fincorp To Record Low NPA And Unprecedented Gr...Abhay Bhutada Leads Poonawalla Fincorp To Record Low NPA And Unprecedented Gr...
Abhay Bhutada Leads Poonawalla Fincorp To Record Low NPA And Unprecedented Gr...
 
where can I find a legit pi merchant online
where can I find a legit pi merchant onlinewhere can I find a legit pi merchant online
where can I find a legit pi merchant online
 
The secret way to sell pi coins effortlessly.
The secret way to sell pi coins effortlessly.The secret way to sell pi coins effortlessly.
The secret way to sell pi coins effortlessly.
 
how to sell pi coins in Hungary (simple guide)
how to sell pi coins in Hungary (simple guide)how to sell pi coins in Hungary (simple guide)
how to sell pi coins in Hungary (simple guide)
 
Earn a passive income with prosocial investing
Earn a passive income with prosocial investingEarn a passive income with prosocial investing
Earn a passive income with prosocial investing
 
一比一原版(UoB毕业证)伯明翰大学毕业证如何办理
一比一原版(UoB毕业证)伯明翰大学毕业证如何办理一比一原版(UoB毕业证)伯明翰大学毕业证如何办理
一比一原版(UoB毕业证)伯明翰大学毕业证如何办理
 
The WhatsPump Pseudonym Problem and the Hilarious Downfall of Artificial Enga...
The WhatsPump Pseudonym Problem and the Hilarious Downfall of Artificial Enga...The WhatsPump Pseudonym Problem and the Hilarious Downfall of Artificial Enga...
The WhatsPump Pseudonym Problem and the Hilarious Downfall of Artificial Enga...
 
G20 summit held in India. Proper presentation for G20 summit
G20 summit held in India. Proper presentation for G20 summitG20 summit held in India. Proper presentation for G20 summit
G20 summit held in India. Proper presentation for G20 summit
 
SWAIAP Fraud Risk Mitigation Prof Oyedokun.pptx
SWAIAP Fraud Risk Mitigation   Prof Oyedokun.pptxSWAIAP Fraud Risk Mitigation   Prof Oyedokun.pptx
SWAIAP Fraud Risk Mitigation Prof Oyedokun.pptx
 
Tdasx: Unveiling the Trillion-Dollar Potential of Bitcoin DeFi
Tdasx: Unveiling the Trillion-Dollar Potential of Bitcoin DeFiTdasx: Unveiling the Trillion-Dollar Potential of Bitcoin DeFi
Tdasx: Unveiling the Trillion-Dollar Potential of Bitcoin DeFi
 
Tax System, Behaviour, Justice, and Voluntary Compliance Culture in Nigeria -...
Tax System, Behaviour, Justice, and Voluntary Compliance Culture in Nigeria -...Tax System, Behaviour, Justice, and Voluntary Compliance Culture in Nigeria -...
Tax System, Behaviour, Justice, and Voluntary Compliance Culture in Nigeria -...
 
An Overview of the Prosocial dHEDGE Vault works
An Overview of the Prosocial dHEDGE Vault worksAn Overview of the Prosocial dHEDGE Vault works
An Overview of the Prosocial dHEDGE Vault works
 
^%$Zone1:+971)581248768’][* Legit & Safe #Abortion #Pills #For #Sale In #Duba...
^%$Zone1:+971)581248768’][* Legit & Safe #Abortion #Pills #For #Sale In #Duba...^%$Zone1:+971)581248768’][* Legit & Safe #Abortion #Pills #For #Sale In #Duba...
^%$Zone1:+971)581248768’][* Legit & Safe #Abortion #Pills #For #Sale In #Duba...
 
Donald Trump Presentation and his life.pptx
Donald Trump Presentation and his life.pptxDonald Trump Presentation and his life.pptx
Donald Trump Presentation and his life.pptx
 
Eco-Innovations and Firm Heterogeneity. Evidence from Italian Family and Nonf...
Eco-Innovations and Firm Heterogeneity.Evidence from Italian Family and Nonf...Eco-Innovations and Firm Heterogeneity.Evidence from Italian Family and Nonf...
Eco-Innovations and Firm Heterogeneity. Evidence from Italian Family and Nonf...
 
Intro_Economics_ GPresentation Week 4.pptx
Intro_Economics_ GPresentation Week 4.pptxIntro_Economics_ GPresentation Week 4.pptx
Intro_Economics_ GPresentation Week 4.pptx
 
STREETONOMICS: Exploring the Uncharted Territories of Informal Markets throug...
STREETONOMICS: Exploring the Uncharted Territories of Informal Markets throug...STREETONOMICS: Exploring the Uncharted Territories of Informal Markets throug...
STREETONOMICS: Exploring the Uncharted Territories of Informal Markets throug...
 
when will pi network coin be available on crypto exchange.
when will pi network coin be available on crypto exchange.when will pi network coin be available on crypto exchange.
when will pi network coin be available on crypto exchange.
 
how to sell pi coins in South Korea profitably.
how to sell pi coins in South Korea profitably.how to sell pi coins in South Korea profitably.
how to sell pi coins in South Korea profitably.
 

Ags AIforTrading

  • 1. New Techniques, New Tools Milan, 12 April 2018 Cristiana Corno – Director A.I.4Trading Nicola Marino – Solution Architect A.I.4Trading
  • 2. Agenda Confidential - all right reserved2 Introduction to A.I.4Trading Project New Techniques, New Tools From Technical Analysis to Pattern Recognition From Factor Analysis to Autoencoders
  • 3. About Artificial Intelligence in AGS Confidential - all right reserved3 Advanced Global Solution AGS S.p.A. is an Italian company that provides IT and technology services and solutions: cutting-edge projects, technologies and algorithms. Founded in 1998, AGS currently offers a team of over 400 employees with deep expertise and strong technical skills. Consolidated partnerships with market-leading firms have also contributed to the company's solid record of success in Italy. Starting 2015 AGS has been making considerable R&D investments in new areas, among which Machine and Deep Learning, to turn our experience in Artificial Intelligence into Business solutions. We were the first in Italy to organise a course on Machine Learning KNOW-HOW We have an international team of Data scientists specialised in Deep Learning TEAM Our Data Center has a capacity of trillions of operations per second PROCESSING POWER
  • 4. A.I.4Trading Project Confidential - all right reserved4 “A.I.4Trading” is the Fintech division of AGS: it joins the industrial experience of “Machine and Deep learning” with Capital Markets expertise, to bring Artificial Neural Networks into Finance. The team is composed by Economists, electronical engineers, computer scientists and collaborates actively with the ML Team. Trading Experience Deep Learning
  • 5. Why Artificial Intelligence? Excess profit from “early” and “confidential” adoption? Confidential - all right reserved5 Recent version of the relative efficient market hypothesis states that "it is not possible to systematically earn excess profits without some sort of competitive advantage”. (“Perspective in neural computing”) Sophisticated modelling techniques, speed of elaboration are probably the “COMPETITIVE ADVANTAGE” and have the potential to generate excess profits…. ….as long as they are early adopted and kept confidential!
  • 6. The 3 Laws (also for A.I.4Trading) Confidential - all right reserved6 1. A robot may not injure a human being or, through inaction, allow a human being to come to harm. 2. A robot must obey any orders given to it by human beings, except where such orders would conflict with the First Law. 3. A robot must protect its own existence as long as such protection does not conflict with the First or Second Law. I. Asimov
  • 7. 1st A.I.4Trading “Mantra”: IMPROVE THE INFORMATION SET Confidential - all right reserved7  Extract as much information as possible from data or the “screen”  “Context” analysis + coding can make the difference (-) Rogue Trader Quants Machine & Deep Learning
  • 8. Confidential - all right reserved8 AI and Machine Learning Eurekahedge AI Hedge Fund Index
  • 9. Example: Eureka Confidential - all right reserved9 As an example, using context (other assets) and few lines of code ( constrained least square minimization), we can derive the “ex-post” performance’s drivers of the Eureka AI and HFR hedge fund index. A.I. allocation seems more conservative (in appendix the possible rolling asset allocations) Rf=rt(:,2) % fund return Ra=rt(:,4:end) % return of the universe of assets x=zeros(size(Ra,2),1) % Investment percentage I=ones(1,size(Ra,2)) % Ones matrix Constrained Least square minimization problem Rf-Ra*x sub sum(x)=1 or X’I=1 [x]=lsqlin(Ra,Rf,[],[],I,1) Optimization problem: AVERAGE solution Eureka vs HFR Matlab code A.I. on average is more conservative
  • 10. Confidential - all right reserved10 Eureka allocations : total dataset and rolling HFR allocations : total dataset and rolling Rolling the problem (300 obs), AI asset allocation (change of weights in time) solution seems more active. In conclusion with the AI fund index, we have: • Overperformance • Active asset allocation • and a conservative approach! Example: Eureka
  • 11. Confidential - all right reserved11 HFR return distribution Eureka return distribution • Less volatile and higher average return for the AI. • We will see again this picture later on Example: Eureka
  • 12. 2nd A.I.4Trading “Mantra”: ENLIGHTEN THE BLACK BOX Confidential - all right reserved12  We start from simple model of the phenomena (statistics) and evolve them in more flexible neural network  We try to maintain in this process the “economic interpretability” of the results.  We run in parallel statistical and black box models and check relative performance and signals
  • 13. 3rd A.I.4Trading “Mantra”: TRUST THE MACHINE Confidential - all right reserved 13 “THERE is an old joke among pilots that says the ideal flight crew is a computer, a pilot and a dog. The computer’s job is to fly the plane. The pilot is there to feed the dog. And the dog’s job is to bite the pilot if he tries to touch the computer”. Cit. Economist How can you buy this… market
  • 14. A.I.4Trading Platform Confidential - all right reserved14 CURVE VIEW Relative value between similar assets CROSS ASSET Relative value between asset classes FORECAST Inter daily forecast MARKET CLOCK Intraday forecast Platform Four modules where «typical» issues in finance can be mapped into econometric models and in their «machine and deep learning alter ego»
  • 15. A.I.4Trading Platform Confidential - all right reserved15 Correlated assets same risk factors Multivariate approach Correlated assets with different risk factors Multivariate approach Forecasting Univariate and multivariate approach (Error Correction Models) Intraday Univariate Platform Pattern recognition clustering, NN for classification Recurrent Networks, Recursive Autoencoder Autoencoders, Factor analysis
  • 16. A.I.4Trading: from raw data to automatic trading Confidential - all right reserved16 Raw data analysis •Database production (BBG) •Maintenance: importance of autonomous anomaly detection Algorithm •Problem definition •Research •Algo design •Back testing on historical data Production •Code production •Online Algo testing •Automatic trading with expert system Machine Learning Team collaboration TEAM Our workflow
  • 17. Agenda Confidential - all right reserved17 Introduction to A.I.4Trading Project New Techniques, New tools From Technical Analysis to Pattern Recognition From Factor Analysis to Autoencoders
  • 18. Market Clock module: Looking for rhymes Confidential - all right reserved18 “History doesn't repeat itself, but it does rhyme.” M. Twain Market Clock dashboard Market Clock: Ensemble of pattern recognition algorithms for forecasting. The objective is to give the trader a probability distribution of the possible day outcome.
  • 19. From Technical Analysis to Market Clock Confidential - all right reserved19 Technical analysis • Known pattern recognition (finite selection of pattern) • Trader identifies formation and behaves based on past market behaviour Market Clock • Known and unknown pattern recognition • Algorithm identifies most probable «trajectory of the market» • Provide a probability distribution for end of day return. Candlestick scanner Market Clock output Very important point: probability distribution can be used to build cash+option (univariate) strategy or spread trades (multivariate)
  • 20. Our approach to Pattern Recognition Confidential - all right reserved The intraday time series is a “trajectory” with a starting point (an eventual bias), an arrival destination, and intermediate features exactly as a taxi ride Exactly as a TAXI RIDE the trajectory destination can be influenced by: • the hour of the day, • day of the week, • season of the year, • events that can catalyse traffic (bias) This comparison enable us to use the tools and results of the analytics of movement. “Artificial Neural Networks Applied to Taxi Destination Prediction”. de Brébisson, Alexandre & Simon, Étienne & Auvolat, Alex & Vincent, Pascal & Bengio, Y. ,2015
  • 21. Our approach to Pattern Recognition Confidential - all right reserved21  We assume that there is a finite set of typical or “archetypal” trajectories (“market states”) that represent intraday market behaviour.  These trajectories are created by the interactions of different players and different speed-moving capital  We design algorithms that can predict the “most probable” destination, looking at the partial trajectory at subsequent point in time. “Intraday patterns in FX returns and order flow”, https://www.snb.ch/n/mmr/reference/working_paper_2011_04/source/working_paper_2011_04.n.pdf
  • 22. Online forecasting Confidential - all right reserved22 In the framework we have created, the challenge is to: Find a good rappresentation of the dataset in terms of «typical» trajectories Find a performing algorithm to «learn» how to connect the online observation with the «most probable» trajectory for the day Unsupervised methods for clustering Supervised methods for forecasting (NN for classification, SVM) Better if done together. And A.I. can do it.
  • 23. Market Clock algorithms Confidential - all right reserved23 In Market Clock, we currently use 5 different algorithms:  a dynamic K-means clustering  a K-means modified, proprietary version  a multilevel SVM classifier  a Deep Tapped Delay Line with enhanced clustering  a MLP for classification Algorithms performances are continuosly evaluated New algorithms are added if backtesting yields good results or viceversa.
  • 24. Market Clock main takeaways: Confidential - all right reserved24 I. Time Series clustering II. Deep Learning contribution III. The Out-Performance shape
  • 25. I. Time Series clustering Confidential - all right reserved25 The nucleo of Market Clock is the general theme of time series clustering aimed at forecasting. The problem arises whenever we observe a sample of time series and we want to group them into different categories. This is particularly useful in finance. Generally, the notion of similarity used relies on two criteria:  Proximity between raw time (standard partitioning clustering)  Proximity between underlying processes (model based clustering) We use proximity between raw time series after proper normalization in the machine learning algorithms and model based clustering in the neural network framework. “Time-series clustering – A decade review” Saeed Aghabozorgi Ali Seyed Shirkhorshidi TehYing Wah, 2015
  • 26. II. Deep Learning contribution Confidential - all right reserved26 Improve the clustering (optimized inside the neural network) Weight the features based on their importance in forecasting daily evolution of returns Gain more flexibility
  • 27. III. Out-Performance Shape Confidential - all right reserved27 Performances varies with the asset features; for a set of assets, realized performances in backtesting are outstanding. -2 0 2 4 6 8 10 12 14 0,25 0,5 0,75 1 1,25 1,5 0,25 0,5 0,75 1 1,25 1,5 0,25 0,5 0,75 1 1,25 1,5 PL_sum_stop_1:1 PL_sum PL_sum_stop_1:0.5 Backtesting EURUSD P&L for different trading strategies (see appendix) Number of Trades 0 1000 2000 3000 4000 5000 6000 0,25 0,5 0,75 1 1,25 1,5 0,25 0,5 0,75 1 1,25 1,5 0,25 0,5 0,75 1 1,25 1,5 N_trades
  • 28. Is the Algorithm the «New Asset Allocation»? Confidential - all right reserved28 • The combination trading strategy + algorithm works as a P&L regularizer in back testing, avoiding large swing with a positive average return (figure below) • Algo strategy could serve as an asset for portfolio allocation Volatility of daily return: strategy vs underlying asset These return distributions are exactly the same as the ones we saw before for HFR and Eureka indexes Distribution of asset daily return and strategy P&L
  • 29. Agenda Confidential - all right reserved29 Introduction to A.I.4Trading Project New Techniques, New tools From Technical Analysis to Pattern Recognition From Factor Analysis to Autoencoders
  • 30. Autoencoders Confidential - all right reserved30 • Autoencoders are a comprehensive category of Neural Network • In the process of rebuilding the input, they try to find an “informative representation” of the original data. • They represent the natural choice for modelling relative value in finance. • They contain as special (linear) cases: • Independent component analysis • Clustering analysis • Principal component analysis • Archetypal analysis They can be further generalized to take in account non linearities and probalistic structure of the “hidden variables”
  • 31. Python Confidential - all right reserved31 # process file.txt and print # all the words ending in ing for line in open("file.txt"): for word in line.split(): if word.endswith('ing'): print word • Simple yet powerful programming language • Object-oriented: line is a string object so has a “method” split(), word is a string object so has a “method” ends with with the argument 'ing' • Highly readable • Shallow learning curve, facilitates interactive exploration, permits data and methods to be encapsulated and re-used easily, permits attributes to be added to objects on the fly, and permits variables to be typed dynamically, facilitating rapid development. • Extensive standard library • Heavily used in industry, scientific research, and education
  • 32. PCA Confidential - all right reserved32 • Dimensionality reduction technique: mapping multidimensional data into a lower dimensional space with minimal loss of information. • First principal component: direction in space, along which, projections have the largest variance • Second principal component: direction, which maximizes variance among all directions orthogonal to the first, and so on… 𝑌 = 𝑊 ⋅ 𝑋 𝑋 = 𝑊 𝑇 ⋅ 𝑌 𝑉𝑎𝑟 𝑋 = 𝑊Λ𝑊 𝑇 𝑉𝑎𝑟 𝑌 = Λ • In Python, just few lines of code # imports the PCA class and finds a # projection over 3 components from sklearn.decomposition import PCA n_comp = 3 pca = PCA(n_comp, whiten=False) proj = pca.fit_transform(x_train) print pca.components_.T
  • 33. Autoencoder Confidential - all right reserved33 • Neural Network trained to give as output the input itself • Two networks: Encoder, Decoder • Encoder extracts few features from the data • Decoder reconstructs the data from the features 𝑌 = 𝜎1(𝑊1 ⋅ 𝑋 + 𝑏1) 𝑋 = 𝜎2 𝑊2 ⋅ 𝑌 + 𝑏2 • Can use nonlinearities to give better results
  • 34. Implementation Confidential - all right reserved34 • Encoder, no bias, tied weights 𝑌 = 𝑊 𝑇 ⋅ 𝑋 • Decoder, simple matrix multiplication 𝑋 = 𝑊 ⋅ 𝑌 • Model, just call encoder inside decoder • Loss: MSE of the estimate 𝐸 ∥ 𝑋 − 𝑋 ∥2 = 𝐸[∥ 𝑋 − 𝑊 𝑇 (W ⋅ 𝑋) ∥2 ] # Building the encoder def encoder(x): layer_1 = x layer_2 = tf.matmul(layer_1, tf.transpose(weights['decoder_h1'])) return layer_2 # Building the decoder def decoder(x): layer_1 = tf.matmul(x, weights['decoder_h1']) layer_2 = layer_1 return layer_2 # Construct model encoder_op = encoder(X) decoder_op = decoder(encoder_op) y_pred = decoder_op # Define loss and optimizer, minimize the squared error loss = tf.reduce_mean(tf.pow(y_true - y_pred, 2)) optimizer = tf.train.AdamOptimizer(learning_rate_v).minimize(loss)
  • 35. Shape of hidden factors (PCA vs AE) -1 -0,8 -0,6 -0,4 -0,2 0 0,2 0,4 0,6 0,8 Second AE component -1 -0,8 -0,6 -0,4 -0,2 0 0,2 0,4 0,6 0,8 First PCA component -1 -0,8 -0,6 -0,4 -0,2 0 0,2 0,4 0,6 0,8 First AE component -1 -0,8 -0,6 -0,4 -0,2 0 0,2 0,4 0,6 0,8 Second PCA component -1 -0,8 -0,6 -0,4 -0,2 0 0,2 0,4 0,6 0,8 Third AE Component -1 -0,8 -0,6 -0,4 -0,2 0 0,2 0,4 0,6 0,8 Third PCA component See our paper “PCA vs AE: an application to CDS market” https://goo.gl/jhEB7w
  • 36. NVIDIA Partner – DLI training courses We are officially certified by NVIDIA as “Deep Learning Instructor” FUNDAMENTALS OF DEEP LEARNING FOR COMPUTER VISION FUNDAMENTALS OF DEEP LEARNING FOR MULTIPLE DATA TYPES FUNDAMENTALS OF DEEP LEARNING FOR NATURAL LANGUAGE PROCESSING FUNDAMENTALS OF ACCELERATED COMPUTING WITH CUDA C/C++ For more info email us at DLI@ags-it.com
  • 37. NVIDIA Partner – DLI training courses UPCOMING COURSE FUNDAMENTALS OF DEEP LEARNING FOR COMPUTER VISION FUNDAMENTALS OF DEEP LEARNING FOR MULTIPLE DATA TYPES FUNDAMENTALS OF DEEP LEARNING FOR NATURAL LANGUAGE PROCESSING FUNDAMENTALS OF ACCELERATED COMPUTING WITH CUDA C/C++ Course contents FUNDAMENTALS OF DEEP LEARNING FOR MULTIPLE DATA TYPES • Goals o Understanding key principles of Natural Language Processing o Learning the architecture of Recurrent Neural Networks and LSTM cells o Learning the use of one-hot coding o Learning the use of Tensorflow o Being able to coordinate the use of neural networks with different structures to exploit their respective specificities • Prerequisites o Basic Knowledge of Computer Vision o Basic Knowledge of Convolutional Neural Network o Knowledge of python language and eventually notebooks For more info, email us at DLI@ags-it.com
  • 38. Confidential - all right reserved38 THANK YOU www.ai4trading.com ai4trading@ags-it.com cristiana.corno@ags-it.com
  • 39. Confidential - all right reserved39 DISCLAIMER The information in this document has been prepared by Advanced Global Solution AGS S.p.A. (VAT IT01692340035, also as AGS S.p.A.) and is general background information about AGS activities current as at the date of this presentation. This information is given in summary form and does not purport to be complete. Information in this presentation, including forecast financial information, should not be considered as advice or a recommendation to investors or potential investors in relation to holding, purchasing or selling securities or other financial products or instruments. All securities and financial product or instrument transactions involve risks, which include (among others) the risk of adverse or unanticipated market, financial or political developments and, in international transactions, currency risk. All industrial and intellectual property rights on any information that AGS S.p.A. communicate or make available in this document, as well as on the results of the experimental activities carried out are and remain of AGS S.p.A. The communication or making available of such Confidential Information or the results achieved cannot be considered an assignment or license of industrial or intellectual property rights by AGS S.p.A.
  • 40. Confidential - all right reserved40 Appendix 1 Deep Tapped Delay Line training predict Input Output Hidden layer Layers Layers Layers Layers y[t*+1] y[t*+2] y[t*+3] y[t*+4] x[start:t*] x[t*+1] x[t*+2] x[t*+3]
  • 41. Confidential - all right reserved41 Appendix 2 Market Clock: performances assumptions The P&L of the strategies are calculated as a passive strategy re-evaluated at each 30m time stamp. The trading strategy consists of starting the position on the signal above/below a certain threshold, keepening the position until the end of day and reverting it if signal changes. The threshold is defined as a function of the forecast and its standard deviation. Three zeta version have been tested, based on the forecasting horizon (next 30 minute or End of the day): Zeta_eod= (last_obs-forecast_eod)/std(forecast_eod) Zeta_next= (last_obs-forecast_next)/std(forecast_next) Zeta_star= (last_obs-forecast_eod)/std(forecast_next)