SlideShare uma empresa Scribd logo
1 de 15
Baixar para ler offline
Market Microstructure Simulator: Strategy Definition
Language
Anton Kolotaev
Chair of Quantitative Finance, ´Ecole Centrale Paris
anton.kolotaev@gmail.com
March 14, 2014
Anton Kolotaev (ECP) FiQuant Market Simulator March 14, 2014 1 / 15
Overview
1 Introduction
Motivation
Design Goals
Library Content
Web Interface
2 Strategy Definition Language
Motivation
Functions
Classes
Class Inheritance
Example
Summary
Anton Kolotaev (ECP) FiQuant Market Simulator March 14, 2014 2 / 15
Motivation
Last years financial market microstructure attracts more and more
attention due to its potential capability to explain some macroscopic
phenomena like liquidity crisis, herd behaviour that were observed during
recent crises. Researchers in this field need a simulation tool that would
support them in their theoretical studies. This tool would take into
account in exhaustive and precise manner market rules:
1 how orders are sent to the market
2 how they are matched
3 how information is propagated
Simulator architecture should allow to model any behaviour of market
agents, i.e. to be very flexible in trading strategies definition. It might be
used to study impact on market caused by changing tick size, introducing
a new order type, adding a new order matching rule.
Anton Kolotaev (ECP) FiQuant Market Simulator March 14, 2014 3 / 15
Design Goals
1 Flexibility and Extensibility. A simulation library must have a very
modular design in order to provide a high level of flexibility to the
user. This requirement comes from the original purpose of a
simulation as a test bed for experiments with different models and
parameters.
2 Used-friendliness. Since a typical simulation model is composed of
many hundreds and thousands blocks, it is very important to provide
a simple way for user to tell how a behaviour wanted differs from the
default one. Simulator API should be friendly to modern IDEs with
intellisense support
3 Performance. A user should be allowed to choose between small
start-up time and high simulation speed.
Anton Kolotaev (ECP) FiQuant Market Simulator March 14, 2014 4 / 15
Library Content
Implemented so far:
1 Strategies:
1 Side based strategies:
1 Signals: Trend Follower, Crossing Averages
2 Fundamental Value: Mean Reversion, Pair Trading
2 Desired position based strategies: RSI, Bollinger Bands
3 Price based strategies: Liquidity Provider, Market Data, Market Maker
4 Adaptive strategies: Trade-If-Profitable, Choose-The-Best,
MultiarmedBandit
5 Arbitrage strategy
2 Meta-orders: Iceberg, StopLoss, Peg, FloatingPrice,
ImmediateOrCancel, WithExpiry
3 Statistics: Moving/Cumulative/ExponentiallyWeighted
Average/Variance, RSI, MACD etc
4 Fast queries: Cumulative volume of orders with price better than
given one etc.
5 Local and remote order books
Anton Kolotaev (ECP) FiQuant Market Simulator March 14, 2014 5 / 15
Web interface
Web interface allows to compose a market to simulate from existing
objects and set up their parameters
Anton Kolotaev (ECP) FiQuant Market Simulator March 14, 2014 6 / 15
Rendering results
Anton Kolotaev (ECP) FiQuant Market Simulator March 14, 2014 7 / 15
Motivation for a dedicated language
1 Syntax. We may design an external DSL so its syntax describes very
well domain specific abstractions.
2 Error checking. A DSL compiler can detect incorrect parameter
values as soon as possible thus shortening simulation development
cycle and facilitating refactorings.
3 Multiple target languages. A DSL can be compiled into different
languages: e.g. into Python to provide fast start-up and into C++ to
have highly optimized fast simulations. A new target language
introduced, only simple modules need to be re-written into it;
compound modules will be ported automatically.
4 IDE support. Modern IDEs like Eclipse, Intellij IDEA allow writing
plug-ins that would provide smart syntax highlighting,
auto-completion and check errors on-the-fly for user-defined DSLs.
5 High-level optimizations are easier to implement.
Anton Kolotaev (ECP) FiQuant Market Simulator March 14, 2014 8 / 15
Functions
Functions represent compound modules of a simulation model.
Intrinsic functions represent simple modules and import classes from the
target language into the DSL.
Types for parameters and return values are inferred automatically
Anton Kolotaev (ECP) FiQuant Market Simulator March 14, 2014 9 / 15
Classes
Classes group functions and share fields among them
Anton Kolotaev (ECP) FiQuant Market Simulator March 14, 2014 10 / 15
Class Inheritance
To stimulate code re-use classes may derive from other classes
Anton Kolotaev (ECP) FiQuant Market Simulator March 14, 2014 11 / 15
Example: Signal Side Strategies
Anton Kolotaev (ECP) FiQuant Market Simulator March 14, 2014 12 / 15
Example: Signal Side Strategies Base
Anton Kolotaev (ECP) FiQuant Market Simulator March 14, 2014 13 / 15
Developed at the Chair of Quantitative Finance at ´Ecole Centrale
Paris
Source code and documentation can be found at
https://github.com/fiquant/marketsimulator
OS supported: Linux, Mac OS X, Windows
Browsers supported: Chrome, Firefox, Safari, Opera
Requirements: Scala 10.2, Python 2.7 (Flask, NumPy, Pandas, Blist,
Veusz).
Translator from the DSL into optimized C++ code is to be developed.
Anton Kolotaev (ECP) FiQuant Market Simulator March 14, 2014 14 / 15
Thank you for your attention!
Anton Kolotaev (ECP) FiQuant Market Simulator March 14, 2014 15 / 15

