Download as pdf or txt
Download as pdf or txt
You are on page 1of 47

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/325170961

Emerging Trends and Models in Quantitative Finance - Modelling Volatility,


Volume and Trading strategy

Presentation · January 2017


DOI: 10.13140/RG.2.2.32866.22728

CITATIONS READS

0 296

1 author:

Carlin Chun-fai Chu


The Open University of Hong Kong
15 PUBLICATIONS   11 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Financial Trading View project

High-frequency volatility View project

All content following this page was uploaded by Carlin Chun-fai Chu on 16 May 2018.

The user has requested enhancement of the downloaded file.


Emerging Trends and Models in
Quantitative Finance
- Modelling Volatility, Volume and Trading strategy
Dr. Carlin Chu, The Open University of Hong Kong

10th Asia-Pacific Conference on Global Business,


Economics, Finance and Social Sciences
(AP17Hong Kong Conference)

1
Coverage of this presentation

Volatility Intraday Automatic Deep


(Risk) Trading modeling learning
• Hansen (2012- Volume • Hendry & model
2016) Doornik (2009)
• Brownless • Keras software
• Engle (2016)
(2011) • Akita (2016)
• Bollerslev (2016)
Why finding volatility (S.D.) is difficult ?

Pocket money
(Random amount)

Do you know the


underlying variation (S.D.) ?
3
How to find the S.D ?

Give me more times and


I can find the S.D.
4
If the S.D. is not constant ?
e.g.
More variation at the beginning of month
Less variation at the end of month

Million dollars question ……

5
Robert Engle
(Nobel Prize winner)

 Time series model to handle non-constant S.D.


(variance)
 Non-constant variance (Heteroskedasticity)
 ARCH (Autoregressive Conditional
Heteroskedasticity)
 GARCH
 Model the financial returns with non-constant
variance

6
Introduction to GARCH
 Generalized Autoregressive Conditional Heteroscedasticity
(GARCH)

Mean equation: model the daily returns

Variance equation: model the non-constant variance (variation)

Volatility Trading Automatic Deep learning


(Risk) Volume modeling model 7
Time series model (How does the returns evolve)
 Properties of financial returns
 Non-constant standard
deviation
 Volatility clustering: "large
changes tend to be followed by
large changes, of either sign,
and small changes tend to be
followed by small changes."
 Market reacts to negative
returns more heavily (Leverage
effect)
 Mean model and Variance
model
 Mean eqt. – ARIFMA
 Variance eqt. – GARCH, MEM

Volatility Trading Automatic Deep learning


(Risk) Volume modeling model 8
Hansen et al. 2012

Time series model

Daily return GARCH

Realized
GARCH

Intraday Realized
returns Kernel

Point estimator

Volatility Trading Automatic Deep learning


(Risk) Volume modeling model 9
Hansen et al. 2012

10
Hansen et al. 2014
Time series model
Multivariate
Realized
Daily return GARCH GARCH
(for betas)

Realized
GARCH

Intraday Realized
returns Kernel

Point estimator

Volatility Trading Automatic Deep learning


(Risk) Volume modeling model 11
Hansen et al. 2014 – for beta risk
Beta is used to indicate whether an investment
is more or less volatile than the market.

( , )
=
( )

Volatility Trading Automatic Deep learning


(Risk) Volume modeling model 12
Hansen et al. 2016
Time series model
Multivariate
Daily GARCH Realized
return GARCH

Realized
GARCH

Application to
Intraday Realized option pricing
returns Kernel (Closed-form
formula)
Point estimator

Volatility Trading Automatic Deep learning


(Risk) Volume modeling model 13
Hansen et al. 2016 – for option pricing
 Black-Scholes – Constant variance
 New formula: Non-constant variance, GARCH type model

Volatility Trading Automatic Deep learning


(Risk) Volume modeling model 14
GARCH (Additive)

MEM (Multiplicative)
- non-negative value

HAR
15
Specifically for Non-negative series
 Multiplicative Error Model (MEM) – Univariate version

 An innovation process with nonnegative support


 Realized volatility, Volume and number of trades

Volatility Trading Automatic Deep learning


(Risk) Volume modeling model 16
Introduction to Copula
 It is a multivariate joint cumulative probability distribution with uniform
marginal probability distribution of each variable.

 Provide a way to model the relationship among variables with different


distributional properties.

 It is frequently used in financial evaluations.


 Credit scoring
 Portfolio aggregation normal Exponential

 Loss aggregation
 Value-at-Risk analysis
t-distribution Copulas

Gamma
distribution

