Skip to main content
Log in

The Symmetric and Asymmetric Algorithmic Trading Strategies for the Stablecoins

  • Published:
Computational Economics Aims and scope Submit manuscript

Abstract

The symmetric trading algorithm (STA) and asymmetric trading algorithm (ATA) are proposed, and a step-by-step pseudo code of proposed algorithms are presented. Utilizing a real dataset, we examine the profitability of these trading algorithms on stablecoin markets. In the STA, the buying and selling prices are chosen equidistant from the expected asset price, while in the ATA, the choice of the selection of buying and selling prices is flexible. The profitability of the algorithms is computed and it is demonstrated that as the volatility of the considered market is increasing, the average and maximum profits of the both algorithms are raising in general. It is also shown that although the profitability of both algorithms is closer for relatively low volatile price series, the ATA outperforms the STA when the considered market is undervalued (or overvalued), whereas the STA is more profitable when the price series is oscillating near the expected price level. Furthermore, it is observed that although it is critical to determine the optimal profit margin (OPM) to maximize the profit of the trading algorithms, there is not an obvious relation between the volatility of the price series and the OPM values. This problem is solved by machine learning methods, and the naive Bayes classifier is used to classify the OPM values as small, medium or large. It is noted that proposed trading algorithms can be applied to all practical stock and cryptocurrency exchange markets, as they only need two assets with an expected price ratio.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Algorithm 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6

Similar content being viewed by others

Data Availability

