9
Modeling and analysis of financial crashes using empirical market microstructure with parallel computations in R Master in Finance & Information Technology program Perm State National Research University Arbuzov Vyacheslav Ph.D. student [email protected] R/Finance 2013: Applied Finance with R May 18, Chicago, IL, USA

Modeling and analysis of financial crashes using …past.rinfinance.com/agenda/2013/talk/VyacheslavArbuzov.pdfusing empirical market microstructure with parallel computations in R

Embed Size (px)

Citation preview

Page 1: Modeling and analysis of financial crashes using …past.rinfinance.com/agenda/2013/talk/VyacheslavArbuzov.pdfusing empirical market microstructure with parallel computations in R

Modeling and analysis of financial crashes

using empirical market microstructure with

parallel computations in R

Master in Finance & Information Technology program

Perm State National Research University

Arbuzov Vyacheslav Ph.D. student

[email protected]

R/Finance 2013: Applied Finance with R May 18, Chicago, IL, USA

Page 2: Modeling and analysis of financial crashes using …past.rinfinance.com/agenda/2013/talk/VyacheslavArbuzov.pdfusing empirical market microstructure with parallel computations in R

Architecture of cluster

2

Installation Site: Perm State National

Research University

Supercomputer type: Cluster

Number of nodes: 9

Total Number of Cores: 108

CPU type: Intel Xeon 5650 (2.66 GHz)

RAM per node: 64 Gb

OS: Windows Server 2003

Cluster for Reverse Engineering and Agent-based Modeling of Market

Microstructure in Perm State National Research University

Page 3: Modeling and analysis of financial crashes using …past.rinfinance.com/agenda/2013/talk/VyacheslavArbuzov.pdfusing empirical market microstructure with parallel computations in R

Using R in cluster

Database

Batch file File.R

Batch file

Batch file

Task Runner

Commands from GUI

File.R

File.R

In our work we use:

package rusquant

package RODBC

t.test

nls commandArgs

and some other standard commands…

Page 4: Modeling and analysis of financial crashes using …past.rinfinance.com/agenda/2013/talk/VyacheslavArbuzov.pdfusing empirical market microstructure with parallel computations in R

Model Log Periodic Power Law (LPPL)

Model has been developed as a flexible tool to detect bubbles. The LPPL model considers the faster-than-exponential increase in asset prices decorated by accelerating oscillations as the main diagnostic of bubbles… Authors : A.Johansen, O.Ledoit, D.Sornette (JLS) Sources:

Modeling of financial crashes

Empirical price

Family of LPPL models

ln p t = A + B(tc − t)m+C1(tc − t)m cos ω log tc − t +C2(tc − t)m sin ω log tc − t

The procedure for

estimation of

parameters

0t

ctm

A

B

ln[ ( )]p t

Filter

𝐶1

𝐶2

Page 5: Modeling and analysis of financial crashes using …past.rinfinance.com/agenda/2013/talk/VyacheslavArbuzov.pdfusing empirical market microstructure with parallel computations in R

5

Results of modeling bubbles (Russian financial market, 2010 – 2012)

Modeling of financial crashes

Page 6: Modeling and analysis of financial crashes using …past.rinfinance.com/agenda/2013/talk/VyacheslavArbuzov.pdfusing empirical market microstructure with parallel computations in R

Market hierarchy

Page 7: Modeling and analysis of financial crashes using …past.rinfinance.com/agenda/2013/talk/VyacheslavArbuzov.pdfusing empirical market microstructure with parallel computations in R

Frequency

• How often orders are coming?

Width

• In what part of order book orders are coming?

Volume

• What is the volume of coming orders?

Order flow characteristics

Price

Volume Volume Volume

Price Price

Page 8: Modeling and analysis of financial crashes using …past.rinfinance.com/agenda/2013/talk/VyacheslavArbuzov.pdfusing empirical market microstructure with parallel computations in R

Changes in order

flow

Price deviation from best ask/best bid

Duration time between orders

Volume of orders

GROWTH

HOT!

NORMAL

Analysis of financial crashes using empirical market microstructure

Main idea to compare changes in microstructure of bubbles and non bubbles…

We use commercial data from Moscow exchange about order flow (orderlog)

Industry Number of

bubbles Energy 8

Ferrous metallurgy 1 Non-ferrous extractive

metallurgy 1

Engineering 3 Retailing 2 Transport 1

Pharmaceutics 1 Finance 2

Chemistry 1

In each bubble, we calculated changes of characteristics from NORMAL to HOT situation…

Page 9: Modeling and analysis of financial crashes using …past.rinfinance.com/agenda/2013/talk/VyacheslavArbuzov.pdfusing empirical market microstructure with parallel computations in R

[email protected] r-group.mifit.ru

For more details,

see attachment R code in

r-group.mifit.ru