**1. Introduction**

Flash crashes in financial markets can be defined as extreme changes in the price of one or multiple assets within a short interval of time. These have become increasingly relevant for practitioners and, in particular, market makers whilst being increasingly studied and reported in the quantitative finance literature.

The most notorious flash crash is likely that of 6 May 2010, which involved the major U.S. stock indices (S&P, DJIA, and NASDAQ composite) and caused a ≈9% drop in the DJIA in the 36 min it lasted for. This event led to a variety of empirical and theoretical papers trying to understand the event and its causes, with the aim to shed light on other black swan events too (up/down crashes). High frequency traders are at the center of interest in a large portion of this literature; hence, we report a brief summary of their role in markets and its regulatory concerns.

It has been shown that HFT market players contribute to price efficiency and tighter spreads, thereby improving the price discovery process. These players and electronic trading as a whole have become increasingly dominant in recent years to the point of constituting a large portion of the traded volume in financial markets. On the other hand, some characteristics of HFT players have caused other market players to raise concerns, as the run to incredibly fast execution leaves many behind and allows HFTs to front run other players [1]. The ability of HFTs to process information faster than other players leads to adverse selection and its fixed cost to a size advantage for larger players, which might hurt the overall welfare of market participants [2]. It can now perhaps be argued that the run to faster execution is going beyond price efficiency, which benefits investors and toward an unstable price process driven by competition between large firms. This is supported by a

**Citation:** Turiel, J.D.; Aste, T. Heterogeneous Criticality in High Frequency Finance: A Phase Transition in Flash Crashes. *Entropy* **2022**, *24*, 257. https://doi.org/ 10.3390/e24020257

Academic Editors: H. Eugene Stanley, Ryszard Kutner and Christophe Schinckus

Received: 4 January 2022 Accepted: 4 February 2022 Published: 10 February 2022

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

large body of literature on flash crashes, which places HFTs at the center of some disruptive systemic events, as discussed below.

The SEC's report on the flash crash of May 6th [3] finds that most market participants automatically halted their trading due to hard risk constraints triggered by the sudden price change, while some HFT firms kept trading, as it was deemed still profitable by their algorithms. These absorbed most of the original large sell order, but once they reached inventory or loss constraints, they started selling too. This increased the selling pressure in the market, and some works hold that it caused HFTs to trade with each other repeatedly ("hot potato phenomenon"), thereby increasing the traded volume (but not the real liquidity). This apparent increase in liquidity in the form of high trading volume caused large sell orders to get executed faster [4]. This chain of events highlights that the phenomenon has a dangerous positive feedback loop.

The results in [5] show through simulations how reducing either (or both) the number of HFT players or the size of the large sell order greatly reduced the size of the drawdown. Further, other works find that black swan phenomena of duration <1.5 s are about ten times more frequent than longer ones, and their return distribution deviates from the canonical power law distribution of returns. The authors suggest a phase transition to an all-machine environment at ∼1 s, as human reaction time is in the order of seconds. The authors also investigate the time scales via additional simulations to show the rise in extreme events and their magnitude around ∼1 s in what they define as the all-machine phase [6,7]. Findings along those lines, on the distribution of high frequency black swan events deviating from the canonical return distributions, were also recently published by the authors of this work [8].

From the review above, we see that crashes of different sizes seem to involve a selfperpetuating cycle [5] with positive feedback loops.

This type of self-excited process is also investigated in [9] for the liquidity and information dependence between two sample assets, showing how liquidity shocks to an asset can propagate to related ones (and by extension to the wider market).

The frequency and size (in terms of number of securities involved) of simultaneous-like crashes in HFT is also investigated in the literature. For instance, the works by Lillo and coauthors [10,11] investigate the dynamics of simultaneous flash crashes, and motivate their importance by showing the growth in the number of mini crashes in recent years. Further, they show how the number of simultaneously crashing securities has grown over the last 10 years, thereby highlighting the increasing systemic relevance of this phenomenon.