Mais conteúdo relacionado

Semelhante a FiQuant Market Microstructure Simulator (short version)

Maximizing Innovation through ChatGPT Powered Patent Analysis
Maximizing Innovation through ChatGPT Powered Patent AnalysisMaximizing Innovation through ChatGPT Powered Patent Analysis
Maximizing Innovation through ChatGPT Powered Patent Analysis
Alex G. Lee, Ph.D. Esq. CLP
 
Stock price prediction using stock eod of day price
Stock price prediction using stock eod of day priceStock price prediction using stock eod of day price
Stock price prediction using stock eod of day price
Ekaantik Software Solutions
 

Semelhante a FiQuant Market Microstructure Simulator (short version) (20)

Maximizing Innovation through ChatGPT Powered Patent Analysis
Maximizing Innovation through ChatGPT Powered Patent AnalysisMaximizing Innovation through ChatGPT Powered Patent Analysis
Maximizing Innovation through ChatGPT Powered Patent Analysis
 
15 Minutes of DeFi Analytics
15 Minutes of DeFi Analytics15 Minutes of DeFi Analytics
15 Minutes of DeFi Analytics
 
15 Minutes of DeFi Analytics
15 Minutes of DeFi Analytics15 Minutes of DeFi Analytics
15 Minutes of DeFi Analytics
 
Aditya report finaL
Aditya report finaLAditya report finaL
Aditya report finaL
 
IRJET- Prediction in Stock Marketing
IRJET- Prediction in Stock MarketingIRJET- Prediction in Stock Marketing
IRJET- Prediction in Stock Marketing
 
IOvents project overview
IOvents project overviewIOvents project overview
IOvents project overview
 
Machine Learning for Finance Master Class
Machine Learning for Finance Master Class Machine Learning for Finance Master Class
Machine Learning for Finance Master Class
 
[ETHCon Korea 2019] Park Chanhyun 박찬현
[ETHCon Korea 2019] Park Chanhyun 박찬현[ETHCon Korea 2019] Park Chanhyun 박찬현
[ETHCon Korea 2019] Park Chanhyun 박찬현
 
Sgd teaching-consulting-10-jan-2009 (1)
Sgd teaching-consulting-10-jan-2009 (1)Sgd teaching-consulting-10-jan-2009 (1)
Sgd teaching-consulting-10-jan-2009 (1)
 
