Detection of Anomalies in Spot and Futures Markets and Their Directional Effects: An Analysis of the BIST 100 Index
Abstract:
The occurrence of market anomalies has been steadily increasing in contemporary stock markets, particularly within the context of the current economic climate. The volatility of stock markets, exacerbated by the recent inflation crisis, has heightened the need for anomaly detection and informed investment decisions. This study focuses on the BIST 100 index in Turkey, specifically examining the XU030 spot market and the XU030D1 futures market, where significant economic fluctuations are prevalent. The Three Sigma Rule was applied to establish threshold values for anomaly detection, and a directional impact analysis was conducted based on these thresholds. The findings indicate that a positive anomaly in the spot market leads to an average increase of 7.65% in the futures market, while a negative anomaly in the spot market results in an average decrease of 8.69% in the futures market. Conversely, a positive anomaly in the futures market has an average positive impact of 7.82% on the spot market, while a negative anomaly in the futures market results in an average negative impact of 3.99% on the spot market. These results underscore the interconnected nature of the spot and futures markets, particularly in times of economic volatility, and provide insights into how anomalies in one market can influence the other. The study’s findings have significant implications for investors, highlighting the need for careful monitoring of market anomalies and their potential directional effects on investment strategies.1. Introduction
Although anomalies are defined in various ways by researchers depending on the application field, one widely accepted definition is Hawkins’ definition: An anomaly is an observation that deviates so significantly from other observations that it arouses suspicion of having been generated by a different mechanism (Hawkins, 1980). Anomaly detection refers to identifying unusual or problematic deviations within a dataset that do not conform to expected behavior or movement patterns. These non-conforming movements are often referred to as anomalies, outliers, surprises, or deviations. Notably, the terms anomaly and outlier are often used interchangeably. Anomaly detection is widely used in a variety of applications, including fraud detection in credit cards, insurance, and healthcare services, intrusion detection in cybersecurity, fault detection in safety-critical systems, and military surveillance for monitoring enemy activities (Chandola et al., 2009).
The anomaly detection problem has rapidly become a well-recognized topic in data analysis, with numerous surveys and studies dedicated to addressing this issue (Aggarwal, 2017). As time progresses and financial markets continue to move at high speeds, multiple events occur simultaneously, with different individuals or roles responsible for monitoring these activities. In this context, developments in financial markets can lead to increased volatility and the emergence of potential anomalies (Li, 2023). For example, the COVID-19 pandemic significantly impacted financial markets, leading to volatility and notable anomalies in indices like the BIST 100 (Çelik, 2021). In this context, understanding anomalies in markets such as the BIST 100 is pivotal for enhancing risk management, guiding investment decisions, and informing policy measures (Çilingirtürk et al., 2020).
The BIST 100 index, a critical benchmark for the Turkish financial market, has been the subject of various studies investigating its anomalies. For instance, studies have identified the presence of calendar anomalies, such as the January effect, and their implications on market efficiency and investor behavior (Kaldırım, 2017). These findings underscore the importance of analyzing anomalies within the BIST 100, not only for the Turkish economy but also for drawing comparisons with global markets.
This study aims to contribute to this growing body of literature by focusing on the detection of anomalies in both futures and spot markets. Employing the Three Sigma Rule, the study identifies threshold values to detect anomalies and applies directional anomaly detection to explore the interdependence of these markets. By investigating how anomalies in one market affect the other, this research provides insights into the mutual dynamics between futures and spot markets.
The significance of this study lies in its potential to anticipate market movements following anomaly periods and its practical implications for investors. By examining the BIST 100 index, the findings contribute to a deeper understanding of market anomalies, offering actionable insights for both practitioners and policymakers. The subsequent sections are structured as follows: the first section reviews the relevant literature, the second section elaborates on the methodological framework, and the final section presents the results and discusses their implications.
2. Literature Review
Hochenbaum et al. (2017) conducted anomaly detection studies focused on identifying anomalies in Twitter’s cloud networks. Among the techniques, the authors emphasize the importance of the Three Sigma Rule as a statistical basis for identifying unusual data points. This rule establishes a threshold of three standard deviations from the mean as a foundation for detecting anomalies, with data points beyond this threshold considered outliers (Hochenbaum et al., 2017).
Sodemann et al. (2012) examined various anomaly detection methods applied to automated surveillance, specifically addressing techniques for identifying directional anomaly effects. This aspect of anomaly detection focuses on unusual or unexpected directional behaviors within monitored environments, such as movements that deviate from common patterns or predetermined paths in surveillance zones (Sodemann et al., 2012).
Lenz & van Leeuwen (2024) focused on directional anomaly detection in semi-supervised learning, specifically for quantitative tabular data where only high (or low) attribute values indicate anomalies. Traditional anomaly detection considers deviations in any direction, but this work introduces directional measures, acknowledging cases where only values in one direction are relevant for anomaly assessment, such as high-risk indicators in healthcare or stress levels in machinery. The authors propose two asymmetrical distance measures, ramp distance and signed distance, which capture directionality. Through experiments with synthetic and real-life datasets, ramp distance outperforms absolute distance, especially in practical applications where anomalies have domain-specific directional properties. This study highlights that directional anomaly detection can significantly improve accuracy by aligning anomaly measures with real-world risk factors (Lenz & van Leeuwen, 2024).
Sunarso et al. (2020) explored the impact of the COVID-19 pandemic on sectoral shares within the Indonesia Stock Exchange by applying gap analysis to measure volatility and potential risks across different sectors. The study focuses on directional anomaly detection to identify significant deviations in sectoral price movements, specifically highlighting how certain sectors experienced unusually high or low volatility. Directional anomaly detection in this context involves examining gaps between the highest and lowest stock prices in each sector, emphasizing the directionality of price anomalies (i.e., extreme highs or lows) as indicators of market stress during the pandemic. The analysis reveals that the basic industry sector had the highest volatility gap at 54.50%, representing a strong directional anomaly indicative of high investment risk, while the trade sector exhibited the lowest gap at 13.06%, signaling more stability (Sunarso et al., 2020).
Wong et al. (2022) presented the Auto-Encoder with Regression (AER) model for time series anomaly detection, focusing on addressing different types of anomalies, including directional anomaly detection. Directional anomalies are identified by detecting deviations in specific directions within the time series data, which can indicate trends or shifts in one direction that deviate from normal patterns. In this model, directional anomaly detection is achieved by using bi-directional scoring to capture anomalies that may show distinct patterns or trends, such as increasing or decreasing directions in the data over time. AER combines prediction-based and reconstruction-based techniques through an LSTM regressor and an auto-encoder to calculate anomaly scores. The model’s bi-directional scoring method enables it to recognize anomalies based on the directionality of data points, making it suitable for detecting both sudden spikes and prolonged directional shifts in contexts like finance and healthcare. Tested across various datasets, including those from NASA and Yahoo, AER demonstrates an enhanced capability for detecting directional anomalies, achieving a 23.5% improvement in the F1 score over traditional models, including ARIMA (Wong et al., 2022).
Dai & Zhou (2020) explored stock return forecasting through the Sum-of-the-Parts (SOP) method combined with various economic constraint strategies, including the Three Sigma Rule. The SOP method decomposes stock returns into different economic components, each predicted independently. This model is further enhanced by applying constraints like the Three Sigma Rule, which limits extreme predictions by adjusting values that deviate significantly (beyond three standard deviations) from the mean. This rule mitigates the impact of outliers, improving forecast stability and accuracy. The authors evaluate this approach using historical data, demonstrating that combining SOP with the Three Sigma Rule increases out-of-sample predictive accuracy, as evidenced by improved R-squared values. The study concludes that incorporating constraints like the Three Sigma Rule yields a more robust forecasting model, essential for managing investment risks and enhancing portfolio performance in volatile markets (Dai & Zhou, 2020).
Aygün & Altay (2023) offered an in-depth exploration of calendar anomalies within the context of Borsa Istanbul over two decades, analyzing six indices across five sub-periods. Hochenbaum et al. (2017) developed innovative statistical methods for automatic anomaly detection in cloud infrastructure, emphasizing the use of robust techniques such as the Three Sigma Rule.
Shi et al. (2018) explored advanced machine learning approaches for anomaly detection within time series data, emphasizing their application to key performance indicators (KPIs). They utilized methods such as ARIMA, Gradient Boosting Regression Trees (GBRT), and Long Short-Term Memory (LSTM) networks, alongside traditional statistical rules like the Three Sigma Rule, to identify deviations effectively (Shi et al., 2018). Shimomura et al. (2024) demonstrated the use of machine learning and explainable artificial intelligence (XAI) to assess the multi-directional impacts of renewable energy (RE) expansion on electricity market prices.
The existing literature on anomaly detection extensively explores statistical and machine learning methods for identifying and analyzing deviations in various fields. Among these, the Three Sigma Rule stands out as a widely used approach for setting thresholds to detect anomalies based on statistical deviations. Additionally, directional anomaly detection methods, which focus on the impact and implications of anomalies in specific directions, are emphasized for their relevance in dynamic and volatile environments. These studies collectively highlight the importance of understanding anomaly behaviors to improve decision-making processes and manage risks effectively.
This study builds on the existing literature by integrating threshold-based anomaly detection with directional impact analysis, specifically within Turkey’s BIST 100 index, encompassing the XU030 spot market and XU030D1 futures market. By applying the Three Sigma Rule to detect anomalies and quantitatively assessing their directional effects, this research not only validates established methods but also extends their application to a high-volatility financial environment. The findings contribute to the literature by offering novel insights into the mutual dynamics between spot and futures markets, providing valuable perspectives for both academic and practical applications.
3. Methodology and Findings
Data and Scope: To detect anomalies in futures and spot markets and analyze their mutual effects, daily data from January 2, 2019, to October 31, 2024, were sourced from Investing. The study uses spot market data under the BIST100 index with the code XU030 and futures market data with the code XU030D1. The BIST 100 index was selected for this study due to its significant role as a benchmark for Turkey’s financial markets. Representing the largest and most liquid companies across various sectors, the index serves as a barometer for the Turkish economy. Furthermore, its openness to foreign investment and its sensitivity to global economic trends make it an ideal case for analyzing market anomalies. Previous studies have highlighted the importance of the BIST 100 in understanding macroeconomic dynamics (Savasa & Samiloglub, 2010) and its integration with global financial markets (Vantchikova, 2006). These characteristics underscore the index’s dual importance: as a critical indicator for domestic economic health and as a focal point for international investors seeking exposure to emerging markets.
Threshold Value Using the Three Sigma Rule: The Three Sigma Rule is a method used to identify anomalies in data distributions by leveraging standard deviations. In a normally distributed dataset, it is assumed that data points falling outside three standard deviations from the mean have a very low probability of occurrence. This rule accepts most data within the thresholds defined by standard deviations as normal and flags values outside these limits as anomalies. These boundaries, located three standard deviations away from the mean, are expected to contain approximately 99.73% of the data. Therefore, cases where data falls beyond these thresholds are considered abnormal according to the Three Sigma Rule (Pukelsheim, 1994).
The Three Sigma Rule is a widely recognized method for anomaly detection, particularly due to its simplicity and statistical foundation. The Three Sigma Rule assumes that the data follows a normal distribution. However, this assumption may not hold in financial markets, where data often exhibits skewness, heavy tails, and other non-normal characteristics (Pukelsheim, 1994; Wong et al., 2022). Another underlying assumption is that the data points are independent and identically distributed (i.i.d). Financial time series data, however, often show autocorrelation and volatility clustering, which violates the i.i.d assumption (Bollerslev, 1986; Engle, 1982). The Three Sigma Rule uses fixed thresholds based on standard deviations, which may not adapt to rapidly changing market conditions. This static nature can limit its applicability in dynamic financial environments (Wong et al., 2022).
Spot and futures markets are characterized by high volatility and frequent departures from normal distribution. These markets often exhibit heavy-tailed distributions, where extreme values occur more frequently than predicted by the normal distribution (Utomo & Hanggraeni, 2021). As a result, the Three Sigma Rule may misclassify extreme but normal market movements as anomalies.
While the Three Sigma Rule provides a robust starting point for anomaly detection, its assumptions and limitations necessitate complementary methods, such as directional anomaly analysis, particularly in the volatile and interconnected context of financial markets. This integrated approach enhances the accuracy and relevance of anomaly detection, aligning it with the complexities of real-world market dynamics.
In this context, the mean and standard errors of the daily change rates of the data have been determined.
In the equation, μ represents the mean of the data, σ represents the standard deviation of the data, and e denotes the chosen sigma multiplier (e.g., e = 3 for applying the Three Sigma Rule). The lower and upper threshold values are calculated by adding and subtracting the product of the sigma multiplier and the standard deviation from the mean.
In Eqs. (3) and (4), the X value represents whether it falls below the lower threshold or exceeds the upper threshold. These lower and upper values in the equation indicate anomalies.
By applying Eqs. (1) and (2) to the standard deviation and average values shown in Table 1 for the spot and futures markets, we can determine the upper and lower threshold values for both markets.
µ | $\sigma$ | |
Spot | -0.001321 | 0.018404 |
Future | 0.019141 | 0.064665 |
The threshold values determined according to the Three Sigma Rule are shown for the spot markets in Eqs. (5) and (6). The upper threshold for spot markets is set at 0.054891, while the lower threshold is -0.057533. The threshold values for futures markets are presented in Eqs. (7) and (8), with the upper threshold for futures markets at 0.213136 and the lower threshold at -0.174854.
Figure 1 illustrates the anomalies in spot and futures markets. In the figure, data points exceeding the threshold values are marked with red dots. These red dots, positioned outside the threshold limits, represent anomalies for both markets.
Directional Anomaly Impact: In directional anomaly analysis, the mutual effects between the two markets are examined. Here, the impact of anomalies in the spot and futures markets on each other is expressed through the average daily change (Average Impact). This analysis assesses whether an anomaly occurring in one market has a positive or negative effect on the other market (Lenz & van Leeuwen, 2024).
In Eq. (9), the D value represents the directional effect. Here, n denotes the number of days on which anomalies occur, and ∆F and ∆S represent the markets. According to the equation, if the D value is greater than the anomaly threshold X, the formula is applied, yielding a D value based on whether the markets rise or fall on anomaly days. According to the formula, the effects of increases and decreases in the spot markets on the futures markets, as well as the effects of increases and decreases in the futures markets on the spot markets, have been analyzed. The results of this analysis are presented in Table 2.
The results in Table 2 highlight the mutual directional impacts of anomalies between spot and futures markets. An increase anomaly in the spot market has an average positive impact of 7.65% on the futures market, suggesting that upward movements in the spot market enhance confidence in the futures market, leading to upward trends. Conversely, a decrease anomaly in the spot market has a stronger negative impact of 8.69% on the futures market, indicating that downward movements in the spot market significantly erode confidence and drive futures markets downward. Similarly, an increasing anomaly in the futures market has an average positive impact of 7.82% on the spot market, reflecting the positive influence of futures market trends on spot market investor expectations. However, a decrease anomaly in the futures market has a relatively smaller negative impact of 3.99% on the spot market, suggesting that the futures market’s negative movements influence the spot market to a lesser extent. These findings underline the strong interconnectedness between the two markets, where positive anomalies tend to have similar magnitudes of influence, while negative anomalies in the spot market exert a stronger effect on the futures market compared to the reverse.
Movement | Anomaly Type | Average Impact |
Spot Increase | Futures Change | 0.076473 |
Spot Decrease | Future Change | -0.086936 |
Future Increase | Spot Change | 0.078183 |
Future Decrease | Spot Change | -0.039900 |
4. Impact on Market Regulation, Policy and Technology
This study reveals critical insights into the interplay between spot and futures markets, providing significant implications for market regulation, policymaking, and the role of technology in enhancing market stability. The stronger influence of spot market anomalies on futures markets highlights the interconnected nature of these financial platforms and underscores the need for proactive regulatory frameworks to address potential instabilities effectively.
One key recommendation involves the implementation of advanced monitoring and early-warning systems to detect anomalies and stabilize markets. Integrating mechanisms such as dynamic circuit breakers tailored to the severity of anomalies can prevent cascading disruptions. Moreover, policies enhancing real-time data sharing and transparency can empower market participants, particularly in emerging economies like Turkey, to better understand and respond to market dynamics, ultimately fostering investor confidence.
The integration of anomaly detection into macroeconomic policy frameworks also holds great potential. By understanding how global factors like inflation or geopolitical risks amplify market anomalies, policymakers can design fiscal and monetary strategies to mitigate adverse effects. These insights are particularly valuable for emerging markets where external shocks disproportionately impact financial systems.
Furthermore, the role of technology in addressing these challenges cannot be overstated. Innovations such as artificial intelligence, machine learning, and blockchain offer transformative tools for anomaly detection and market stability. Machine learning models can adapt to dynamic market conditions, enabling accurate and real-time anomaly detection, while blockchain ensures data transparency and reliability. These technologies also support advanced regulatory mechanisms to manage risks posed by algorithmic and high-frequency trading systems.
Finally, the findings underscore the importance of collaboration among regulators, policymakers, and market participants. Educational initiatives aimed at equipping investors and stakeholders with tools for understanding and managing anomalies can strengthen financial ecosystems. Together, these measures provide a foundation for creating resilient markets capable of withstanding both domestic and global economic shocks.
5. Conclusion
In this study, anomalies in the BIST 100 index’s futures and spot markets were detected using the Three Sigma Rule, and the effects of post-anomaly increases or decreases on futures and spot markets were investigated through directional impact analysis. The upper threshold for the spot market was determined to be 0.054891, while the lower threshold was -0.057533. In the futures market, the upper threshold was 0.213136, and the lower threshold was -0.174854. Following the determination of these thresholds, a directional impact analysis was conducted to examine the influence of market increases or decreases on each other. The results reveal that an increase anomaly in the spot market has an average positive effect of 7.65% on the futures market, while a decrease anomaly in the spot market has an average negative effect of 8.69% on the futures market. Similarly, an increase anomaly in the futures market has an average positive impact of 7.82% on the spot market, while a decrease anomaly in the futures market has an average negative impact of 3.99% on the spot market.
The findings highlight the significant interconnectedness between spot and futures markets, particularly during periods of heightened market volatility. These anomalies often emerge as a result of macroeconomic factors such as global inflation, geopolitical uncertainties, or rapid shifts in investor sentiment. The increased market volatility observed during the pandemic period and the subsequent inflation crisis has exacerbated these anomalies, underscoring the importance of robust market monitoring and risk management strategies.
To effectively address these anomalies, policymakers and market regulators should consider implementing mechanisms to enhance market stability. One potential approach is the establishment of stricter circuit breaker mechanisms to mitigate the impact of sudden price movements. Additionally, increasing market transparency through improved reporting and real-time data dissemination can help investors respond more rationally to market developments, reducing the likelihood of exaggerated reactions. Investor education programs focusing on anomaly detection and risk management could further equip market participants with the tools needed to make informed decisions during volatile periods.
These findings are particularly valuable for stock market investors in the Turkish economy, which is highly sensitive to fluctuations in foreign markets. By understanding the nature and directional effects of anomalies, investors can better anticipate market movements and adjust their strategies accordingly. This study also provides a foundation for future research aimed at exploring the underlying causes of market anomalies and developing comprehensive strategies to mitigate their adverse effects on financial markets.
The data used to support the research findings are available from the corresponding author upon request.
The authors declare no conflict of interest.