We recognize that systemic risk is traditionally defined as "the risk of a cascading failure in the financial sector" [12]. In this work, we do not investigate interbank connectivity, but rather the connectivity of trading patterns across financial assets which can lead to breakdowns or temporary dysfunctions in financial markets, as per the definition of systemic risk in [13]. We phrase the concept in a slightly different manner in the context of our work as follows. In this paper, we define systemic risk as the risk component of an event (say a flash crash) that is given by the interconnectedness of assets, likely as a result of correlated actions and arbitrage between market participants. This causes isolated events to spread in the market and affect more assets, thereby increasing their impact and relevance for all market participants. A related concept is that of "synchronization" which is the systemic and concentration aspect that arises from the alignment and interdependence of actions between market players (on a single asset) rather than across assets.

Our phrasing of the concept of systemic risk from [13] highlights our microstructural investigation of the trading dynamics which lead to dysfunctions and disruptions in the orderly functioning of financial markets. Indeed, crashes can be just due to microstructural dynamics, but as price efficiency deteriorates and volatility spikes, investors shy away from financial markets. Financial markets allow investors to provide companies in the real economy with capital, and their dysfunction can turn mere trading issues into real economic panic and crisis. Therefore, even high frequency black swan events can have

dramatic effects on the real economy, as proven multiple times in recent history, which ties our interpretation of systemic risk back to Ref. [12] as well.

The systemic risk posed by HFTs was investigated in the literature in the last decade. The work by Paulin et al. [14] simulates flash crashes through agent-based modeling and highlights the importance of market structures in the systemic propagation of extreme events. The works by Abreu and Brunnermeier [15] and Bhojraj et al. [16] investigate the risks of synchronization between arbitrageurs in financial markets and acknowledge its existence. Other works investigate the systemic risk of HFT dynamics. Jain et al. [17] investigate how low-latency HFT trading can worsen extreme systemic events in financial markets and argue for the need to incorporate correlation and market structure in regulating these risks. The work by Harris [18] discusses many mechanisms, among which systemic risks originating from order routing and self-reinforcing mechanisms which cause crashes. The review by De Gruyter [19] summarizes the systemic aspects of HFTs and market structure, such as position correlation and herd behavior, adverse selection in orders and crowding, as well as negative contribution to price discovery at times.

Co-crashes are becoming more frequent and systemic. It is, therefore, important to investigate their structure. In particular, it is relevant to understand which stocks are central to larger systemic events as well as the contagion structure between stocks in the market. This is a central theme in market stability for regulators as well as in risk management for market makers.

The present work joins the two themes of flash crashes and systemic risk by delving deeper into the dynamics of simultaneous flash crashes of different sizes throughout 300 liquid stocks traded on the NASDAQ. We investigate the empirical distribution of crash sizes and the structure of these events in the market. We also investigate whether larger systemic events involve highly unstable stocks (which crash often) or stocks that are more stable in their price dynamics, yet more influential to trigger larger systemic events when subject to liquidity shocks. We apply tools from statistical physics to show the difference between crashes which involve a small or large number of assets. We uncover a phase transition occurring when the crash size exceeds five stocks. Implications for systemic risk in high frequency markets are discussed from both a trading and regulatory perspective.


We are IntechOpen, the world's leading publisher of Open Access books Built by scientists, for scientists

6,600+ Open access books available

177,000+

International authors and editors

195M+ Downloads

156 Countries delivered to Our authors are among the

Top 1% most cited scientists

Contributors from top 500 universities

Selection of our books indexed in the Book Citation Index in Web of Science™ Core Collection (BKCI)

### Interested in publishing with us? Contact<EMAIL_ADDRESS>
Numbers displayed above are based on latest data collected. For more information visit www.intechopen.com

## Meet the editors

Arnoldo Gonzalez Reyna has a bachelor's degree in Agronomy from the Universidad Autónoma de Tamaulipas (UAT), Mexico, an MSc from Utah State University, USA, and a Ph.D. from the University of Saskatchewan, Canada, where he also completed a postdoctoral fellowship. He is Professor Emeritus at UAT, with an academic and research career spanning more than 37 years. Dr. González Reyna worked with Criollo cattle and hair sheep