Volatility Trading Automatic Deep learning


(Risk) Volume modeling model 17
Cipollini, Engle and Gallo (2016)
 Copula-based Specification of vector MEMs

 Detailed the MLE procedure for parameters estimation

 Applications on Realized volatility, Volume and number of trades

 Better forecasted on Realized volatility (Significant at 5% level of


Diebold-Mariano test)

MEM Copulas

Volatility Trading Automatic Deep learning


(Risk) Volume modeling model 18
Bollerslev, Patton and Quaedvlieg (2016)
 Improved version for time series modeling of realized variance
 Improved Heterogeneous Autoregressive regression (HAR)

Typical HAR : Daily, Weekly, Monthly

Volatility Trading Automatic Deep learning


(Risk) Volume modeling model 19
Coverage of this presentation

Volatility (Risk) Intraday Automatic Deep learning


• Hansen (2012- Trading modeling model
2016) Volume • Hendry & • Keras software
• Engle (2016) Doornik (2009) • Akita (2016)
• Brownless (2011)
• Bollerslev (2016)
Brownlees et al. (2011)
 Intra-daily volume model : time dependence, intra-daily
periodicity and volume asymmetry

Volatility Trading Automatic Deep learning


(Risk) Volume modeling model 21
Coverage of this presentation

Volatility (Risk) Trading Automatic Deep learning


• Hansen (2012- Volume modeling model
2016) • Brownless (2011) • Hendry & • Keras software
• Engle (2016) Doornik (2009) • Akita (2016)
• Bollerslev (2016)
Automated modelling process
 Econometric models : reduction from some unknown data
generation process (DGP) - David F. Hendry
 General-to-specific (Gets) modelling
 Oxmetrics, PcGive
 Models that show no losses are considered to be congruent.
 General Unrestricted Model (GUM)

From: = + +
To: = ′ ′ + ′ ′ +

Volatility Trading Automatic Deep learning


(Risk) model
23
Volume modeling
Volatility Trading Automatic Deep learning 24
(Risk) Volume modeling model
Automated modelling process (Gets)

Variables (GUM) Variables (Retained)

General-
to-
Specific
(Gets)

“General-to-specific Modeling: An Overview and Selected Bibliography”,


Julia Campos, Neil R. Ericsson, and David F. Hendry, Board of Governors of
the Federal Reserve System, International Finance Discussion Papers,
Number 838, August 2005

Volatility Trading Automatic Deep learning


(Risk) Volume modeling model 25
Coverage of this presentation

Volatility (Risk) Trading Automatic Deep learning


• Hansen (2012- Volume modeling model
2016) • Brownless (2011) • Hendry & • Keras software
• Engle (2016) Doornik (2009) • Akita (2016)
• Bollerslev (2016)
Market
Noise Price
Jump
Personal component
blog

Investors'
sentiment
News
paper
Economic
environment Volatility
clustering

27
The reason why every one of you describing the elephant differently
is because each of you touch the different part of the elephant.

Actually, the elephant has all the features that you have mentioned.

28
How to make use of different types
of information ?
Stock market
• Price
• Volatility
Personal blogs • Volume Economic
• Multimedia factors
commentary • CPI
• GDP
• Retail sales

News media Company

??
• Bloomberg factors
• Releases from • P/E ratio
Stock exchange • ROE
• Debt ratio

Volatility Trading Automatic Deep learning


(Risk) Volume modeling model 29
 Ancient China board game: GO
 Possible number of moves is larger than the total number
of atoms in the world. Exhaustive search is not possible.
 Artificial Neural Network

Volatility Trading Automatic Deep learning


(Risk) Volume modeling model 30
Why deep ANN does not work before ?

 Vanishing gradient problem,


cannot have too many
layers

 Takes too long to train


 gradient becomes zero
 Inaccurate

Volatility Trading Automatic Deep learning


(Risk) Volume modeling model 31
How to work out the deep learning NN
now ?
 It works now because:
 Restricted Boltzmann Machine (RBM)
(Ruslan et al. , Geoffrey Hinton 2006)

 Tailored network connections


(specific constraints) and training
methods

 Higher computation power: using


GPU for efficient computation (over
100x) – 2008; Intel Scalable Systems
Framework (Intel SSF) - 2015

Cloud computing

Volatility Trading Automatic Deep learning


(Risk) Volume modeling model 32
Akita et al. (2016)
News (Textual) + Stock Price (Numerical)
• Info from News article stream +
Daily open price  Close price

• Prediction for 10 company


using input dimension=1000

• Recurrent NN: Long Short-Term


