Unsupervised Machine Learning Based Anomaly Detection in High Frequency Data: Evidence from Cryptocurrency Market
Keywords:
Unsupervised machine learning models, anomaly detection, Monte Carlo simulations, Bitcoin, Dashcoin, Ethereum, Stellar, Tron, Litecoin.Abstract
The rapid integration of cryptocurrencies into the global financial ecosystem has introduced unprecedented challenges in market surveillance, risk management, and anomaly detection. While conventional statistical models such as ARIMA (Autoregressive Integrated Moving Average) and GARCH (Generalized Autoregressive Conditional Heteroscedasticity) have been widely used for anomaly detection, their reliance on assumptions of normality and stationarity often fails to capture the complexities of high-frequency, non-linear cryptocurrency trading. Furthermore, traditional risk metrics including down-to-up volatility, negative conditional skewness, and relative frequency may overlook short-term anomalies due to data aggregation limitations.
In order to address these issues, this paper proposes machine-learning model for detecting anomalies in cryptocurrency markets using Jupyter Notebook. We compare four advanced unsupervised machine learning models, i.e, Density-Based Spatial Clustering of Applications with Noise (DBSCAN), Isolation Forest (iForest), One-Class Support Vector Machine (OC-SVM), and Local Outlier Factor (LOF) for anomaly detection by using Monte Carlo simulations. The findings indicate that DBSCAN has the highest precision (79.7%) with the fewest false positives, making it ideal for supervisory monitoring. However, the high false positive rates of OC-SVM and Isolation Forest limit their use. By using data of six well-known cryptocurrencies at three different temporal resolutions (daily, hourly, and 15-minute) the performance of these four unsupervised learning techniques also examined and confirmed that the anomalies identified by DBSCAN are also consistent with the other three methods. Additionally, for robustness of results, we use UpSet Plots to incorporate the shared anomalies and found across the three unsupervised learning methods. Number of anomalies also depends on the volatility and time interval of cryptocurrencies, more volatile / high frequency more anomalies.
The study presents sound methodological approach for facilitating financial monitoring and mitigating risks in the cryptocurrencies market, and provides useful information for market players, analysts and policymakers. These results emphasize the importance of choosing algorithms based on specific surveillance targets to promote greater stability in digital asset environments.
References
Agyemang, E. F. (2024). Anomaly detection using unsupervised machine learning algorithms: A simulation study. Scientific African, 26, e02386. https://doi.org/10.1016/j.sciaf.2024.e02386
Ananias, P. H. M., & and Negri, R. G. (2021). Anomalous behaviour detection using one- class support vector machine and remote sensing images: A case study of algal bloom occurrence in inland waters. International Journal of Digital Earth, 14(7), 921-942. https://doi.org/10.1080/17538947.2021.1907462
Aysan, A. F., Demir, E., Gozgor, G., & Lau, C. K. M. (2019). Effects of the geopolitical risks on Bitcoin returns and volatility. Research in International Business and Finance, 47, 511-518. https://doi.org/10.1016/j.ribaf.2018.09.011
Başçı, S., & Khan, A. U. I. (2023). Detecting Unknown Change Points for Heteroskedastic Data. Dokuz Eylül Üniversitesi İşletme Fakültesi Dergisi, 24(2), 81-98. https://doi.org/10.24889/ifede.1300907
Bhatia, P., & Jain, L. (2025). Lawful Sequence of Events and Cryptocurrency Anomalies: An Empirical Investigation. FIIB Business Review, 14(1), 71-88. https://doi.org/10.1177/23197145211042438
Bielecki, C. (2023). Anomaly Detection for Galactic Archaeology: Unveiling Stellar Streams with Machine Learning [Université de Montréal]. https://umontreal.scholaris.ca/server/api/core/bitstreams/b908a503-
Blum, M., & Gelfman, L. P. (2023). Visualizing Multimorbidity in Chronically Ill Populations Using UpSet Plots. Journal of Pain and Symptom Management, 65(4), e397- e398. https://doi.org/10.1016/j.jpainsymman.2022.12.003
Breunig, M. M., Kriegel, H.-P., Ng, R. T., & Sander, J. (2000a). LOF: Identifying density- based local outliers. Proceedings of the 2000 ACM SIGMOD International Conference on Management of Data, 93-104. https://doi.org/10.1145/342009.335388
Breunig, M. M., Kriegel, H.-P., Ng, R. T., & Sander, J. (2000b). LOF: Identifying density- based local outliers. Proceedings of the 2000 ACM SIGMOD International Conference on Management of Data, 93-104. https://doi.org/10.1145/342009.335388
Cholevas, C., Angeli, E., Sereti, Z., Mavrikos, E., & Tsekouras, G. E. (2024). Anomaly Detection in Blockchain Networks Using Unsupervised Learning: A Survey. Algorithms, 17(5), 201. https://doi.org/10.3390/a17050201
Corbet, S., Lucey, B., Urquhart, A., & Yarovaya, L. (2019). Cryptocurrencies as a financial asset: A systematic analysis. International Review of Financial Analysis, 62, 182-199. https://doi.org/10.1016/j.irfa.2018.09.003
Ehsan, A., Iqbal, Z., Abuowaida, S., Aljaidi, M., Usman Zia, H., Alshdaifat, N., & Khalf Alshammry, N. (2024). Enhanced Anomaly Detection in Ethereum: Unveiling and Classifying Threats with Machine Learning. IEEE Access, 12, 176440-176456. https://doi.org/10.1109/ACCESS.2024.3504300
Eskin, E., Arnold, A., Prerau, M., Portnoy, L., & Stolfo, S. (2002). A Geometric Framework for Unsupervised Anomaly Detection. In D. Barbará & S. Jajodia (Eds.), Applications of Data Mining in Computer Security (pp. 77-101). Springer US. https://doi.org/10.1007/978-1-4615-0953-0_4
Ester, M., Kriegel, H.-P., & Xu, X. (1996). A Density-Based Algorithm for Discovering Clusters in Large Spatial Databases with Noise. In Kdd Proceeding, 96(34), 226-231.
Fahim, A. (2018). Homogeneous Densities Clustering Algorithm. International Journal of Information Technology and Computer Science, 10(10), 1-10.
https://doi.org/10.5815/ijitcs.2018.10.01
Fama, E. F. (1970). Efficient capital markets. Journal of Finance, 25(2), 383-417. https://doi.org/10.2307/2325486
Fan, F., Carmine, V., Michail, B., Kanthan, L., Martinez-Rego, D., Wu, F., & Li, L. (2022). Cryptocurrency trading: A comprehensive survey. Financial Innovation, 8(1). https://doi.org/10.1186/s40854-021-00321-6
Golnari, A., Komeili, M. H., & Azizi, Z. (2024). Probabilistic deep learning and transfer learning for robust cryptocurrency price prediction. Expert Systems with Applications, 255, 124404. https://doi.org/10.1016/j.eswa.2024.124404
Hisham, S., Makhtar, M., & Aziz, A. A. (2023). Anomaly detection in smart contracts based on optimal relevance hybrid features analysis in the Ethereum blockchain employing ensemble learning. International Journal of Advanced Technology and Engineering Exploration, 10(109), 1552. https://doi.org/10.19101/IJATEE.2023.10102216
Kaleem, M., Jusoh, H. bin, Raza, H., Sadiq, M., & Hamzah, A. H. bin. (2024). A Machine Learning Approach to Predict Bankruptcy in Chinese Companies with ESG Integration. Pakistan Journal of Commerce and Social Sciences, 18(2), 335-357. https://doi.org/10.64534/Commer.2024.043
Kampers, O., Qahtan, A., Mathur, S., & Velegrakis, Y. (2022). Manipulation detection in cryptocurrency markets: An anomaly and change detection based approach. Proceedings of the 37th ACM/SIGAPP Symposium on Applied Computing, 326-329. https://doi.org/10.1145/3477314.3507185
Khan, A. U. I., Ozcan, R., & Ibrahim, M. M. (2024). Unravelling Crash Risk Transmission: Cryptocurrency Impact on Stock Markets in G-7 and China. Pakistan Journal of Commerce and Social Sciences, 18(4), 848-871. https://doi.org/10.64534/Comm.2025.019
Kim, K. G. (2016). Book Review: Deep Learning. Healthcare Informatics Research, 22(4),
351. https://doi.org/10.4258/hir.2016.22.4.351
Kumar, A., Kumar, A., Bashir, A. K., Rashid, M., Kumar, V. D. A., & Kharel, R. (2021). Distance Based Pattern Driven Mining for Outlier Detection in High Dimensional Big Dataset. ACM Transactions on Management Information System, 13(1), 8:1-8:17. https://doi.org/10.1145/3469891
Kyriazis, N. A. (2021). A Survey on Volatility Fluctuations in the Decentralized Cryptocurrency Financial Assets. Journal of Risk and Financial Management, 14(7), 293. https://doi.org/10.3390/jrfm14070293
Latif, M. N., Kaplan, M., & Khan, A. U. I. (2025). Analyzing Anomalies for Financial Fraud Detection: A Case Study of Selected Insurance Companies Listed in Borsa Istanbul. FWU Journal of Social Sciences, 19(2). http://doi.org/10.51709/19951272
Liu, H., Zhao, B., Guo, J., Zhang, K., & Liu, P. (2024). A lightweight unsupervised adversarial detector based on autoencoder and isolation forest. Pattern Recognition, 147, 110127. https://doi.org/10.1016/j.patcog.2023.110127
McLeay, S. (1986). Student's T and the Distribution of Financial Ratios. Journal of Business Finance & Accounting, 13(2), 209-222. https://doi.org/10.1111/j.1468- 5957.1986.tb00091.x
Naz, F., Sayyed, M., Rehman, R.-U.-, Naseem, M. A., Abdullah, S. N., & Ahmad, M. I. (2023). Calendar anomalies and market volatility in selected cryptocurrencies. Cogent
Business & Management, 10(1). https://doi.org/10.1080/23311975.2023.2171992
Patel, V., Pan, L., & Rajasegarar, S. (2020). Graph Deep Learning Based Anomaly Detection in Ethereum Blockchain Network. In M. Kutyłowski, J. Zhang, & C. Chen (Eds.), Network and System Security (pp. 132-148). Springer International Publishing. https://doi.org/10.1007/978-3-030-65745-1_8
Pérez-Cano, V., & Jurado, F. (2025). Fraud Detection in Cryptocurrency Networks-An Exploration Using Anomaly Detection and Heterogeneous Graph Transformers. Future Internet, 17(1), 44. https://doi.org/10.3390/fi17010044
Poutré, C., Chételat, D., & Morales, M. (2024). Deep unsupervised anomaly detection in high-frequency markets. The Journal of Finance and Data Science, 10, 100129. https://doi.org/10.1016/j.jfds.2024.100129
Rezapour Mashhadi, M. M. (2019). Anomaly Detection using Unsupervised Methods: Credit Card Fraud Case Study. International Journal of Advanced Computer Science and Applications, 10(11). https://doi.org/10.14569/IJACSA.2019.0101101
Schölkopf, B., Platt, J. C., Shawe-Taylor, J., Smola, A. J., & Williamson, R. C. (2001). Estimating the Support of a High-Dimensional Distribution. Neural Computation, 13(7), 1443-1471. https://doi.org/10.1162/089976601750264965
Shi, F.-B., Sun, X.-Q., Gao, J.-H., Xu, L., Shen, H.-W., & Cheng, X.-Q. (2019). Anomaly
detection in Bitcoin market via price return analysis. PLOS ONE, 14(6), e0218341. https://doi.org/10.1371/journal.pone.0218341
Urquhart, A., & Yarovaya, L. (2024). Cryptocurrency research: Future directions. The European Journal of Finance, 30(16), 1849-1854.
https://doi.org/10.1080/1351847X.2023.2284186
Wang, H., Zheng, J., Carvajal-Roca, I. E., Chen, L., & Bai, M. (2023). Financial Fraud Detection Based on Deep Learning: Towards Large-Scale Pre-training Transformer Models. In H. Wang, X. Han, M. Liu, G. Cheng, Y. Liu, & N. Zhang (Eds.), Knowledge Graph and Semantic Computing: Knowledge Graph Empowers Artificial General Intelligence (pp. 163-177). Springer Nature. https://doi.org/10.1007/978-981-99-7224- 1_13
Witayanont, Y., & Viyanon, W. (2025). Anomaly Detection in Bitcoin Network: Using Distance-based and Tree-based Unsupervised Learning Methods. Proceedings of the 6th ACM International Symposium on Blockchain and Secure Critical Infrastructure, 1-7. https://doi.org/10.1145/3659463.3660022
Yahia, A., Mouhssine, Y., El Alaoui, A., & El Alaoui, S. O. (2024). Exploring machine learning-based methods for anomalies detection: Evidence from cryptocurrencies. International Journal of Data Science and Analytics. https://doi.org/10.1007/s41060-024- 00703-w
Yahia, A., Mouhssine, Y., Elalaoui, A., & Ouatik Elalaoui, S. (2024). Leveraging Machine Learning for Anomaly Detection Methods in Cryptocurrency: A Data-Driven Study. 2024 10th International Conference on Optimization and Applications (ICOA), 1-5. https://doi.org/10.1109/ICOA62581.2024.10754457
Yang, K., Kpotufe, S., & Feamster, N. (2021). An Efficient One-Class SVM for Anomaly Detection in the Internet of Things (No. arXiv:2104.11146). arXiv.
Zhu, Y., Dickinson, D., & Li, J. (2017). Analysis on the influence factors of Bitcoin's price based on VEC model. Financial Innovation, 3(1), 3. https://doi.org/10.1186/s40854-017- 0054-0
Zou, D., Xiang, Y., Zhou, T., Peng, Q., Dai, W., Hong, Z., Shi, Y., Wang, S., Yin, J., & Quan, H. (2023). Outlier detection and data filling based on KNN and LOF for power transformer operation data classification. Energy Reports, 9, 698-711. https://doi.org/10.1016/j.egyr.2023.04.094