Exploring the upside of risk: optimize the IT portfolio
Exploring the upside of risk: optimize the IT portfolioExploring the upside of risk: optimize the IT portfolio
Exploring the upside of risk: optimize the IT portfolio
 
Deep learning in algorithmic trading
Deep learning in algorithmic tradingDeep learning in algorithmic trading
Deep learning in algorithmic trading
 
Prediction system report and results-Jay Vora
Prediction system report and results-Jay VoraPrediction system report and results-Jay Vora
Prediction system report and results-Jay Vora
 
INFORMS 2015
INFORMS 2015INFORMS 2015
INFORMS 2015
 
OPENING RANGE BREAKOUT STOCK TRADING ALGORITHMIC MODEL
OPENING RANGE BREAKOUT STOCK TRADING ALGORITHMIC MODELOPENING RANGE BREAKOUT STOCK TRADING ALGORITHMIC MODEL
OPENING RANGE BREAKOUT STOCK TRADING ALGORITHMIC MODEL
 
Stock price prediction using stock eod of day price
Stock price prediction using stock eod of day priceStock price prediction using stock eod of day price
Stock price prediction using stock eod of day price
 
Abc financial analyticsdemo
Abc financial analyticsdemoAbc financial analyticsdemo
Abc financial analyticsdemo
 
IRJET- Stock Market Prediction using Machine Learning Techniques
IRJET- Stock Market Prediction using Machine Learning TechniquesIRJET- Stock Market Prediction using Machine Learning Techniques
IRJET- Stock Market Prediction using Machine Learning Techniques
 
databricks ml flow demonstration using automatic features engineering
databricks ml flow demonstration using automatic features engineeringdatabricks ml flow demonstration using automatic features engineering
databricks ml flow demonstration using automatic features engineering
 
Predicting Intraday Prices in the Frontier Stock Market of Romania Using Mach...
Predicting Intraday Prices in the Frontier Stock Market of Romania Using Mach...Predicting Intraday Prices in the Frontier Stock Market of Romania Using Mach...
Predicting Intraday Prices in the Frontier Stock Market of Romania Using Mach...
 
Trading Day Logs Replay at TMPA-2014 (Trading Systems Testing)
Trading Day Logs Replay at TMPA-2014 (Trading Systems Testing)Trading Day Logs Replay at TMPA-2014 (Trading Systems Testing)
Trading Day Logs Replay at TMPA-2014 (Trading Systems Testing)
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 

