Optimization of MACD Indicator Parameters on the Movement of the Indonesia Sharia Stock Index (ISSI): A Technical Approach Based on Historical Data - Nanda, Teuku Syifa Fadrizha; Fitria, Ana (Jihbiz: Global Journal of Islamic Banking and Finance, 2025)
The Indonesia Sharia Stock Index (ISSI) has shown steady growth, reflecting rising interest in Sharia-compliant investments. However, technical tools like MACD are still underutilized. This study aims to identify the optimal MACD parameter configuration (i.e., the combination of N1, N2, N3) for ISSI movements in order to generate the highest return with measurable risk. A quantitative-exploratory approach was applied using daily closing data of ISSI from 2013 to 2023. A total of 1,152 MACD parameter combinations were systematically tested using Python simulations and subsequently validated through backtesting with Pine Script on the TradingView platform. The performance of each configuration was evaluated based on cumulative return and Sharpe ratio. The findings show that the MACD configuration of (5, 21, 8) produced a cumulative return of 234% over the ten-year period, significantly outperforming the standard configuration, which yielded only 152%. Moreover, the optimal setup achieved a Sharpe ratio of 1.75, indicating superior investment performance in terms of risk-adjusted returns. Interestingly, most of the top-performing MACD configurations consisted of odd numbers. This may be associated with the five-day weekly trading cycle, in which odd-numbered periods such as 5, 7, or 9 days tend to be more responsive to short-term trend shifts. This pattern appears to align with the psychological rhythm of the relatively stable and orderly Sharia market. The study concludes that adjusting MACD parameters to suit specific market characteristics can significantly enhance the effectiveness of technical analysis and investment strategies.