This document provides an overview of the Market Microstructure Simulator and its Strategy Definition Language (DSL). It describes the evolution of the simulator from initial C++ and Python versions to the current DSL-based design. The DSL allows defining trading strategies in a flexible way and supports features like functions, types, classes and packages. Various example strategies like Relative Strength Index and Bollinger Bands are presented. The document also outlines the main components of the simulator like the scheduler, order book and basic/meta orders.
The road ahead for architectural languages [ACVI 2016]Ivano Malavolta
5th of April 2016. My presentation done at the 3rd Architecture Centric Virtual Integration Workshop (ACVI) workshop, co-located with WICSA and Comparch 2016, Venice, Italy.
Accompanying paper: http://www.ivanomalavolta.com/files/papers/IEEESoftware_2015.pdf
DevBCN Vertex AI - Pipelines for your MLOps workflowsMárton Kodok
In recent years, one of the biggest trends in applications development has been the rise of Machine Learning solutions, tools, and managed platforms. Vertex AI is a managed unified ML platform for all your AI workloads. On the MLOps side, Vertex AI Pipelines solutions let you adopt experiment pipelining beyond the classic build, train, eval, and deploy a model. It is engineered for data scientists and data engineers, and it’s a tremendous help for those teams who don’t have DevOps or sysadmin engineers, as infrastructure management overhead has been almost completely eliminated. Based on practical examples we will demonstrate how Vertex AI Pipelines scores high in terms of developer experience, how fits custom ML needs, and analyze results. It’s a toolset for a fully-fledged machine learning workflow, a sequence of steps in the model development, a deployment cycle, such as data preparation/validation, model training, hyperparameter tuning, model validation, and model deployment. Vertex AI comes with all classic resources plus an ML metadata store, a fully managed feature store, and a fully managed pipelines runner. Vertex AI Pipelines is a managed serverless toolkit, which means you don't have to fiddle with infrastructure or back-end resources to run workflows.
A very short tour through the Julia community and how key features of the language interact to produce an expressive syntax that users like without sacrificing performance
The road ahead for architectural languages [ACVI 2016]Ivano Malavolta
5th of April 2016. My presentation done at the 3rd Architecture Centric Virtual Integration Workshop (ACVI) workshop, co-located with WICSA and Comparch 2016, Venice, Italy.
Accompanying paper: http://www.ivanomalavolta.com/files/papers/IEEESoftware_2015.pdf
DevBCN Vertex AI - Pipelines for your MLOps workflowsMárton Kodok
In recent years, one of the biggest trends in applications development has been the rise of Machine Learning solutions, tools, and managed platforms. Vertex AI is a managed unified ML platform for all your AI workloads. On the MLOps side, Vertex AI Pipelines solutions let you adopt experiment pipelining beyond the classic build, train, eval, and deploy a model. It is engineered for data scientists and data engineers, and it’s a tremendous help for those teams who don’t have DevOps or sysadmin engineers, as infrastructure management overhead has been almost completely eliminated. Based on practical examples we will demonstrate how Vertex AI Pipelines scores high in terms of developer experience, how fits custom ML needs, and analyze results. It’s a toolset for a fully-fledged machine learning workflow, a sequence of steps in the model development, a deployment cycle, such as data preparation/validation, model training, hyperparameter tuning, model validation, and model deployment. Vertex AI comes with all classic resources plus an ML metadata store, a fully managed feature store, and a fully managed pipelines runner. Vertex AI Pipelines is a managed serverless toolkit, which means you don't have to fiddle with infrastructure or back-end resources to run workflows.
A very short tour through the Julia community and how key features of the language interact to produce an expressive syntax that users like without sacrificing performance
MODEL DRIVEN ARCHITECTURE, CONTROL SYSTEMS AND ECLIPSEAnže Vodovnik
This paper describes the use of model driven architecture and its application in control system development. It also presents a prototype solution based on the Eclipse framework implemented by the author.
Anže Vodovnik, Klemen Žagar, Cosylab, Ljubljana, Slovenija
2018-11-06: Unfortunately, LinkedIn/Slideshare disabled the update functionality and, thus, I had to upload an updated version of this introduction to OMNeT++ as new presentation. It is available here: https://www.slideshare.net/christian.timmerer/an-introduction-to-omnet-54
KernelF is a functional language built on top of MPS. It is designed to be highly extensible and embeddable in order to support its use at the core of domain-specific languages, realising an approach we sometimes call Funclerative Programming. 'Funclerative' is of course a mash-up of 'functional' and 'declarative' and refers to the idea of using functional programming in the small, and declarative language constructs for the larger-scale, often domain-specific, structures in a program. We have used KernelF in a wide range of languages including health and medicine, insurance contract definition, security analysis, salary calculations, smart contracts and language-definition. In this keynote, I illustrate the evolution of KernelF over the last two years. I discuss requirements on the language, and how those drove design decisions. I showcase a couple of the DSLs we built on top of KernelF to explain how MPS was used to enable the necessary language modularity. I demonstrate how we have integrated the Z3 solver to verify some aspects of programs. I present the architecture we have used to use KernelF-based DSLs in safety-critical environments. I close the keynote with an outlook on how KernelF might evolve in the future, and point out a few challenges for which we don't yet have good solutions.
Simulations on Computer Network An Improved Study in the Simulator Methodolog...YogeshIJTSRD
Generally a network simulator is used to analyse the performance and behaviour of a network. The Simulation software plays a vital role in real world implementation. The hardware setup of network topologies are very costly and strenuous to modify often. The simulators act as the protocols for a system. The simulators in network such as Ns 2, Ns 3, OMNeT , NetSim, J SIM, REAL, OPNET, OMNEST, QualNetTraNS, NTCUns etc. It is quite a tedious process to select network simulator that is based up on the requirement for a users specified job. This paper gives a comparison and a general analysis of various network simulators. J. Sumitha | S. Swathi | Ellakkiya. M "Simulations on Computer Network: An Improved Study in the Simulator Methodologies and Their Applications" Published in International Journal of Trend in Scientific Research and Development (ijtsrd), ISSN: 2456-6470, Volume-5 | Issue-4 , June 2021, URL: https://www.ijtsrd.compapers/ijtsrd41176.pdf Paper URL: https://www.ijtsrd.comcomputer-science/simulation/41176/simulations-on-computer-network-an-improved-study-in-the-simulator-methodologies-and-their-applications/j-sumitha
This issue’s feature article, Tuning Autonomous Driving Using Intel® System Studio, illustrates how the tools in Intel System Studio give embedded systems and connected device developers an integrated development environment to build, debug, and tune performance and power usage. Continuing the theme of tuning edge applications, Building Fast Data Compression Code for Cloud and Edge Applications shows how to use the Intel® Integrated Performance Primitives
to speed data compression.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
More Related Content
Similar to FiQuant Market Microstructure Simulator: Strategy Definition Language
MODEL DRIVEN ARCHITECTURE, CONTROL SYSTEMS AND ECLIPSEAnže Vodovnik
This paper describes the use of model driven architecture and its application in control system development. It also presents a prototype solution based on the Eclipse framework implemented by the author.
Anže Vodovnik, Klemen Žagar, Cosylab, Ljubljana, Slovenija
2018-11-06: Unfortunately, LinkedIn/Slideshare disabled the update functionality and, thus, I had to upload an updated version of this introduction to OMNeT++ as new presentation. It is available here: https://www.slideshare.net/christian.timmerer/an-introduction-to-omnet-54
KernelF is a functional language built on top of MPS. It is designed to be highly extensible and embeddable in order to support its use at the core of domain-specific languages, realising an approach we sometimes call Funclerative Programming. 'Funclerative' is of course a mash-up of 'functional' and 'declarative' and refers to the idea of using functional programming in the small, and declarative language constructs for the larger-scale, often domain-specific, structures in a program. We have used KernelF in a wide range of languages including health and medicine, insurance contract definition, security analysis, salary calculations, smart contracts and language-definition. In this keynote, I illustrate the evolution of KernelF over the last two years. I discuss requirements on the language, and how those drove design decisions. I showcase a couple of the DSLs we built on top of KernelF to explain how MPS was used to enable the necessary language modularity. I demonstrate how we have integrated the Z3 solver to verify some aspects of programs. I present the architecture we have used to use KernelF-based DSLs in safety-critical environments. I close the keynote with an outlook on how KernelF might evolve in the future, and point out a few challenges for which we don't yet have good solutions.
Simulations on Computer Network An Improved Study in the Simulator Methodolog...YogeshIJTSRD
Generally a network simulator is used to analyse the performance and behaviour of a network. The Simulation software plays a vital role in real world implementation. The hardware setup of network topologies are very costly and strenuous to modify often. The simulators act as the protocols for a system. The simulators in network such as Ns 2, Ns 3, OMNeT , NetSim, J SIM, REAL, OPNET, OMNEST, QualNetTraNS, NTCUns etc. It is quite a tedious process to select network simulator that is based up on the requirement for a users specified job. This paper gives a comparison and a general analysis of various network simulators. J. Sumitha | S. Swathi | Ellakkiya. M "Simulations on Computer Network: An Improved Study in the Simulator Methodologies and Their Applications" Published in International Journal of Trend in Scientific Research and Development (ijtsrd), ISSN: 2456-6470, Volume-5 | Issue-4 , June 2021, URL: https://www.ijtsrd.compapers/ijtsrd41176.pdf Paper URL: https://www.ijtsrd.comcomputer-science/simulation/41176/simulations-on-computer-network-an-improved-study-in-the-simulator-methodologies-and-their-applications/j-sumitha
This issue’s feature article, Tuning Autonomous Driving Using Intel® System Studio, illustrates how the tools in Intel System Studio give embedded systems and connected device developers an integrated development environment to build, debug, and tune performance and power usage. Continuing the theme of tuning edge applications, Building Fast Data Compression Code for Cloud and Edge Applications shows how to use the Intel® Integrated Performance Primitives
to speed data compression.
Similar to FiQuant Market Microstructure Simulator: Strategy Definition Language (20)
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
Sudheer Mechineni, Head of Application Frameworks, Standard Chartered Bank
Discover how Standard Chartered Bank harnessed the power of Neo4j to transform complex data access challenges into a dynamic, scalable graph database solution. This keynote will cover their journey from initial adoption to deploying a fully automated, enterprise-grade causal cluster, highlighting key strategies for modelling organisational changes and ensuring robust disaster recovery. Learn how these innovations have not only enhanced Standard Chartered Bank’s data infrastructure but also positioned them as pioneers in the banking sector’s adoption of graph technology.
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!SOFTTECHHUB
As the digital landscape continually evolves, operating systems play a critical role in shaping user experiences and productivity. The launch of Nitrux Linux 3.5.0 marks a significant milestone, offering a robust alternative to traditional systems such as Windows 11. This article delves into the essence of Nitrux Linux 3.5.0, exploring its unique features, advantages, and how it stands as a compelling choice for both casual users and tech enthusiasts.
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
GridMate - End to end testing is a critical piece to ensure quality and avoid...ThomasParaiso2
End to end testing is a critical piece to ensure quality and avoid regressions. In this session, we share our journey building an E2E testing pipeline for GridMate components (LWC and Aura) using Cypress, JSForce, FakerJS…
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
Dr. Sean Tan, Head of Data Science, Changi Airport Group
Discover how Changi Airport Group (CAG) leverages graph technologies and generative AI to revolutionize their search capabilities. This session delves into the unique search needs of CAG’s diverse passengers and customers, showcasing how graph data structures enhance the accuracy and relevance of AI-generated search results, mitigating the risk of “hallucinations” and improving the overall customer journey.
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
Pushing the limits of ePRTC: 100ns holdover for 100 daysAdtran
At WSTS 2024, Alon Stern explored the topic of parametric holdover and explained how recent research findings can be implemented in real-world PNT networks to achieve 100 nanoseconds of accuracy for up to 100 days.
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
FiQuant Market Microstructure Simulator: Strategy Definition Language
1. Market Microstructure Simulator: Strategy Definition
Language
Anton Kolotaev
´
Chair of Quantitative Finance, Ecole Centrale Paris
anton.kolotaev@gmail.com
March 5, 2014
Anton Kolotaev (ECP)
FiQuant Market Simulator
March 5, 2014
1 / 63
3. Evolution of the simulator I
1
Initial C++ version was developed in 2009-2011 by Riadh Zaatour. In
this version a user implements strategy logic in C++. Though this
version was quite easy to learn and understand, it had problems with
flexibility and scalability.
2
In order to improve its extensibility and performance the simulator
was rewritten using C++ template metaprogramming techniques by
Anton Kolotaev in 2012. Python bindings to it were implemented
using Boost.Python. Unfortunately the price for providing high
extensibility with no overhead was quite high: in order to use it a
proficiency in C++ template metaprogramming was required.
Anton Kolotaev (ECP)
FiQuant Market Simulator
March 5, 2014
3 / 63
4. Evolution of the simulator II
1
In order to make the simulator easy to start work with, a Python
version with a Web interface was developed in 2013. Karol Podkanski
implemented number of trading strategies and indicators during his
internship at summer 2013. Though this version gave a lot of insights
on how a good modular design for market simulation software should
be implemented, it showed that a lot of syntax noise appears in
strategy description and the development becomes very error-prone
because of the dynamic typing nature of Python.
2
In October 2013 a decision to introduce a strategy definition language
and a compiler for it was taken.
Anton Kolotaev (ECP)
FiQuant Market Simulator
March 5, 2014
4 / 63
5. Design goals
1
Flexibility. 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
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 5, 2014
5 / 63
6. Modular Design
Representing a simulation model as a network of modules communicating
by messages is a widely accepted practice for DES systems (e.g.
Omnet++ or ns-2 to simulate telecommunication networks).
Module may have parameters that are used to adjust their behaviour.
Modules are organized into hierarchy in order to facilitate construction of
large-scale simulation.
We will distinguish two sorts of modules:
1
Simple modules provide functionality which is considered elementary
(and there is no reason to reuse part of it to implement other
modules).
2
Compound modules combine together other modules in some way
and define their parameters based on its own parameters. Compound
module behaviour is just a composition of its constituting modules
behaviours.
Anton Kolotaev (ECP)
FiQuant Market Simulator
March 5, 2014
6 / 63
7. Modular design sample: Crossing Averages Strategy
Anton Kolotaev (ECP)
FiQuant Market Simulator
March 5, 2014
7 / 63
8. Motivation for an external DSL
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 5, 2014
8 / 63
9. Scala as a language to implement the DSL compiler
1
As a ML-family member, very suitable for sophisticated symbol
processing tasks like compilation: an internal DSL to parse texts,
algebraic data types, pattern matching, a powerful collections library,
mixin inheritance via traits.
2
Good balance between functional and imperative programming
features – easier to find software engineers
3
The most mainstream of functional programming languages that
results in wide community, excellent library and tool support, mature
IDEs.
4
Very portable since runs on JVM.
5
Statically typed
6
Right choice to develop a Web server.
Anton Kolotaev (ECP)
FiQuant Market Simulator
March 5, 2014
9 / 63
10. Functions
Conceptually, a ”function” declaration defines a term with a constructor
provided (like case classes in Scala).
Types for input arguments are inferred automatically from their initializers
and for the ”return” value - from the function body.
Functions represent compound modules of a simulation model.
All methods can be considered as extension methods of their first
argument.
x∼>Lagged(dt) is equivalent to .observable.Lagged(x, dt).
Anton Kolotaev (ECP)
FiQuant Market Simulator
March 5, 2014
10 / 63
11. Intrinsic Functions
Intrinsic functions import simple modules from a target language into the
DSL. ”Return” types for intrinsic functions must be specified explicitly.
Anton Kolotaev (ECP)
FiQuant Market Simulator
March 5, 2014
11 / 63
12. Type System I
Types correspond to interfaces without methods from mainstream
languages. They are used for error checking and for function overloading.
1
Simple types may derive from other types or be aliases
2
Tuple and function types
3
Top (Any) and bottom (Nothing) types.
4
Lists (List[T])
Anton Kolotaev (ECP)
FiQuant Market Simulator
March 5, 2014
12 / 63
13. Type System II
Types may be generic.
Functions are contravariant in the input type and covariant in the output
type: CanCast(D,B) ∧ CanCast(R,T) ⇒ CanCast(B=>R,D=>T).
All other types are covariant.
Anton Kolotaev (ECP)
FiQuant Market Simulator
March 5, 2014
13 / 63
14. Classes I
Classes are syntax sugar for a type declaration, constructor function and
member accessors
Anton Kolotaev (ECP)
FiQuant Market Simulator
March 5, 2014
14 / 63
15. Classes II
Previous definition is de-sugared at typing stage into
Anton Kolotaev (ECP)
FiQuant Market Simulator
March 5, 2014
15 / 63
16. Class Inheritance
Classes derive fields and methods from base classes.
Methods are treated as ”virtual” to stimulate code re-use
Anton Kolotaev (ECP)
FiQuant Market Simulator
March 5, 2014
16 / 63
17. Packages and Attributes
Packages are used to group functions and types. They can be nested.
Attributes are inherited from enclosing package. Anonymous packages are
used to assign same attributes to a group of functions without introducing
a new name scope.
In this sample .A.B.f will have attributes X == "Xa", Y == "Y" and
.A.B.g and .A.B.h will have attributes X == "Xb", Y == "Y"
Anton Kolotaev (ECP)
FiQuant Market Simulator
March 5, 2014
17 / 63
41. Choose-the-best strategy
Backtests aggregated strategies and allows to run only to that one who
has the best performance. By default, first derivative of a moving average
of ’cleared’ trader’s balance is used to evaluate the efficiency.
Anton Kolotaev (ECP)
FiQuant Market Simulator
March 5, 2014
41 / 63
46. Scheduler
Main class for every discrete event simulation system.
Maintains a set of actions to fulfill in future and launches them
according their action times: from older ones to newer.
Interface:
Event scheduling:
schedule(actionTime, handler)
scheduleAfter(dt, handler)
Simulation control:
workTill(limitTime)
advance(dt)
reset()
Anton Kolotaev (ECP)
FiQuant Market Simulator
March 5, 2014
46 / 63
47. Events
event.Event. Base class for multicast events.
event.Conditional. Multicast event class with conditional events
support. Allows effective notification mechanism for collections of
event handler of form event.GreaterThan(x, listener) and
event.LessThan(x, listener). Internally it keeps two dequeues
of event handlers sorted by their trigger values and notifies only those
handlers whose trigger conditions are fullfilled.
event.GreaterThan(x, listener). Fires listener only if the
value observed is greater than x.
event.LessThan(x, listener). Fires listener only if the value
observed is less than x.
Anton Kolotaev (ECP)
FiQuant Market Simulator
March 5, 2014
47 / 63
48. Order book
Represents a single asset traded in some market (Same asset traded
in different markets would be represented by different order books)
Matches incoming orders
Stores unfulfilled limit orders in two order queues (Asks for sell orders
and Bids for buy orders)
Corrects limit order price with respect to tick size
Imposes order processing fee
Supports queries about order book structure
Notifies listeners about trades and price changes
Anton Kolotaev (ECP)
FiQuant Market Simulator
March 5, 2014
48 / 63
49. Order book for a remote trader
Models a trader connected to a market by a communication channel
with non-negligible latency
Introduces delay in information propagation from a trader to an order
book and vice versa (so a trader has outdated information about
market and orders are sent to the market with a certain delay)
Assures correct order of messages: older messages always come earlier
than newer ones
Anton Kolotaev (ECP)
FiQuant Market Simulator
March 5, 2014
49 / 63
50. Basic orders
Orders supported internally by an order book:
Market(side, volume)
Limit(side, price, volume)
Cancel(limitOrder)
Limit and market orders notifies their listeners about all trades they take
part in. Factory functions are usually used in order to create orders.
Anton Kolotaev (ECP)
FiQuant Market Simulator
March 5, 2014
50 / 63
51. Meta orders I
Follow order interface from trader’s perspective (so they can be used
instead of basic orders) but behave like a sequence of base orders from an
order book point of view.
Iceberg(volumeLimit, underlyingFactory) splits orders created
by underlyingFactory to pieces with volume less than
volumeLimit and sends them one by one to an order book ensuring
that only one order at time is processed there
FloatingPrice(price, underlyingFactory) listens to an
observable price and when it changes, cancels its order on the
markets and resends it with the new price.
Peg(underlyingFactory) creates a limit-like order with given
volume and the most attractive price, sends it to an order book and if
the order book best price changes, cancels it and resends with a
better price. Implemented via FloatingPrice.
Anton Kolotaev (ECP)
FiQuant Market Simulator
March 5, 2014
51 / 63
52. Meta orders II
WithExpiry(lifetime, underlyingFactory) sends a limit-like
order and after lifetime cancels it
ImmediateOrCancel(underlyingFactory) is like WithExpiry but
with lifetime equal to 0 making a limit order to act as a conditional
market order
StopLoss(lossFactor, underlyingFactory) order is initialised
by an underlying order and a maximal acceptable loss factor. It keeps
track of position and balance change induced by trades of the
underlying order and if losses from keeping the position exceed certain
limit (given by maximum lossFactor), the meta order clears its
position.
Anton Kolotaev (ECP)
FiQuant Market Simulator
March 5, 2014
52 / 63
53. Traders
Single asset traders
send orders to order books
bookkeep their position and balance
run a number of trading strategies
notify listeners about trades done and orders sent
Single asset traders operate on a single or multiple markets. Multiple asset
traders are about to be added.
Anton Kolotaev (ECP)
FiQuant Market Simulator
March 5, 2014
53 / 63
54. Observable
Traders and order books provide basic accessors to their current state but
don’t collect any statistics. In order to do it in an interoperable way a
notion of observable value was introduced: it allows to read its current
value and notifies listeners about its change. Examples of observables are:
on traders: position, balance, market value of the portfolio, ’cleared’
balance etc.
on order books: ask/mid/bid price, last trade price, price at volume,
volume of orders with price better than given one etc.
OnEveryDt(dt, dataSource) evaluates dataSource every dt
moments of time.
History of an observable can be stored in a TimeSerie and rendered later
on a graph.
Anton Kolotaev (ECP)
FiQuant Market Simulator
March 5, 2014
54 / 63
55. Using Veusz
When developing a new strategy it is reasonable to test it using scripts
and visualize results by Veusz
Anton Kolotaev (ECP)
FiQuant Market Simulator
March 5, 2014
55 / 63
56. Rendering graphs by Veusz
Anton Kolotaev (ECP)
FiQuant Market Simulator
March 5, 2014
56 / 63
57. 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 5, 2014
57 / 63
58. Time series
Timeseries field of a trader or an order book instructs what data should be
collected and rendered on graphs
Anton Kolotaev (ECP)
FiQuant Market Simulator
March 5, 2014
58 / 63
60. Node aliases
Object tree nodes can be assigned aliases that can be used later to refer to
the sub-tree (explicit by-value or by-reference cloning semantics is to be
implemented)
Anton Kolotaev (ECP)
FiQuant Market Simulator
March 5, 2014
60 / 63
61. Workspaces
Every user (identified by browser cookies) may switch between multiple
workspaces. Workspaces can be forked, removed or created from a set of
predefined ones.
Anton Kolotaev (ECP)
FiQuant Market Simulator
March 5, 2014
61 / 63
62. Installation
OS supported: Linux, Mac OS X, Windows
Browsers supported: Chrome, Firefox, Safari, Opera
Scala 10.2 can be installed using SBT
Python 2.7
Python packages can be installed using pip or easyinstall:
Veusz (for graph plotting)
Flask and Docutils (to run a Web-server)
Blist (sorted collections used by ArbitrageTrader)
Pandas (only needed for observable.Quotes at the moment)
Numpy (only needed for strategy.MultiArmedBandit at the
moment)
Source code downloadable from GitHub
Latest public version of the simulator can be downloaded from here.
Online documentation can be found here.
Anton Kolotaev (ECP)
FiQuant Market Simulator
March 5, 2014
62 / 63