Algorithmic Trading Bot Using Artificial Intelligence Supertrend Strategy
Authors
Bogdan-Petru Vrînceanu
Bucharest Academy of Economic Studies, Romania (RO)
Florentin Șerban
Bucharest Academy of Economic Studies, Romania (RO)
Article Information
DOI: 10.51583/IJLTEMAS.2025.140103
Subject Category: Applied Science
Volume/Issue: 14/1 | Page No: 14-20
Publication Timeline
Submitted: 2025-01-27
Published: 2025-01-27
Abstract
Abstract: This article presents a trading strategy that combines the Super Trend indicator with the K-Nearest Neighbors (KNN) algorithm, utilizing artificial intelligence (AI) to automate market decision-making and enhance trading accuracy. The strategy integrates the SuperTrend indicator, which dynamically tracks market volatility, with the KNN algorithm, allowing the system to classify market trends as bullish, bearish, or neutral based on historical data. This enables the strategy to make intelligent, data-driven decisions in real-time without human intervention.
The AI-driven approach automates the entire trading process, from data analysis to trade execution, improving efficiency and removing emotional biases from trading decisions. The KNN algorithm plays a key role in this automation by analyzing past market conditions and identifying patterns that inform future price movements. This allows the system to adapt to changing market trends and react quickly to new data, ensuring timely and accurate decisions.
The results of the strategy indicate strong performance, with a Net Profit of 959.38 USD and a Gross Profit of 3,005.71 USD, demonstrating the strategy's ability to generate consistent returns. The Profit Factor of 1.469 further highlights the system's ability to produce profits while managing risk effectively. Additionally, the Sharpe Ratio of 0.558 shows that the strategy provides positive risk-adjusted returns, making it a reliable tool for automated trading.
In conclusion, this AI-powered Super Trend-KNN strategy showcases the potential of combining artificial intelligence with technical indicators for automated trading. By eliminating the need for manual intervention and leveraging AI to adapt to market conditions, the strategy provides an efficient and scalable solution for intelligent decision-making in trading.
Keywords
Algorithmic Trading, Artificial Intelligence, Machine Learning, SuperTrend Strategy, Automated Trading Bot
Downloads
References
1. Barardehi, Yashar H., and Dan Bernhardt. “Decomposing the Dynamics of Intra-Day Trading Activity and Trading Outcomes.” SSRN Electronic Journal, 2017, https://doi.org/10.2139/ssrn.2844936. [Google Scholar] [Crossref]
2. Belkin, Mikhail, et al. “Reconciling Modern Machine-Learning Practice and the Classical Bias–Variance Trade-Off.” Proceedings of the National Academy of Sciences, vol. 116, no. 32, 24 July 2019, pp. 15849–15854, arxiv.org/pdf/1812.11118.pdf, https://doi.org/10.1073/pnas.1903070116. Accessed 2 Mar. 2020. [Google Scholar] [Crossref]
3. Burgess, Nicholas. “An Introduction to Algorithmic Trading: Opportunities & Challenges within the Systematic Trading Industry.” SSRN Electronic Journal, 2019, https://doi.org/10.2139/ssrn.3466213. [Google Scholar] [Crossref]
4. Cheng, Wan-Hsiu, et al. “The Impact and Profitability of Day Trading Following the Relaxation of Day Trading Restrictions in Taiwan.” Heliyon, vol. 9, no. 4, Apr. 2023, p. e14939, https://doi.org/10.1016/j.heliyon.2023.e14939. [Google Scholar] [Crossref]
5. Dash, Rajashree, and Pradipta Kishore Dash. “A Hybrid Stock Trading Framework Integrating Technical Analysis with Machine Learning Techniques.” The Journal of Finance and Data Science, vol. 2, no. 1, Mar. 2016, pp. 42–57, https://doi.org/10.1016/j.jfds.2016.03.002. Accessed 3 Mar. 2019. [Google Scholar] [Crossref]
6. Doering, Jana, et al. “Metaheuristics for Rich Portfolio Optimisation and Risk Management: Current State and Future Trends.” Operations Research Perspectives, vol. 6, 2019, p. 100121, https://doi.org/10.1016/j.orp.2019.100121. Accessed 18 Feb. 2021. [Google Scholar] [Crossref]
7. Ferreira, Fernando G. D. C., et al. “Artificial Intelligence Applied to Stock Market Trading: A Review.” IEEE Access, vol. 9, no. 2169-3536, 9 Feb. 2021, pp. 30898–30917, ieeexplore.ieee.org/abstract/document/9350582, https://doi.org/10.1109/access.2021.3058133. [Google Scholar] [Crossref]
8. Han, Yechan, et al. “A Machine Learning Trading System for the Stock Market Based on N-Period Min-Max Labeling Using XGBoost.” Expert Systems with Applications, vol. 211, Jan. 2023, p. 118581, https://doi.org/10.1016/j.eswa.2022.118581. Accessed 28 Nov. 2022. [Google Scholar] [Crossref]
9. Kawakatsu, Hiroyuki. “Direct Multiperiod Forecasting for Algorithmic Trading.” Journal of Forecasting, vol. 37, no. 1, 15 Sept. 2017, pp. 83–101, https://doi.org/10.1002/for.2488. [Google Scholar] [Crossref]
10. Lahmiri, Salim, and Stelios Bekiros. “Intelligent Forecasting with Machine Learning Trading Systems in Chaotic Intraday Bitcoin Market.” Chaos, Solitons & Fractals, vol. 133, Apr. 2020, p. 109641, https://doi.org/10.1016/j.chaos.2020.109641. Accessed 17 Feb. 2020. [Google Scholar] [Crossref]
11. Serban, Florentin, et al. “Portfolio Optimization and Building of Its Efficient Frontier.” Econ Comput Econ Cybern Stud Res, vol. 2, 1 Jan. 2011, pp. 125–137. [Google Scholar] [Crossref]
12. Şerban, Florentin, et al. “Portfolio Optimization Using Interval Analysis.” Economic Computation and Economic Cybernetics Studies and Research, ASE Publishing, vol. 48, 1 Mar. 2015, pp. 125–137. [Google Scholar] [Crossref]
13. Şerban, Florentin, et al. “The Relationship Profitability-Risk for an Optimal Portfolio Building with Two Risky Assets and a Risk-Free Asset.” International Journal of Applied Mathematics and Informatics, vol. 5, 2011, pp. 299–306. [Google Scholar] [Crossref]
Metrics
Views & Downloads
Similar Articles
- Examining Fatal Motorcycle Crashes in Malaysia: Rider Age, Road Attributes and Collision Partner Dynamics
- Resources-Blessed but Energy-Poor: A Critical Review of the Paradox of Energy Delivery in Nigeria
- Improving the Hybrid FSO/LI-FI/UWOC Network's
- Constructive Strategies for Enhancing Public Engagement in County Governance: A Focus on Nandi, Kenya, 2024.
- The Impact of Short-Term Debt on the Performance of Manufacturing Companies Listed on the Ghana Stock Exchange