for the Mexican Association of Animal Production for 13 years. He has authored numerous publications, including indexed and refereed articles, book chapters, and books. His areas of expertise are ruminant physiology and endocrinology of reproduction, animal production systems, and biotechnology of reproduction. He continues teaching and counseling graduate students at UAT and working with private producers in Northeast México.

Dr. Prashant Kaushik holds adjunct faculty positions at three universities and is a genome data engineer for a private company. He holds a BS (Hons) in Agriculture, a PG diploma in Floriculture and Landscaping, an MS in Vegetable Science, and an MBA in Production and Operations Management. After obtaining a Ph.D. in Biotechnology from Universitat Politecnica de Valencia, Spain, Dr. Kaushik was a bioinformatician at Nagano

University and Yokohama Ueki, Japan. He has published 150 research articles and an equivalent number of non-indexed research publications. He has written six books and fourteen book chapters. Among his research interests are molecular biology, plant breeding, genomics, landraces, and population genetics.

### Contents

Preface

My first encounter with landraces was with a Criollo (or Creole) cattle (developed in Central America, called Criollo Lechero Centroamericano) and hair sheep (in México, known as Pelibuey and Blackbelly). It was not until I began editing the first chapter of this book that I realized that I had been living with animal landraces all my life. In later years, and by trade, I learned and worked with some plant landraces (corn, sorghum, sunflower, and some forages and grasses) to complete my agronomy degree.

Landraces are local species of plants and animals that have developed and adapted over time to a localized geographic region. They are important components of our environment and play an important role in the sustainability of the environment.

Every continent on Earth is composed of different regions and every region is composed of several eco-regions or ecosystems. As such, this book discusses landraces in the context of different regions and countries and makes no attempt to generalize or

This book is organized into two sections on animal landraces and plant landraces. Section 1 includes two chapters that describe the use of ruminants in tropical regions. Section 2 includes four chapters on the benefits of the use of indigenous plants

I would like to thank the contributing authors for their efforts in writing the chapters. I also acknowledge and thank the support provided by the academic and editorial team, as well as the trust and responsibility granted to me as editor by IntechOpen.

Institute of Conservation and Improvement of Valencian Agrodiversity,

**Arnoldo González-Reyna**

**Prashant Kaushik**

Valencia, Spain

Autonomous University of Tamaulipas, Cd. Victoria, Tamaulipas, México

Polytechnic University of Valencia,

impose conclusions for global application.

and strategies for improving wheat production.


**4. Conclusions**

This paper has developed a general approach for synthesizing and jointly interpreting various types of data, related to different interacting and co-evolving drivers and aspects of freshwater change, subject to various degrees of uncertainty, over hydrological catchments of different scales. The application of this approach to the high-uncertainty case of Greece and its freshwater changes from 1930–1949 to 1990–2009, based on catchment water balance, provides support for an overall decrease in the combined uncertainties of resulting catchment-scale *ET* and *R* changes from the magnitude of the various underlying uncertainties.

For Greece, the study results are robust in showing that climate-driven *P* decrease and concurrent human-driven irrigation development from the first half of the 20th century to recent time have combined in driving considerable total decrease in *R* over the country. In the three largest study catchments (total regional, Mainland and Aegean), the total *R* decrease ranges from −65 to −75 mm/year ±13%. This total *R* decrease is driven by the local irrigation development to more or less the same degree (possibly somewhat more but within the uncertainty range) as by climate change (predominantly decrease in *P*, with relatively small *T* increase over Greece and even decrease in Peloponnese). For the relatively small Ionian and Peloponnese catchments, the *R* decrease is up to −119 mm/year ±15% and −91 mm/year ±17%, respectively, due to the particularly large *P* decrease experienced in these catchments, combined with similar irrigation-driven *R* decrease as in the other catchments.