FiQuant Market Microstructure Simulator (short version)

  • 1. Market Microstructure Simulator: Strategy Definition Language Anton Kolotaev Chair of Quantitative Finance, ´Ecole Centrale Paris anton.kolotaev@gmail.com March 14, 2014 Anton Kolotaev (ECP) FiQuant Market Simulator March 14, 2014 1 / 15
  • 2. Overview 1 Introduction Motivation Design Goals Library Content Web Interface 2 Strategy Definition Language Motivation Functions Classes Class Inheritance Example Summary Anton Kolotaev (ECP) FiQuant Market Simulator March 14, 2014 2 / 15
  • 3. Motivation Last years financial market microstructure attracts more and more attention due to its potential capability to explain some macroscopic phenomena like liquidity crisis, herd behaviour that were observed during recent crises. Researchers in this field need a simulation tool that would support them in their theoretical studies. This tool would take into account in exhaustive and precise manner market rules: 1 how orders are sent to the market 2 how they are matched 3 how information is propagated Simulator architecture should allow to model any behaviour of market agents, i.e. to be very flexible in trading strategies definition. It might be used to study impact on market caused by changing tick size, introducing a new order type, adding a new order matching rule. Anton Kolotaev (ECP) FiQuant Market Simulator March 14, 2014 3 / 15
  • 4. Design Goals 1 Flexibility and Extensibility. A simulation library must have a very modular design in order to provide a high level of flexibility to the user. This requirement comes from the original purpose of a simulation as a test bed for experiments with different models and parameters. 2 Used-friendliness. Since a typical simulation model is composed of many hundreds and thousands blocks, it is very important to provide a simple way for user to tell how a behaviour wanted differs from the default one. Simulator API should be friendly to modern IDEs with intellisense support 3 Performance. A user should be allowed to choose between small start-up time and high simulation speed. Anton Kolotaev (ECP) FiQuant Market Simulator March 14, 2014 4 / 15
  • 5. Library Content Implemented so far: 1 Strategies: 1 Side based strategies: 1 Signals: Trend Follower, Crossing Averages 2 Fundamental Value: Mean Reversion, Pair Trading 2 Desired position based strategies: RSI, Bollinger Bands 3 Price based strategies: Liquidity Provider, Market Data, Market Maker 4 Adaptive strategies: Trade-If-Profitable, Choose-The-Best, MultiarmedBandit 5 Arbitrage strategy 2 Meta-orders: Iceberg, StopLoss, Peg, FloatingPrice, ImmediateOrCancel, WithExpiry 3 Statistics: Moving/Cumulative/ExponentiallyWeighted Average/Variance, RSI, MACD etc 4 Fast queries: Cumulative volume of orders with price better than given one etc. 5 Local and remote order books Anton Kolotaev (ECP) FiQuant Market Simulator March 14, 2014 5 / 15
  • 6. Web interface Web interface allows to compose a market to simulate from existing objects and set up their parameters Anton Kolotaev (ECP) FiQuant Market Simulator March 14, 2014 6 / 15
  • 7. Rendering results Anton Kolotaev (ECP) FiQuant Market Simulator March 14, 2014 7 / 15
  • 8. Motivation for a dedicated language 1 Syntax. We may design an external DSL so its syntax describes very well domain specific abstractions. 2 Error checking. A DSL compiler can detect incorrect parameter values as soon as possible thus shortening simulation development cycle and facilitating refactorings. 3 Multiple target languages. A DSL can be compiled into different languages: e.g. into Python to provide fast start-up and into C++ to have highly optimized fast simulations. A new target language introduced, only simple modules need to be re-written into it; compound modules will be ported automatically. 4 IDE support. Modern IDEs like Eclipse, Intellij IDEA allow writing plug-ins that would provide smart syntax highlighting, auto-completion and check errors on-the-fly for user-defined DSLs. 5 High-level optimizations are easier to implement. Anton Kolotaev (ECP) FiQuant Market Simulator March 14, 2014 8 / 15
  • 9. Functions Functions represent compound modules of a simulation model. Intrinsic functions represent simple modules and import classes from the target language into the DSL. Types for parameters and return values are inferred automatically Anton Kolotaev (ECP) FiQuant Market Simulator March 14, 2014 9 / 15
  • 10. Classes Classes group functions and share fields among them Anton Kolotaev (ECP) FiQuant Market Simulator March 14, 2014 10 / 15
  • 11. Class Inheritance To stimulate code re-use classes may derive from other classes Anton Kolotaev (ECP) FiQuant Market Simulator March 14, 2014 11 / 15
  • 12. Example: Signal Side Strategies Anton Kolotaev (ECP) FiQuant Market Simulator March 14, 2014 12 / 15
  • 13. Example: Signal Side Strategies Base Anton Kolotaev (ECP) FiQuant Market Simulator March 14, 2014 13 / 15
  • 14. Developed at the Chair of Quantitative Finance at ´Ecole Centrale Paris Source code and documentation can be found at https://github.com/fiquant/marketsimulator OS supported: Linux, Mac OS X, Windows Browsers supported: Chrome, Firefox, Safari, Opera Requirements: Scala 10.2, Python 2.7 (Flask, NumPy, Pandas, Blist, Veusz). Translator from the DSL into optimized C++ code is to be developed. Anton Kolotaev (ECP) FiQuant Market Simulator March 14, 2014 14 / 15
  • 15. Thank you for your attention! Anton Kolotaev (ECP) FiQuant Market Simulator March 14, 2014 15 / 15