The real dataset used in this study is publicly available on Binance cryptocurrency exchange market [https://www.binance.com]. Matlab code of the STA and ATA with associated sample dataset is available in a GitHub repository [https://github.com/bagcim/TradingAlgorithm].

Abbreviations

STA:

Symmetric trading algorithm

ATA:

Asymmetric trading algorithm

OPM:

Optimal profit margin

AT:

Algorithmic trading

ML:

Machine learning

HF:

High-frequency

SVM:

Support vector machine

LR:

Logistic Regression

KNN:

K-nearest-neighbor

DT:

Decision tree

RF:

Random forest

NB:

Naive Bayes

PM:

Profit margin

References

  • Ante, L., Fiedler, I., Willruth, J. M., et al. (2023). A systematic literature review of empirical research on stablecoins. FinTech, 2(1), 34–47.

    Article  Google Scholar 

  • Bağcı, M. (2021) A data-driven machine learning algorithm for financial market prediction. In Bayram M (ed) Prooceedings of 9th International Conference on Applied Analysis and Mathematical Modelling: 11-13 June 2021; Istanbul, Turkey, pp. 38–43, https://www.ntmsci.com/ntmsci/Articles

  • Baur, D. G., & Dimpfl, T. (2021). The volatility of bitcoin and its role as a medium of exchange and a store of value. Empirical Economics, 61, 2663–2683.

    Article  Google Scholar 

  • Baur, D. G., & Hoang, L. T. (2021). A crypto safe haven against bitcoin. Finance Research Letters, 38(101), 431.

    Google Scholar 

  • Bechler, K., & Ludkovski, M. (2015). Optimal execution with dynamic order flow imbalance. SIAM Journal on Financial Mathematics, 6(1), 1123–1151.

    Article  Google Scholar 

  • Binance (2023a). Binance cryptocurrency exchange. Accessed 26 June 2023., https://www.binance.com/en/markets

  • Binance (2023b). Trading bots. Accessed 14 June 2023., https://www.binance.com/en/trading-bots/

  • Breiman, L. (2001). Random forests. Machine Learning, 45, 5–32. https://doi.org/10.1023/A:1010933404324

    Article  Google Scholar 

  • Burges, C. (1998). A Tutorial on Support Vector Machines for Pattern Recognition. Data Mining and Knowledge Discovery, 2, 121–167. https://doi.org/10.1023/A:1009715923555

    Article  Google Scholar 

  • Cortes, C., & Vapnik, V. (1995). Support-vector networks. Machine Learning, 20, 273–297. https://doi.org/10.1007/BF00994018

    Article  Google Scholar 

  • Carsamer, E. (2016). Volatility transmission in african foreign exchange markets. African Journal of Economic and Management Studies, 7, 205–224.

    Article  Google Scholar 

  • Cartea, A., & Jaimungal, S. (2013). Modelling asset prices for algorithmic and high-frequency trading. Applied Mathematical Finance, 20(6), 512–547.

    Article  Google Scholar 

  • Cartea, Á., Jaimungal, S., & Penalva, J. (2015). Algorithmic and High-Frequency Trading. Cambridge University Press.

    Google Scholar 

  • Cartea, A., Donnelly, R., & Jaimungal, S. (2018). Enhancing trading strategies with order book signals. Applied Mathematical Finance, 25(1), 1–35. https://doi.org/10.1080/1350486X.2018.1434009

    Article  Google Scholar 

  • Cawley, G. C., & Talbot, N. L. C. (2010). On over-fitting in model selection and subsequent selection bias in performance evaluation. The Journal of Machine Learning Research, 11, 2079–2107.

    Google Scholar 

  • Chaboud, A. P., Chiquoine, B., Hjalmarsson, E., et al. (2014). Rise of the machines: Algorithmic trading in the foreign exchange market. The Journal of Finance, 69(5), 2045–2084.

    Article  Google Scholar 

  • Chu, J., Chan, S., Nadarajah, S., et al. (2017). Garch modelling of cryptocurrencies. Journal of Risk and Financial Management, 10(4), 17.

    Article  Google Scholar 

  • Cohen, G. (2021). Optimizing algorithmic strategies for trading bitcoin. Computational Economics, 57(2), 639–654.

    Article  Google Scholar 

  • Coincodex (2022). Coincodex cryptocurrency exchange. Accessed 3 Oct 2022, https://coincodex.com/cryptocurrencies/sector/stablecoins#faq-7

  • Cover, T., & Hart, P. (1967). Nearest neighbor pattern classification. IEEE Transactions on Information Theory, 13(1), 21–27. https://doi.org/10.1109/TIT.1967.1053964

    Article  Google Scholar 

  • Cui, Z., Kirkby, J. L., & Nguyen, D. (2021). A data-driven framework for consistent financial valuation and risk measurement. European Journal of Operational Research, 289(1), 381–398.

    Article  Google Scholar 

  • DeMaris, A. (1995). A Tutorial in Logistic Regression. Journal of Marriage and Family, 57(4), 956–968. https://doi.org/10.2307/353415

    Article  Google Scholar 

  • Dong, Y., & Boutaba, R. (2019). Elasticoin: Low-volatility cryptocurrency with proofs of sequential work. In 2019 IEEE International Conference on Blockchain and Cryptocurrency (ICBC) pp. 205–209.

  • D’Amato, V., Levantesi, S., & Piscopo, G. (2022). Deep learning in predicting cryptocurrency volatility. Physica A: Statistical Mechanics and its Applications, 596(127), 158.

    Google Scholar 

  • European Central Bank BS (2019). Algorithmic trading: trends and existing regulation. Accessed 3 Oct 2022, https://www.bankingsupervision.europa.eu/press/publications/newsletter/2019/html/ssm.nl190213_5.en.html

  • FSB (2022). Assessment of risks to financial stability from crypto-assets. Financial Stability Board, accessed 3 Oct 2022, https://www.fsb.org/wp-content/uploads/P160222.pdf

  • García-Medina, A., & Aguayo-Moreno, E. (2023). Lstm–garch hybrid model for the prediction of volatility in cryptocurrency portfolios. Computational Economics, 1–32.

  • Goodhue, D. L., Lewis, W., & Thompson, R. (2012). Does pls have advantages for small sample size or non-normal data? MIS Quarterly, 36(3), 981–1001.

    Article  Google Scholar 

  • Gourieroux, C., & Monfort, A. (1981). Asymptotic properties of the maximum likelihood estimator in dichotomous logit models. Journal of Econometrics, 17(1), 83–97. https://doi.org/10.1016/0304-4076(81)90060-9

    Article  Google Scholar 

  • Grobys, K., Junttila, J., Kolari, J. W., et al. (2021). On the stability of stablecoins. Journal of Empirical Finance, 64, 207–223.

    Article  Google Scholar 

  • Guindy, M. A. (2021). Cryptocurrency price volatility and investor attention. International Review of Economics & Finance, 76, 556–570.

    Article  Google Scholar 

  • Gupta, S., Gupta, S., Mathew, M., et al. (2021). Prioritizing intentions behind investment in cryptocurrency: a fuzzy analytical framework. Journal of Economic Studies, 48(8), 1442–1459.

    Article  Google Scholar 

  • Güloğlu, B., Kaya, P., & Aydemir, R. (2016). Volatility transmission among latin american stock markets under structural breaks. Physica A: Statistical Mechanics and its Applications, 462, 330–340. https://doi.org/10.1016/j.physa.2016.06.093

    Article  Google Scholar 

  • Hall, P., Park, B. U., & Samworth, R. J. (2008). Choice of neighbor order in nearest-neighbor classification. The Annals of Statistics, 36(5), 2135–2152. https://doi.org/10.1214/07-AOS537

    Article  Google Scholar 

  • Hoang, D., & Wiegratz, K. (2022). Machine learning methods in finance: Recent applications and prospects. European Financial Management. https://doi.org/10.1111/eufm.12408

    Article  Google Scholar 

  • Hoang, L.T., & Baur, D.G. (2021). How stable are stablecoins? Eur J Fin, 1–17.

  • Ismay, C., & Kim, A. Y. (2020). Statistical inference via data science: A modern dive into R and the Tidyverse. Chapman & Hall/CRC.

    Google Scholar 

  • Jadon, E., & Sharma, R. (2017). Data mining: Document classification using naive bayes classifier. International Journal of Computer Applications, 167(6), 13–16. https://doi.org/10.5120/ijca2017913925

    Article  Google Scholar 

  • Jain, A., Jain, C., & Jiang, C. X. (2021). Active trading in etfs: The role of high-frequency algorithmic trading. Financial Analysts Journal, 77(2), 66–82. https://doi.org/10.1080/0015198X.2020.1865694

    Article  Google Scholar 

  • James, G., Witten, D., Hastie, T., et al. (2013). An Introduction to Statistical Learning: with Applications in R. Springer.

    Book  Google Scholar 

  • Jarno, K., & Kołodziejczyk, H. (2021). Does the design of stablecoins impact their volatility? Journal of Risk and Financial Management, 14(2), 42.

    Article  Google Scholar 

  • Jessen, H. C. (2018). Applied Logistic Regression Analysis. Journal of the Royal Statistical Society Series D: The Statistician, 45(4), 534–535. https://doi.org/10.2307/2988559

    Article  Google Scholar 

  • Jin, F., Li, J., & Xue, Y. (2023). Preferring stablecoin over dollar: Evidence from a survey of ethereum platform traders. Journal of International Money and Finance, 131(102), 796.

    Google Scholar 

  • Jin, P. (2021). Arbitrage among stablecoins. PhD thesis, The Graduate School of Clemson University

  • Kahya, A., Krishnamachari, B., & Yun, S. (2022). Stablecoins: Reducing the volatility of cryptocurrencies. Handbook on Blockchain (pp. 445–461). Springer.

    Chapter  Google Scholar 

  • Keller, J. M., Gray, M. R., & Givens, J. A. (1985). A fuzzy k-nearest neighbor algorithm. IEEE Transactions on Systems, Man, and Cybernetics SMC, 15(4), 580–585. https://doi.org/10.1109/TSMC.1985.6313426

    Article  Google Scholar 

  • Konrad, F., & Philip, T. (1994). Intelligent systems in finance. Applied Mathematical Finance, 1(2), 195–207. https://doi.org/10.1080/13504869400000011

    Article  Google Scholar 

  • Kristoufek, L. (2021). Tethered, or untethered? on the interplay between stablecoins and major cryptoassets. Finance Research Letters, 43(101), 991.

    Google Scholar 

  • Kristoufek, L. (2022). On the role of stablecoins in cryptoasset pricing dynamics. Financial Innovation. https://doi.org/10.1186/s40854-022-00343-8

    Article  Google Scholar 

  • Kucoin (2023). Trading bots. Accessed 14 June 2023., https://www.kucoin.com/trading-bot

  • Kuttichira, D.P., Gopalakrishnan, E.A., & Menon, V.K. et al (2017). Stock price prediction using dynamic mode decomposition. In 2017 International Conference on Advances in Computing, Communications and Informatics (ICACCI) pp. 55–60.

  • Li, Y., Jiang, S., Li, X., et al. (2020). Hybrid data decomposition-based deep learning for bitcoin prediction and algorithm trading. Financial Innovation, 8, 1–24.

    Article  Google Scholar 

  • Liang, Y., Thavaneswaran, A., & Paseka, A. et al (2020). A novel dynamic data-driven algorithmic trading strategy using joint forecasts of volatility and stock price. In 2020 IEEE 44th Annual Computers, Software, and Applications Conference (COMPSAC) pp. 225–234.

  • Liu, S., Leitao, A., Borovykh, A., et al. (2021). On a neural network to extract implied information from American options. Applied Mathematical Finance, 28(5), 449–475. https://doi.org/10.1080/1350486X.2022.2097099

    Article  Google Scholar 

  • Lyons, R. K., & Viswanath-Natraj, G. (2023). What keeps stablecoins stable? Journal of International Money and Finance, 131(102), 777.

    Google Scholar 

  • Ma, Y., Zeng, Y., & Zhang, A.L. (2023). Stablecoin runs and the centralization of arbitrage. Available at SSRN 4398546

  • Mann, J., & Kutz, J. N. (2016). Dynamic mode decomposition for financial trading strategies. Quantitative Finance, 16(11), 1643–1655. https://doi.org/10.1080/14697688.2016.1170194

    Article  Google Scholar 

  • Masini, R. P., Medeiros, M. C., & Mendes, E. F. (2023). Machine learning advances for time series forecasting. Journal of Economic Surveys, 37(1), 76–111. https://doi.org/10.1111/joes.12429

    Article  Google Scholar 

  • Myles, A. J., Feudale, R. N., Liu, Y., et al. (2004). An introduction to decision tree modeling. Journal of Chemometrics, 18(6), 275–285. https://doi.org/10.1002/cem.873

    Article  Google Scholar 

  • Nikou, M., Mansourfar, G., & Bagherzadeh, J. (2019). Stock price prediction using deep learning algorithm and its comparison with machine learning algorithms. Intelligent Systems in Accounting, Finance and Management, 26, 164–174.

    Google Scholar 

  • Noble, W. S. (2006). What is a support vector machine? Nature Biotechnology, 24, 1565–1567. https://doi.org/10.1038/nbt1206-1565

    Article  Google Scholar 

  • Pal, S., & Chattopadhyay, A. K. (2019). ‘Indian stock market volatility’: A study of inter-linkages and spillover effects. Journal of Emerging Market Finance, 18, S183–S212.

    Article  Google Scholar 

  • Paul, A., Mukherjee, D. P., Das, P., et al. (2018). Improved random forest for classification. IEEE Transactions on Image Processing, 27(8), 4012–4024. https://doi.org/10.1109/TIP.2018.2834830

    Article  Google Scholar 

  • Pernice, I.G.A. (2021). On stablecoin price processes and arbitrage. In: Financial Cryptography and Data Security. In FC 2021 International Workshops: CoDecFin, DeFi, Voting, and WTSC, Virtual Event, March 5, 2021, Revised Selected Papers 25, Springer, pp. 124–135.

  • Rajalakshmi, R., & Aravindan, C. (2018). A naive bayes approach for url classification with supervised feature selection and rejection framework. Computational Intelligence, 34(1), 363–396. https://doi.org/10.1111/coin.12158

    Article  Google Scholar 

  • Rezvani, S., & Wang, X. (2023). A broad review on class imbalance learning techniques. Applied Soft Computing, 143(110), 415. https://doi.org/10.1016/j.asoc.2023.110415

    Article  Google Scholar 

  • Rokach, L., & Maimon, O. (2014). Data Mining with Decision Trees (2nd ed.). World Scientific Pub. Co., Inc. https://doi.org/10.1142/9097

    Book  Google Scholar 

  • Romero Ugarte, J. L. (2018). Distributed ledger technology (dlt): Introduction. Banco de Espana Article, 19, 18.

    Google Scholar 

  • Rundo, F., Trenta, F., di Stallo, A. L., et al. (2019). Machine learning for quantitative finance applications: A survey. Applied Sciences. https://doi.org/10.3390/app9245574

    Article  Google Scholar 

  • Sidorenko, E. L. (2020). Stablecoin as a new financial instrument. Digital Age: Chances, Challenges and Future 7 (pp. 630–638). Springer.

    Chapter  Google Scholar 

  • Situ, J. (2015). The impact of real exchange rate volatility on exports to U.S.: A comparison between developed and export-oriented less developed countries. International Journal of Business and Management, 10, 214.

    Article  Google Scholar 

  • Ślepaczuk, R., & Zenkova, M. (2018). Robustness of support vector machines in algorithmic trading on cryptocurrency market. Central European Economic Journal, 5(52), 186–205.

    Article  Google Scholar 

  • Soylu, P. K., Okur, M., Çatıkkaş, Ö., et al. (2020). Long memory in the volatility of selected cryptocurrencies: Bitcoin, ethereum and ripple. Journal of Risk and Financial Management. https://doi.org/10.3390/jrfm13060107

    Article  Google Scholar 

  • Stoikov, S., & Waeber, R. (2012). Optimal asset liquidation using limit order book information. Available at SSRN 2113827x.

  • Strader, T. J., Rozycki, J. J., Root, T. H., et al. (2020). Machine learning stock market prediction studies: Review and research directions. Journal of International Technology and Information Management, 28, 63–83.

    Article  Google Scholar 

  • Tibshirani, H. T. R., & Friedman, J. H. (2001). The Elements of Statistical Learning : Data Mining Inference and Prediction : With 200 Full-Color Illustrations. Springer.

    Google Scholar 

  • Virgilio, G. P. M. (2022). A theory of very short-time price change: security price drivers in times of high-frequency trading. Financial Innovation, 8, 1–34.

    Article  Google Scholar 

  • Vo, A., & Yost-Bremm, C. (2020). A high-frequency algorithmic trading strategy for cryptocurrency. Journal of Computer Information Systems, 60(6), 555–568.

    Article  Google Scholar 

  • Wang, D. (2017). Adjustable robust singular value decomposition: Design, analysis and application to finance. Data, 2, 29.

    Article  Google Scholar 

  • Wang, G. J., Ma, X., & Wu, H. (2020). Are stablecoins truly diversifiers, hedges, or safe havens against traditional cryptocurrencies as their name suggests? Research in International Business and Finance, 54(101), 225.

    Google Scholar 

  • Wang, S., Neusüss, S., & Guhr, T. (2018). Statistical properties of market collective responses. The European Physical Journal B, 91, 1–11.

    Article  Google Scholar 

  • Wikarsa, L., & Thahir, S.N. (2015). A text mining application of emotion classifications of twitter’s users using naïve bayes method. In 2015 1st International Conference on Wireless and Telematics (ICWT) pp. 1–6, https://doi.org/10.1109/ICWT.2015.7449218

  • Zhang, Z., Lim, B., & Zohren, S. (2021). Deep learning for market by order data. Applied Mathematical Finance, 28(1), 79–95. https://doi.org/10.1080/1350486X.2021.1967767

    Article  Google Scholar 

Download references

Acknowledgements

Not applicable.

Funding

The authors declare that no funds, grants, or other support were received during the preparation of this manuscript.

Author information

Authors and Affiliations

Authors

Contributions

MB carried out the methodology and analysis of the research, and drafted the manuscript. PKS prepared literature review and contributed to writing and organizing the manuscript. SK helped draft the manuscript and participated in the design of the research. All authors read and approved the final manuscript.

Corresponding author

Correspondence to Mahmut Bağcı.

Ethics declarations

Conflict of interest

The authors have no relevant financial or non-financial interests to disclose.

Ethical Approval

This manuscript does not contain any studies with human participants or animals performed by any of the authors.

Consent to Participate

Informed consent was obtained from all individual participants included in the study.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Bağcı, M., Kaya Soylu, P. & Kıran, S. The Symmetric and Asymmetric Algorithmic Trading Strategies for the Stablecoins. Comput Econ (2024). https://doi.org/10.1007/s10614-023-10532-x

Download citation

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s10614-023-10532-x

Keywords

Navigation