In each catchment, the irrigation-driven component of the total *R* decrease has largely fed a corresponding irrigation-driven component of *ET* increase. Recent results for water deficit propagation and partitioning over different parts of Europe [16] indicate that this *ET* increase likely represents increased transpiration, thereby contributing to support vegetation and crop status against the decreased *P* water input and the likely more frequent and/or more anomalous drought events that may be expected under such *P* decrease in Greece. Under these conditions of decreased *P* combined with relatively small *T* increase (or even *T* decrease), the atmospheric climate change drives *ET* decrease, that is, opposite change direction to the *ET* increase driven by irrigation. In net total, the irrigation-driven component dominates, such that total *ET* has increased (but less than *R* has decreased) over Greece, except in Peloponnese where the climate—and irrigation-driven components are more or less equal and total *ET* remains essentially unchanged.

**Supplementary Materials:** The following are available online at http://www.mdpi.com/2073-4441/10/11/1645/s1, Figure S1: Location and extent of CRU cells considered for each study catchment, Table S1: Base case and alternative (Alt.) quantification scenarios and their variations for different catchments, Table S2: Freshwater changes and main uncertainty estimates for the Mainland catchment, Table S3: Freshwater changes and main uncertainty estimates for the Peloponnese catchment, Table S4: Freshwater changes and main uncertainty estimates for the Ionian catchment, Table S5: Freshwater changes and main uncertainty estimates for the Aegean catchment, Table S6: Evapotranspiration conditions and changes showing insignificant influence of choice of ET/P scenario (defined in main Table 3) for the example of the total regional catchment.

**Author Contributions:** G.D. conceived the study and analysis approach and wrote the paper. C.P. performed most analyses for the Figures and Tables and contributed to the writing.

**Funding:** This research was funded by The Swedish Research Council Formas, grant number 2016-02045.

**Conflicts of Interest:** The authors declare no conflict of interest.


**2.1. NCBI hardware and software**

The hardware available at NCBI includes a Univa Grid Engine (UGE) Grid-Engine-based computer farm and PanFS scalable storage system connected through a powerful router. The most recent version UGE 8.2.1 includes support for Linux GROUPs, support for Window server execution nodes, and a beta version of DRMMA2 (Distributed Resource Management and Application API 2). A large weakly coupled distributed computer system like this requires coarse-grained parallelization approaches with minimal communication between the proc‐ esses. Many processing steps, such as computing BLAST hits, are naturally parallel.


**5.4. Modelling**

18 Will-be-set-by-IN-TECH

Product Code Amount Starting time Blue PB 6 0 Green PG 6 0

**5.3. Structure of the production facility given in production management system** Data about the production process and its structure can be obtained from the production management information systems. These data can be presented in a form of a recipe and

There are two recipes available, which are specifying a sequence of operations needed to

Op20 draining R2x in B31 12/12/12 [R\_1](R21/R22/R23), B31

Op20 draining R2x in B32 13/12/12 [R\_ 1](R21/R22/R23), B32

Op20 draining B11 in R2x 15/12/12 [R\_3](R21/R22/R23), [BY\_2](B11)

Op20 draining B13 in R2x 10/9/13 [R\_2](R21/R22/R23), [BW\_2](B13)

Op20 draining B12 in R2x 11/13/14 [R\_ 3](R21/R22/R23), [BR\_ 2](B12)

Op20 draining B13 v R2x 10/9/13 [R\_ 2](R21/R22/R23), [BW\_ 2](B13)

To produce Blue product ("PB"), firstly operation *Op10* has to be carried out. This operation determines only that a sub-product, defined with formula "B", is needed. When this sub-product is ready, two more operations are needed. *Op20* gives information about draining the product into the buffer tank *B31* and *Op30* about pumping the final product out of that buffer tank. The fact, that buffer tank could not be emptied before three batches of sub-product

In batch manufacturing situations when one task has to be executed with a (group of) resource(s), that were used to execute a previous task already are common. These resources are in our case labelled with an additional mark, i.e. code with serial number in square brackets is added in front of this resource(s). For example, this occurs in our case when one of the reactor is being used. Code [*R*\_1] is assigned to the reactor (from a group of reactors *R*2*x*) which is needed for operation *Op*20 when producing product "B" and indicates that this resource can now be released. Note, that this resource was assigned with an operation where