Memory (LSTM)

 Deep Learning for Stock Prediction Using Numerical and Textual Information
(Akita et al. 2016)
Volatility Trading Automatic Deep learning
(Risk) Volume modeling model 33
What do you learn from AlphaGo
(DeepMind) ?
 Deep learning architecture (Deep Artificial Neural Network)

 Design to solve unstructured problem (general purpose)

 Reinforcement learning (unsupervised learning)


 Learn by itself

 Part of it is written on TensorFlow (open source software library)


https://www.tensorflow.org/

 Personal recommendation: Begin with Keras (python neural


networks library, capable of running on top of either TensorFlow or
Theano) https://keras.io/

Volatility Trading Automatic Deep learning


(Risk) Volume modeling model 34
c

 Ref: https://keras.io/layers/recurrent/

Volatility Trading Automatic Deep learning


(Risk) Volume modeling model 35
# LSTM for international airline passengers problem with window regression framing # make predictions
import numpy trainPredict = model.predict(trainX)
import matplotlib.pyplot as plt testPredict = model.predict(testX)
import pandas
# invert predictions
import math
from keras.models import Sequential trainPredict = scaler.inverse_transform(trainPredict)
from keras.layers import Dense trainY = scaler.inverse_transform([trainY])
from keras.layers import LSTM testPredict = scaler.inverse_transform(testPredict)
from sklearn.preprocessing import MinMaxScaler testY = scaler.inverse_transform([testY])
from sklearn.metrics import mean_squared_error
# calculate root mean squared error
# convert an array of values into a dataset matrix
def create_dataset(dataset, look_back=1): trainScore = math.sqrt(mean_squared_error(trainY[0], trainPredict[:,0]))
dataX, dataY = [], [] print('Train Score: %.2f RMSE' % (trainScore))
for i in range(len(dataset)-look_back-1): testScore = math.sqrt(mean_squared_error(testY[0], testPredict[:,0]))
a = dataset[i:(i+look_back), 0] print('Test Score: %.2f RMSE' % (testScore))
dataX.append(a)
# shift train predictions for plotting
dataY.append(dataset[i + look_back, 0])
return numpy.array(dataX), numpy.array(dataY) trainPredictPlot = numpy.empty_like(dataset)
# fix random seed for reproducibility trainPredictPlot[:, :] = numpy.nan
numpy.random.seed(7) trainPredictPlot[look_back:len(trainPredict)+look_back, :] = trainPredict
# load the dataset # shift test predictions for plotting
dataframe = pandas.read_csv('international-airline-passengers.csv', usecols=[1],
testPredictPlot = numpy.empty_like(dataset)
engine='python', skipfooter=3)
dataset = dataframe.values testPredictPlot[:, :] = numpy.nan
dataset = dataset.astype('float32') testPredictPlot[len(trainPredict)+(look_back*2)+1:len(dataset)-1, :] = testPredict
# normalize the dataset # plot baseline and predictions
scaler = MinMaxScaler(feature_range=(0, 1)) plt.plot(scaler.inverse_transform(dataset))
dataset = scaler.fit_transform(dataset)
plt.plot(trainPredictPlot)
# split into train and test sets
train_size = int(len(dataset) * 0.67) plt.plot(testPredictPlot)
test_size = len(dataset) - train_size plt.show()
train, test = dataset[0:train_size,:], dataset[train_size:len(dataset),:]
# reshape into X=t and Y=t+1
look_back = 3
trainX, trainY = create_dataset(train, look_back)
testX, testY = create_dataset(test, look_back)
# reshape input to be [samples, time steps, features]
trainX = numpy.reshape(trainX, (trainX.shape[0], 1, trainX.shape[1]))
testX = numpy.reshape(testX, (testX.shape[0], 1, testX.shape[1]))
# create and fit the LSTM network
model = Sequential()
model.add(LSTM(4, input_dim=look_back))
model.add(Dense(1))
model.compile(loss='mean_squared_error', optimizer='adam')
model.fit(trainX, trainY, nb_epoch=100, batch_size=1, Volatility
verbose=2) Trading Automatic Deep learning
(Risk) Volume modeling model 36
 Ref: http://machinelearningmastery.com/time-series-prediction-lstm-recurrent-
neural-networks-python-keras/

Volatility Trading Automatic Deep learning


(Risk) Volume modeling model 37
Overall relationship
Company
News

Uptrend /
Personal Downtrend
Multi-media feature
blogs extraction

LSTM Trading
Profit
Market strategy
price
When ?
Returns Forecasted Amount ?
Price/Return Stop loss ?
Copula