produce product "PB" and product "PG". They are given with tables 5 and 6. Operation Duration Resources PB Op10 – BOM\_B

> Op30 pumping from B31 30 (3 × 1)×B31 Y Op10 pumping Y in B11 12 [BY\_1](B11)

WB Op10 pumping W in B13 12 [BW\_1](B13)

Operation Duration Resources PG Op10 – BOM\_ G

Op30 pumping from B32 30 (3 × 1)×B32 R Op10 pumping Y in B12 12 [BR\_ 1](B12)

WG Op10 pumping W in B13 12 [BW\_ 1](B13)

"B" are poured in it, is described with this notation: (3 × 1) × *B*31.

code [*R*\_3] was used already (*Op10* of a sub-product "Y").

**Table 4.** Work orders.

the formula as described in chapter 3.4.

**Table 5.** Recipe of a product "PB".

**Table 6.** Recipe of a product "PG".

In this subchapter production process described previously is modelled with timed Petri nets. To build a model the algorithm from Chapter 3.5 is used. This model can later be used to schedule all the tasks, that are necessary to produce as much final products as required by work orders.

From work orders, given in table 4 it is recognised which and how much of each products are required. Let start with the procedure on building the Blue product ("PB"). When applying the first step of our algorithm, the PN structure shown in figure 12 is achieved.

**Figure 12.** PN model of PB product.

In the second step, additional information are added into this model (framed part of figure 12). Data about all the details are gathered from recipe list of product "PB" (table 5). Information about emptying the buffer tank *B*31 (*Op30*) and draining the reactor *R*2*x* (*Op20*) are added. As operation (*Op20*) needs resources, that are used by previous operations, not all details are added yet at this place. A model, shown in Figure 13 is achieved.

**Figure 13.** PN model of PB product.

#### 20 Will-be-set-by-IN-TECH 22 Petri Nets – Manufacturing and Computer Science Automated Petri-Net Modelling for Batch Production Scheduling 21

Operation *Op10* (place *PPB*1*o p*) is defined with formula for item "B" (see table 7). It represents a mixing operation of two raw materials "Y" and "WB". Both sub-items are described with two operations, where precedence constraints are included as given with formula. Figure 14 shows how this formula information is modelled with Petri nets.

**Figure 14.** PN model of PB product with inserted BOM information.

In figure 15 some parts of a model given in figure 14 are simplified and information about the usage of rectors *R*2*x* is added.

pr2

p WB\_2\_2op

p Y\_2\_2op

9

tWB\_2\_2

WB, Op.1

**Figure 16.** PN model of PB product.

presented in table 8.

**Table 8.** Results.

tWB\_1

tPBin

p Y\_1op

p WB\_1op

Y, Op.1

tY\_1

12

tY\_ \_3 2

10

tWB\_2\_1

15

tY\_2\_1

12

tY\_2\_2

13

tWB\_2\_3

pr1

p WB\_2\_1op

p Y\_2\_1op

pr3

p WB\_2\_3op

all the production constraints and the duration of the whole process can be identified. A schedule of the batch process using SPT priority rule is given with Gantt chart (figure 18). The results were compared with the results obtained using various algorithms and are

> Algorithm Makespan SPT rule 315s LPT rule 331s Branch and Bound ([17]) 323s MS Project ([3]) 329s

p Y\_2\_3op

R22 B31

p PB2\_1op

p PB2\_2op

R21

Automated Petri-Net Modelling for Batch Production Scheduling 23

12

tPB2\_1

R23

12

p PB 2\_ \_3op

tPB2\_3

12

tPB2\_2

**Figure 15.** PN model of PB product.

As there are three possible reactors (*R*21, *R*22 or *R*23) that can be used to perform these operations this model is extended with the structure given in figure 16.

With this procedure a detailed timed Petri-net model of the production of the blue product ("PB") is obtained. The same procedure was performed to model also the production of green product ("PG"), and a Petri net model given in figure 17 is achieved.

## **5.5. Results**

The resulting model was at the end verified using P-invariant analysis. We can find out eleven P-invariant, where eight of them refer to resources and three of them to the production routes.

In this way a Petri net model of a multiproduct batch plant was achieved on which different scheduling algorithms can be performed in order to obtain the most effective production. Petri-net simulation was used to evaluate different schedules of tasks that are needed to produce the desired amount of final products. Makespan was the performance measure of interest. The schedule allows an easy visualisation of the process and ensures that sufficient raw materials ("Yellow", "Red" and "White" batches) are available at the right time. It respects 22 Petri Nets – Manufacturing and Computer Science Automated Petri-Net Modelling for Batch Production Scheduling 21 Automated Petri-Net Modelling for Batch Production Scheduling 23

**Figure 16.** PN model of PB product.

all the production constraints and the duration of the whole process can be identified. A schedule of the batch process using SPT priority rule is given with Gantt chart (figure 18).

The results were compared with the results obtained using various algorithms and are presented in table 8.

**Table 8.** Results.

20 Will-be-set-by-IN-TECH

Operation *Op10* (place *PPB*1*o p*) is defined with formula for item "B" (see table 7). It represents a mixing operation of two raw materials "Y" and "WB". Both sub-items are described with two operations, where precedence constraints are included as given with formula. Figure 14

pr WB, Op.1

tPB1out tPBin

In figure 15 some parts of a model given in figure 14 are simplified and information about the

tY\_2

tWB\_2

pr

p Y\_2op

pWB\_2op

As there are three possible reactors (*R*21, *R*22 or *R*23) that can be used to perform these

With this procedure a detailed timed Petri-net model of the production of the blue product ("PB") is obtained. The same procedure was performed to model also the production of green

The resulting model was at the end verified using P-invariant analysis. We can find out eleven P-invariant, where eight of them refer to resources and three of them to the production routes. In this way a Petri net model of a multiproduct batch plant was achieved on which different scheduling algorithms can be performed in order to obtain the most effective production. Petri-net simulation was used to evaluate different schedules of tasks that are needed to produce the desired amount of final products. Makespan was the performance measure of interest. The schedule allows an easy visualisation of the process and ensures that sufficient raw materials ("Yellow", "Red" and "White" batches) are available at the right time. It respects

WB, Op.2 =tPB2 pPB2op

WB, Op.2

tWB\_2

tY\_2

p Y\_2op

p WB\_2op

R2x B31

X

Y, Op.1 Y, Op.2

shows how this formula information is modelled with Petri nets.

p Y\_1op

p WB\_1op

tPB1out tPBin

operations this model is extended with the structure given in figure 16.

product ("PG"), and a Petri net model given in figure 17 is achieved.

tY\_1

tWB\_1

usage of rectors *R*2*x* is added.

WB, Op.1

tWB\_1

**Figure 15.** PN model of PB product.

**5.5. Results**

p Y\_1op

pWB\_1op

tY\_1

**Figure 14.** PN model of PB product with inserted BOM information.

Y, Op.1 Y, Op.2

**Figure 18.** Production schedule.

**Acknowledgements**

**Author details** Dejan Gradišar

Gašper Mušiˇc

*Jožef Stefan Institute, Slovenia*

*Faculty of Electrical Engineering, University of Ljubljana, Slovenia*

Fund.

A procedure for using existing data from production management systems to build the Petri-net model was developed. Timed Petri nets with the holding-duration principle of time implementation were used to model basic production activities. For the purposes of scheduling, different heuristic rules can be used within Petri net simulation. The applicability of the proposed approach was illustrated on a practical scheduling problem, where the data about the production facility is given with the formula and recipe. The model achieved with the proposed method was used to determine a schedule for production operations. The proposed method is an effective way to get an adequate model of the production process,

Automated Petri-Net Modelling for Batch Production Scheduling 25

which can be used to develop different analyses of the treated system, e.g. schedules.

The work was done in the frame of the Competence Centre for Advanced Control Technologies. Operation is partly financed by the Republic of Slovenia, Ministry of Education, Science, Culture and Sport and European Union (EU) - European Regional Development

**6. Conclusion**

**Figure 17.** PN model of the production plant.

**Figure 18.** Production schedule.