GETS
Realized
Variance
Economic
factors 38
Thank you for your kind attention.
Hope you find this presentation interesting.

39
Reference (1)

 Designing Realized Kernels to Measure the ex post Variation of Equity Prices in the Presence of Noise, Ole E. Barndorff-Nielsen, Peter R. Hansen,
Asger Lunde, Neil Shephard, Econometrica, Vol. 76, No. 6, 2008, pp. 1481-1536,

 Econometric Modelling, David F. Hendry , Nuffield College, Oxford University, July 18, 2000

 General-to-specific Modeling: An Overview and Selected Bibliography, Julia Campos, Neil R. Ericsson, and David F. Hendry, Board of Governors of the
Federal Reserve System, International Finance Discussion Papers, Number 838, August 2005

 Peter Reinhard Hansen (and his team) :


 Option Pricing with the Realized GARCH Model: An Analytical Approximation Approach, Journal of Futures Markets (November 2016)
 Realized beta GARCH: a multivariate GARCH model with realized measures of volatility, Journal of Applied Econometrics (Aug 2014)
 Realized garch: a joint model for returns and realized measures of volatility, Journal of Applied Econometrics (Sep 2012)

 Fabrizio Cipollini (and his team) :


 Copula-Based Specification of Vector MEMs, Social Science Research Network (SSRN) 2759451 (Apr 2016)

 Christian T. Brownlees:
 Intra-daily Volume Modeling and Prediction for Algorithmic Trading, Journal of Financial Econometrics (Jun 2010)

40
Reference (2)

 Tim Bollerslev (and his team) :


 Roughing up beta: Continuous versus discontinuous betas and the cross section of expected stock returns, Journal of Financial Economics (2016)

 Deep Learning for Stock Prediction Using Numerical and Textual Information (Akita et al. 2016)

 Restricted Boltzmann Machines for Collaborative Filtering, by Ruslan, Mnih and Hinton, Proceedings of the 24th International Conference on Machine
Learning

 An Old Problem - Ep. 5 (Deep Learning SIMPLIFIED) https://www.youtube.com/watch?v=SKMpmAOUa2Q

 Read Aloud Classics: The Blind Men and the Elephant Big, Phoebe Franklin, Newmark Learning, 2014

 GPUs are only up to 14 times faster than CPUs says INTEL https://blogs.nvidia.com/blog/2010/06/23/gpus-are-only-up-to-14-times-faster-than-
cpus-says-intel/

 What is GPU-accelerated computing? http://www.nvidia.com/object/what-is-gpu-computing.html

 Google AI to play live Go match against world champion https://www.google.com.hk/amp/www.bbc.co.uk/news/amp/35501537

 Human board game champion again outwitted by Google program http://money.cnn.com/2016/03/10/technology/alphago-google-deepmind-go-


lee-computer/

 Jurgen A Doornik: Ox, PcGive website: https://www.doornik.com/

41
A person cannot possibly seek what he knows, and,
just as impossibly, he cannot seek what he does
not know, for what he knows he cannot seek,
since he knows it, and what he does not know he
cannot even seek because, after all, he does not
even know what he is supposed to seek.

- Søren Kierkegaard (1813-1855), Philosophical


Fragments

42
 Quantitative models for Risk (Variance) and Return ?
 Portfolio management
 Option valuation issue
 Risk management issue
 etc…

 Point estimator vs. Time series model

Volatility Trading Automatic Deep learning


(Risk) Volume modeling model 43
Expected values /
Point estimator Time series modeling
(how does it change ?)

Volatility Trading Automatic Deep learning


(Risk) Volume modeling model 44
Point estimator & Time series model

Point estimate (Expected value)


- Average return
- Variation (e.g. Standard deviation, Variance)

Time series model (how does the returns evolve ?)


- Non-constant variance (Heteroskedasticity)
- Auto-regression
- Moving averages
- ARMA/ARIMA/ARIFMA
- Exogenous variables
- ARIFMAX
 for forecasting purpose

Volatility Trading Automatic Deep learning


(Risk) Volume modeling model 45
Point estimate (for a specific time period)
 Return
 Average return (log difference return, continuous compounding)

 Variance
 Integrated Variance (IV)

 Realized Variance (RV) - Nielsen & Shephard, 2002

 Jump component : Power and Bipower variation with stochastic volatility


and jumps - Nielsen & Shephard, 2003

 Realized Kernel (RK) - Nielsen, Hansen, Lunde & Shephard, 2008

Volatility Trading Automatic Deep learning


(Risk) Volume modeling model 46

View publication stats

You might also like