Next Article in Journal
Twitter Economic Uncertainty and Herding Behavior in ESG Markets
Previous Article in Journal
Evaluating Board Characteristics’ Influence on the Readability of Annual Reports: Insights from the Egyptian Banking Sector
Previous Article in Special Issue
Daily and Weekly Geometric Brownian Motion Stock Index Forecasts
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Algorithm-Based Low-Frequency Trading Using a Stochastic Oscillator, Williams%R, and Trading Volume for the S&P 500

1
Seoul Business School, aSSIST University, Seoul 03767, Republic of Korea
2
Department of Business Economics, Health, and Social Care, The University of Applied Sciences and Arts of Southern Switzerland, 6928 Manno, Switzerland
*
Author to whom correspondence should be addressed.
J. Risk Financial Manag. 2024, 17(11), 501; https://doi.org/10.3390/jrfm17110501
Submission received: 7 October 2024 / Revised: 4 November 2024 / Accepted: 4 November 2024 / Published: 7 November 2024
(This article belongs to the Special Issue Forecasting and Time Series Analysis)

Abstract

:
Recent research in algorithmic trading has primarily focused on ultra-high-frequency strategies and index estimation. In response to the need for a low-frequency, real-world trading model, we developed an enhanced algorithm that builds on existing models with high hit ratios and low maximum drawdowns. We utilized established price indicators, including the stochastic oscillator and Williams %R, while introducing a volume factor to improve the model’s robustness and performance. The refined algorithm achieved superior returns while maintaining its high hit ratio and low maximum drawdown. Specifically, we leveraged 2X and 3X signals, incorporating volume data, the 52-week average, standard deviation, and other variables. The dataset comprised SPY ETF price and volume data spanning from 2010 to 2023, over 13 years. Our enhanced algorithmic model outperformed both the benchmark and previous iterations, achieving a hit rate of over 90%, a maximum drawdown of less than 1%, an average of 1.5 trades per year, a total return of 519.3%, and an annualized return (AnnR) of 15.1%. This analysis demonstrates that the model’s simplicity, ease of use, and interpretability provide valuable tools for investors, although it is important to note that past performance does not guarantee future returns.

1. Introduction

1.1. Volatility and Market Timing Challenges in Stock Markets

Identifying the bottom of the stock market can significantly enhance the likelihood of investment success. Recently, stock markets, gold prices, and cryptocurrency valuations have surged atypically, with rising stock prices accompanied by heightened volatility, pushing investors to their limits. Several factors contribute to this increased volatility, including geopolitical risks in Ukraine, the Middle East, and other regions, political uncertainty such as changes in US presidential candidates and the emergence of radical political leaders, and concerns about a potential recession. Furthermore, the historically strong correlation between bonds and stocks has weakened, complicating asset allocation through traditional portfolio strategies. These dynamics have resulted in declines exceeding 10% in major global indices within two to three days, leading investors to face the critical challenge of determining whether the market has reached a bottom or remains in an oversold condition. The primary research problem addressed in this study is whether incorporating volume-based stochastic indicators, such as the Williams %R and stochastic oscillator, enhances the accuracy of identifying oversold conditions and improves the effectiveness of market timing strategies.
During market downturns, many investors panic, uncertain whether the decline will persist or if a reversal is imminent. Accurately assessing when and to what extent the stock market is oversold can significantly aid investors in portfolio construction and decision making, mainly when the assessment method is intuitive and easy for investors to apply. To achieve this, estimating the exponent related to market movements is essential. Various studies have examined the directionality of market indices, yet investors seek to go beyond merely understanding the index’s direction to identify precise trading points. The estimation of the US S&P 500 index has utilized various methodologies, including econometric models such as ARIMA (Tsay 2010), machine learning techniques like LSTM networks (Fischer and Krauss 2018), and hybrid models that integrate macroeconomic variables with technical indicators (Chen et al. 2016), thereby enhancing predictive accuracy and robustness. However, investors desire to understand the index’s direction and identify optimal market timing for trading.

1.2. Stochastic Models, High-Frequency Trading, and Volume-Based Strategies

Recent studies have advanced the understanding of market timing strategies in stock markets, emphasizing their potential to enhance portfolio returns (Davis 2023; Kim et al. 2023; Lopez and Wang 2023; Zhang et al. 2022; Hendershott and Riordan 2011; Barberis 2000; Henriksson and Merton 1981). These studies have explored the efficacy of timing models based on macroeconomic indicators and technical analysis. Findings from this body of research underscore the strategic value of precise market entry and exit points. This paper builds on these insights by evaluating the performance of market timing strategies across diverse market conditions. However, economic indicators used to gauge trade timing are limited due to their lagging nature relative to the stock market. Similarly, technical analysis is constrained by historical patterns that do not always predict future outcomes, highlighting the importance of stochastic methods.
Stochastic models have become essential in stock market forecasting, offering insights into price movements through probabilistic frameworks. Scholars have emphasized the effectiveness of stochastic differential equations and stochastic volatility models in capturing market dynamics, enhancing predictive accuracy, and improving risk management (Bekierman and Gribisch 2021; Focardi et al. 2021; Hassan et al. 2020; Andersen et al. 1999). Once the direction of the index has been estimated and the optimal trading points have been identified, the next step involves determining the appropriate trading strategy. Due to technological advancements and increasing market capitalization, high-frequency trading (HFT) remains a focal point of research.
Scholars have investigated HFT’s effects on liquidity, price discovery, and market volatility, emphasizing its dual role in enhancing efficiency while potentially exacerbating systemic risk (Liu et al. 2022; Chordia et al. 2021; Budish et al. 2020; Benos et al. 2019; Bershova and Rakhlin 2013). Despite extensive research on high-frequency trading, its application remains accessible to only a limited group of investors. This exclusivity arises from the substantial requirements associated with HFT, including access to vast amounts of information, robust computing infrastructure, advanced networks, and significant capital investment, alongside higher transaction costs due to the increased number of trades. These factors render HFT impractical for smaller institutional and retail investors. Consequently, there is a pressing need for research focused on low-frequency trading strategies.
In the stock market, the only observable factors at the time of trade are price and volume, which is why volume has been the focus of recent studies. Recent research increasingly acknowledges the importance of trading volume in predicting stock market indices (Johnson and Lee 2023; Patel et al. 2023; Smith 2022). These studies have demonstrated that integrating trading volume with traditional price-based indicators significantly improves the accuracy of market index forecasts. This research highlights the crucial role of trading volume in understanding market dynamics and refining predictive models. This paper seeks to build upon this body of research by examining the predictive power of trading volume across various market indices and conditions. While existing studies have significantly contributed to index estimation, there is a noticeable gap in research focusing on trading strategies that employ actual stock market instruments. Given the variety of trading approaches, such as leverage and inverse investing, there is potential to enhance returns by exploring these methods.
Despite the extensive research on stock market indices and individual stocks, there remains a notable gap in studies focused on investable instruments traded within the stock market. Research grounded in such instruments is essential for providing actionable insights into real-world capital markets and investment strategies. While numerous studies have analyzed stock market indices and individual stocks using stochastic indicators, few have incorporated additional indicators to address their inherent limitations. In this study, we extend the work of Paik et al. (2024) by incorporating the William %R indicator to improve the assessment of oversold conditions. Previous research has primarily focused on tracking price movements, but to estimate the depth and breadth of oversold conditions more accurately, it is crucial to consider additional factors. In the stock market, two critical observable metrics are price and volume. Numerous studies have demonstrated that trading volume is instrumental in estimating market indices. Therefore, we have incorporated volume as an additional factor in our analysis to enhance the robustness of our findings.
Most research in trading has concentrated on high-frequency trading, a trend driven by the increasing presence of institutional investors and the expansion of market capitalization. This focus stems from the demands of more frequent trading, which requires substantial computing power, advanced network infrastructure, and significant capital. However, high-frequency and ultra-high-frequency trading present considerable challenges for retail investors, pension funds, and smaller institutions. Consequently, there is a pressing need to develop low-frequency trading strategies tailored to these investors. While many studies have introduced investment performance indicators grounded in portfolio theory, these approaches may be less effective when the available capital is relatively small. In such cases, alternative measures, such as hit ratio, ANNR, and PARC, become more relevant and warrant further exploration.
This study seeks to bridge the gap between the extensive body of literature and practical, applicable research in the field. By synthesizing and building upon the findings of existing studies, this research aims to generate positive outcomes that contribute meaningfully to the academic community. Additionally, it holds the potential to enhance capital market efficiency by equipping investors with essential investment information. The proposed model is designed for ease of application and is versatile enough to benefit institutional investors and smaller investors with limited access to information.
This study builds on the findings of prior research, which demonstrated promising outcomes by incorporating a volume factor to assess the level of oversold conditions. To evaluate an index’s oversold and overbought levels, we utilized the stochastic oscillator, William %R, and trading volume. The parameters for each indicator were determined through grid searching. The SPY ETF, which tracks the S&P 500 and has the highest trading volume, was used as a benchmark instead of a traditional index for practical application. The analysis employed weekly data, including open, high, low, and close prices and volume, from 2010 to 2023. Data were collected from publicly available sources. The expected outcome of this study is to accurately gauge the level and depth of oversold conditions, thereby aiding in investment diversification, improving returns, and reducing risk.
Section 2 of this paper outlines the materials and methods used, including the theoretical background, the framework of our algorithm, and the performance measurement criteria. Section 3 presents the trading results generated by our algorithm, compared with those from previous research. Section 4 provides a comprehensive evaluation and analysis of the test results from our ETF simulation trading on the US stock market. Section 5 concludes with a summary of our findings and their implications for the stock market. The study successfully achieves its objectives, demonstrating low-frequency trading with reduced maximum drawdown and robust positive trading results. Consequently, this research contributes to advancing market timing strategies for individual investors and those engaged in low-frequency trading.

2. Materials and Methods

2.1. Basics

Recent studies highlight that a fundamental principle of investment is the strategy of buying low and selling high (López Rodríguez and López 2022; Han et al. 2021; Market Realist 2021; Bustos and Pomares-Quimbaya 2020; Sezer et al. 2017; Penman 2013). Two main analytical approaches are typically used to navigate the stock market: fundamental analysis and technical analysis. Fundamental analysis entails a detailed evaluation of a company’s intrinsic value by analyzing financial statements, market conditions, and economic factors to forecast future performance. Techniques such as discounted cash flow (DCF) and earnings before interest, taxes, depreciation, and amortization (EBITDA) are common in this approach (Damodaran 2012). On the other hand, technical analysis focuses on historical price patterns and market trends to generate buy and sell signals, offering a complementary perspective to fundamental analysis (Murphy 1999). Recent advancements in algorithmic trading have integrated elements from both approaches, improving decision making and strategy execution in dynamic market environments (Tsay 2019).

2.2. Research Overview

The study utilizes the SPY ETF, which tracks the S&P 500 index, as the primary tracking target. Benchmarks are widely used due to their representativeness and the convenience of accessing index data, but they may sometimes lead to discrepancies when compared to actual investment outcomes. Research has shown that benchmarks may misrepresent proper investment strategy performance. For example, Cremers et al. (2012) argue that benchmarks often fail to capture the effects of active management, which can lead to underperformance in real-world scenarios. Similarly, Dichev (2007) demonstrates that investor returns frequently lag behind benchmark returns due to the timing of cash flows. Finally, Elton et al. (2001) underscore the risks of selecting inappropriate benchmarks, which can distort investment performance assessments. To apply results to actual trading, we used the ETF that replicates the index and holds the highest tradability and market share.
The buy/sell timing analysis employs a modified algorithm that has shown high performance (Paik et al. 2024). This algorithm incorporates signals from the stochastic oscillator and Williams %R, optimized through grid search techniques. Modifications from previous studies include adding a trading volume factor and implementing a leveraged investment strategy, comparing standard deviation and absolute value (Davis 2023; Kim et al. 2023; Lopez and Wang 2023; Zhang et al. 2022). We used metrics such as HITR, ARM, PARC, ANNR, and total return to evaluate the enhanced algorithm’s performance, comparing it to the traditional model and the S&P 500 Index.

2.3. Survey Sample

The sample consists of the weekly prices of the SPY ETF, which tracks the S&P 500 index, including opening, high, low, and closing prices. The period spans from January 2010 to December 2023, encompassing a total of 196 weeks of data. This period is appropriate for the study as it encompasses diverse market conditions. The market can be classified into four primary states: (1) a shock scenario (e.g., COVID-19, war), (2) an uptrend market, indicative of economic expansion, (3) a downtrend market, reflective of economic contraction, and (4) a sidestep market trend. All these conditions are represented within the sample period. Given its recent nature, this timeframe is well-suited for testing our algorithm.
We sourced the data from Yahoo Finance, which we verified as comparable to Bloomberg data (https://finance.yahoo.com, accessed on 4 June 2024). Although Bloomberg Terminal Data (Bloomberg 2024, https://www.bloomberg.com/quote/SPX:IND, accessed on 4 June 2024). offers comprehensive financial data, access to it requires a subscription. Therefore, we opted to use Yahoo Finance data to ensure accessibility for other researchers.

2.4. Measurement Tools

The primary performance metric used in this study is the stock market index chart, which compares the algorithmic model with the actual investment performance over the given period. A key metric employed is the Sharpe ratio (Sharpe 1994), which enables the comparison of various investment portfolios by considering both returns and volatility. The Sortino ratio (Rollinger and Hoffman 2013) is also utilized to distinguish between upside and downside volatility, unlike the Sharpe ratio, which primarily assesses returns falling below the expected threshold. Another important metric is the Treynor ratio (Van Dyk et al. 2014; Treynor and Mazuy 1966), which measures excess returns relative to an investment with no diversifiable risk. Finally, Jensen’s alpha (Jensen 1968) calculates abnormal returns compared to the theoretically expected returns.
S a = E R a R b σ a = E R a R b v a r [ R a R b ]
R a = asset return.
R b = risk-free return.
E[ R a R b ] = expected value.
σ a = standard deviation.
These sophisticated performance metrics are widely employed by mutual funds and institutional investors to meet benchmark objectives. However, such measures can be insufficient for low-frequency trading, especially in scenarios involving small investors and longer investment horizons. In these cases, the hit ratio (HITR) defined by Leung et al. (2000), which measures the ratio of successful trades to unsuccessful ones, becomes highly relevant. Small investors often face challenges in managing high market volatility and benefit from tracking the hit ratio. In contrast, institutional investors may implement strategies that tolerate lower hit ratios while aiming for higher overall returns, or they may exploit high-frequency trading to capitalize on short-term volatility (Barber and Stein 2000; Lo et al. 2000; Jegadeesh and Titman 1993; Carhart 1997).
HITR = N s N s + N f   ×   100
N s = number of successful trades.
N f = number of failed trades.
In the context of time-based investing, trading is subject to drawdown within an investment period. Consequently, we considered the maximum drawdown percentage over the total period (Topiwala 2023). Additionally, we focused on two specific measurement tools: the annual return (AnnR) to represent returns and the maximum drawdown (MaxD) to represent losses. Utilizing these metrics, we applied the ARM ratio, which is defined as AnnR/MaxD (ARMR), also known as the RoMaD (Chen 2020). Furthermore, we introduced Co-MaxD (1 − MaxD) and PARC, defined as AnnR × (1 − MaxD), as efficient and straightforward performance measurements (Topiwala 2023). These two metrics have proven effective in generating reliable results and have demonstrated superiority over the Sharpe ratio (Topiwala and Dai 2022).
ARM ratio = AnnR/MaxD
PARC = AnnR × (1 − MaxD)
From the perspective of low-frequency trading and long-term investment, the primary objectives are to maximize total return, annualized return, and hit ratio while minimizing maximum drawdown over the investment period. Furthermore, optimizing the ARM ratio and PARC enhances overall investment performance.
Total return is a comprehensive measure of an investment’s performance, encompassing capital appreciation and income generated over a specific period. Total return provides a holistic view of an investment’s profitability by accounting for dividends, interest, and other income sources alongside changes in asset prices (Fama and French 1992). This measure is critical in evaluating the overall effectiveness of investment strategies and comparing different investment vehicles and portfolios (Elton and Gruber 1997). Furthermore, total return is essential for long-term investment analysis, as it reflects the compounded effects of reinvestment and capital growth, offering a more accurate representation of an investment’s proper performance over time (Campbell and Shiller 1988).
Total return represents the cumulative return over the entire investment horizon. This study compared the total return across the new algorithmic model, the old algorithmic model, and the benchmark S&P 500 index. The evaluation period for calculating the total return spans from 1 January 2010 to 31 December 2023, corresponding to the sample period.
R = V f V i V i
R = return.
V f = final price.
V i = initial price.
Annualized return (AnnR), a key performance indicator in investment analysis, represents the geometric average of an investment’s earnings over one year, accounting for compounding effects. The annualized return provides a standardized measure, enabling comparisons across different investment horizons and asset classes (Bodie et al. 2014). This metric is particularly valuable for assessing the long-term performance of investments by smoothing out short-term volatility and fluctuations. Annualized returns in portfolio management, according to Elton and Gruber (1997), offer a consistent basis for evaluating the efficacy of various investment strategies over time. Furthermore, the use of annualized return in risk-adjusted performance metrics, such as the Sharpe ratio (1994), facilitates a comprehensive evaluation of an investment’s risk–return profile.
  Annualized   return   ( AnnR ) = ( 1 + R ) ( 1 N ) 1
R = return.
N = number of periods measured.

2.5. Analysis Methods

The stochastic oscillator is a recognized technical indicator in stock market trading, introduced by Lane (1985). It functions as a momentum indicator, utilizing support and resistance levels to measure the current price’s position relative to its price range over a specified period (Markus and Weerasinghe 1988). The primary purpose of the stochastic oscillator is to predict price turning points by comparing the closing price to the overall price range (Kirkpatrick and Dahlquist 2010). We derived the equation for the stochastic oscillator and initially set the parameters for %K. Using our weekly data, we tested various values for n ranging from one to fifty-two, ultimately finding that ten was the most appropriate. For %D, the same range was tested, with six emerging as the optimal value for n. The stochastic oscillator produces values between 0 and 100, where lower values indicate a lower stock price, and higher values indicate a higher stock price. We employed a grid search methodology, adjusting parameters in increments of five units. Consequently, we utilized a ten-week period for %K and a six-week period for %D. In this model, indicator values above 80 suggest a sell point, while values below 30 indicate a buy point.
% K = P r i c e L o w n H i g h n L o w n × 100
% D = % K 1 + % K 2 + + % K n n
Price = the last closing price.
L o w n = the lowest price in the last n periods.
H i g h n = the highest price in the last n periods.
%D = the n − period simple moving average of %K.
%D-Slow = the n − period simple moving average of %D.
The Williams %R is a prominent technical indicator for identifying overbought and oversold conditions in the market, which may suggest potential reversal points (Fu et al. 2018; Williams 2011). This oscillator was selected based on testing of various oscillators due to its effectiveness in filtering noise signals (Murphy 1999). Similar to the stochastic oscillator, the Williams %R evaluates the current market price relative to its price range over a specified period (Achelis 2001). We tested various values for the Williams %R oscillator for n, ranging from one to fifty-two, using weekly data. We identified ten as the optimal value for both the L o w n and H i g h n parameters. The Williams %R indicator, which ranges from −100 to 0, reflects stock price levels, with lower values indicating a lower stock price and higher values indicating a higher stock price. Specifically, values between −100 and −75 denote the oversold range, while values between −20 and 0 indicate the overbought range.
Williams % R = P r i c e H i g h n H i g h n L o w n × 100
Price = the last closing price.
L o w n = the lowest price in the last n periods.
H i g h n = the highest price in the last n periods.
Instances arise when the stochastic oscillator or Williams %R produces false signals, often referred to as noise. For example, this occurs when sequential sell signals are generated without a prior buy signal. The application of the stochastic oscillator in stock market prediction has been thoroughly examined in academic research (Mariani and Tweneboah 2022; Davies 2021; Neely 2010; Bartolozzi et al. 2005). By combining the stochastic oscillator with Williams %R, it is possible to filter out noise and improve the accuracy of buy and sell signals, thereby enhancing the overall reliability of the trading strategy. In our analysis, we evaluated a variety of technical oscillators, including Williams %R, Bollinger Bands, MACD, moving averages (MAs), envelope, RSI, and pivot points. The findings indicate that Williams %R, when used alongside the stochastic oscillator, effectively reduces noise and improves the hit ratio, thereby increasing the reliability of trading signals (Murphy 1999; Pring 2002; Achelis 2001; Kirkpatrick and Dahlquist 2010). The combined technical signal, called DeepSignal, effectively minimizes false signals (noise) and produces advantageous results. The stochastic oscillator ranges from 0 to 100, while the Williams %R ranges from −100 to 0. We tested all five modified parameters to identify the optimal settings.
Trading volume plays a critical role in the price discovery process. High volumes often indicate a consensus among investors about the value of a stock, leading to more accurate pricing. Conversely, low volumes can result in higher volatility and less reliable price signals. This is because trading volume provides valuable information about future price movements and market volatility (Karpoff 1987). The study demonstrates a positive correlation between trading volume and the magnitude of price changes, emphasizing the role of volume in the price discovery mechanism. Additionally, liquidity is a crucial factor in asset pricing, and securities with higher trading volumes tend to have lower transaction costs, contributing to overall market efficiency (Amihud and Mendelson 1986). Trading volume is a critical market sentiment indicator (Baker and Stein 2004). The findings suggest that during a high trading volume period, markets are more likely to be dominated by overconfident traders, leading to trends that more informed investors can exploit.
Auto-regressive integrated moving average (ARIMA) modeling has become a cornerstone in time series analysis, particularly in stock market forecasting. Over the past five years, numerous studies have demonstrated the efficacy of ARIMA in capturing the underlying trends and patterns of financial time series data, enabling more accurate predictions. For instance, ARIMA models have been shown to effectively predict stock price movements by incorporating both autoregressive and moving average components while handling non-stationarity through differencing (Wang et al. 2021). Similarly, ARIMA has been applied to model volatility in emerging market indices, demonstrating its capability to outperform more complex machine learning models in specific financial contexts (Singh and Sharma 2020). These studies underscore the model’s robustness in analyzing stock market behavior, mainly when data exhibit a linear pattern. We employed the ARIMA model with a training period from 2010 to 2020 and a testing period from 2021 to 2023.
y t = c + ϕ 1 y t 1 + ϕ 2 y t 2 , , + ϕ P y t p + θ 1 ϵ t 1 + θ 2 ϵ t 2 + + θ q ϵ t q + ϵ t
c = a constant.
ϕ 1 ,   ϕ 2 ,   ,   ϕ p = the parameters for the autoregressive (AR) terms.
y t 1 ,   y t 2 , , y t p = the lagged values of the time series (i.e., previous values).
θ 1 ,   θ 2 , , θ q = the parameters for the moving average (MA) terms.
ϵ t = the error term (white noise) at time t.
ϵ t 1 ,   ϵ t 2 , , ϵ t q = the lagged values of the error terms.
p = the order of the autoregressive (AR) terms.
d = the degree of differencing (to make the series stationary).
q = the order of the moving average (MA) terms.
Grid search is a widely recognized and practical approach in stock market forecasting and financial modeling, playing a pivotal role in enhancing machine learning model performance by systematically tuning hyperparameters. Recent studies highlight its value in improving prediction accuracy and model efficiency. For instance, grid search was used to optimize a support vector machine (SVM) for stock price prediction, yielding better results than standard configurations (Liu et al. 2014). Additionally, it was employed to fine-tune long short-term memory (LSTM) networks for financial time series forecasting, leading to substantial improvements in predictive accuracy (Sher et al. 2023). In another study, grid search was applied to random forests for optimizing parameters in volatility forecasting, proving its effectiveness in this domain as well (Chen et al. 2020). Furthermore, an ensemble learning framework that integrated grid search demonstrated increased robustness and reliability in stock market predictions (Verma et al. 2023). These findings underscore the critical role of grid search in enhancing model performance in stock-related applications.
Grid search is a systematic hyperparameter optimization technique used to identify the optimal set of hyperparameters by evaluating all possible combinations from a predefined grid of values. This method is particularly useful in machine learning models to enhance performance by fine-tuning model parameters. The goal is to identify the best combination g * that maximizes a scoring function S g , typically evaluated through cross-validation. This process selects the most suitable hyperparameters, improving model accuracy and robustness (Bergstra and Bengio 2012; Hsu et al. 2003). We optimized the parameters through grid searching.
N = D 1 × D 2 × × D n
g * = a r g   m a x   g N S g
N = the total number of combinations.
D 1 × D 2 × × D n = the number of values for each parameter.
g * = the best parameter.
S ( g ) = the performance metric.
The algorithm’s trading rules were established as follows (Figure 1): 1. Buy when the stochastic oscillator is below 30 and the Williams %R is below −75; 2. Sell when the stochastic oscillator is above 80, and the Williams %R is above −20; and 3. Remain in cash under all other conditions (Paik et al. 2024).
The existing algorithm was followed, with additional conditions imposed on oversold buy points: (a) If the average volume for the week exceeds the 52-week moving average volume by 20% or exceeds 1 standard deviation (1std), a 2×leverage trade is executed; (b) If both conditions—the average volume and the 1std—are met, a 3× leverage trade is executed; (c) If neither condition is met, a standard trade is performed.
s t a n d a r d   t r a d i n g   c o n d i t i o n = ( v 1 w v 52 w   σ 52 w )   a n d   ( 0.2 v 1 w v 52 w v 52 w 0.2 )
V 1 w = one-week average trading volume.
V 52 w = fifty-two weeks’ average trading volume.
σ 52 w = standard deviation of fifty-two weeks’ average trading volume
Our study utilized a fixed rule-based trading model (Topiwala 2023), which provides a straightforward approach applicable to various types of investors and the degrees of freedom tested. While the previous research employed a moving average within the algorithm, we used different oscillators. Our findings demonstrate that the stochastic and Williams %R oscillators produced superior results compared to the original indices by filtering out noise signals, reducing trading frequency, and lowering maximum drawdown (Paik et al. 2024). We incorporated a volume factor into the existing algorithmic trading model. Specifically, upon receiving a buy signal from two oscillators, a leveraged buy is initiated if the trading volume deviates by more than 20% from the 52-week average or exceeds one standard deviation from the 52-week average. This modification has led to additional return improvements, enhancing the performance of the existing algorithmic model.
We implemented a loss-cut rule within our investment strategy to mitigate potential future losses. This rule was designed to limit downside risk and protect the portfolio from significant drawdowns. The loss-cut rule, a critical risk management strategy, involves setting a predetermined threshold at which an investment is sold to prevent further losses. Investors have a behavioral tendency to hold onto losing positions due to loss aversion (Kahneman and Tversky 1979). By implementing a loss-cut rule, investors can mitigate emotional biases and protect their portfolios from significant downturns (Shleifer and Vishny 1997). Both institutional and individual investors generally implement loss-cut rules that align with their specific investment objectives and the types of funds they manage. During our testing period, the S&P 500 experienced a maximum weekly drawdown of −15.1%. We applied a weekly loss-cut rule of −10% to ensure investments remained within more conservative loss thresholds.
The methodology applied in this study, which incorporates volume-based stochastic indicators alongside the Williams %R and stochastic oscillator, offers notable advantages, such as improved signal reliability and the potential for higher returns through leverage. By incorporating trading volume, the model enhances noise reduction and more accurately identifies oversold and overbought conditions, making it accessible for retail investors. However, the approach also has limitations. Dependence on volume data can result in decreased accuracy during periods of low trading activity, and the fixed rule-based strategy lacks the flexibility to adapt to sudden market changes. Alternatively, ARIMA models are effective in capturing linear trends in financial forecasting but may struggle with non-linear and stochastic conditions, where stochastic models are more suitable. Ultimately, choosing between these methods depends on the specific market context and the need to balance simplicity with adaptability.

3. Results

The developed algorithmic model has demonstrated superior performance to the benchmark algorithmic model. Our adjustments increased the maximum return while maintaining the hit ratio, number of trades, and maximum drawdown levels. Originally designed to assess relative price positioning, the model was enhanced by incorporating a volume component. This improvement facilitated a more nuanced differentiation between standard, 2x leveraged, and 3x leveraged trades, particularly in identifying deep market discounts. These changes positively influenced various performance metrics, including total return, annualized return (AnnR), ARM ratio, and PARC, with no significant changes observed in the hit ratio (HITR) and maximum drawdown (MaxD).
The study spanned from January 2010 to December 2023 and focused on the S&P 500 index, selecting the SPY ETF for analysis due to its significant trading volume and large assets under management. Using open, high, low, and close prices, the stochastic oscillator and Williams %R were incorporated to trigger buy and sell signals. A buy signal was initiated when the stochastic oscillator fell below 30 and the Williams %R dipped below −75. Conversely, a sell signal was generated when the stochastic oscillator surpassed 80 and the Williams %R exceeded −20 (as depicted in Figure 2 and Figure 3). These indicators were consistent with those used in the original algorithmic model (Paik et al. 2024).
Ten trading signals were identified from January 2010 to December 2023, as shown below in Figure 4. Buying signals coincided with significant events in the stock market landscape, such as the Southern European crisis, US interest rate adjustments, US–China geopolitical tensions, the COVID-19 pandemic, and the recent market correction prompted by rising interest rates. This observation underscores the efficacy of algorithmic trading models in capturing opportune moments in the market.
A distinguishing feature of this study is the incorporation of trading volume into algorithmic trading methodologies, which sets it apart from prior research. Examination of periods marked by market downturns and significant events reveals notable spikes in trading volume, as shown in Figure 5 below.
The analysis incorporated SPY’s trading volume to determine the 52-week moving average and the 52-week volume with one standard deviation. Trades utilizing 2x leverage were executed when SPY’s volume exceeded 20% of the absolute value of the current 52-week moving average volume at the time of the buy signal or when the sum of the 52-week moving average volume and one standard deviation volume equaled or exceeded the current 52-week moving average volume for that week, as below in Figure 6 and Figure 7. Concurrent satisfaction of both conditions prompted the execution of trades leveraged at three times the standard.
During the 13-year study period, a total of 10 ETF trades were executed, resulting in 9 successes and 1 failure. The hit ratio (HITR) achieved an impressive win rate of 90%.
According to conventional algorithmic model benchmarks, HITR reached 90%, while the maximum drawdown (MaxD) was minimal at −0.1%, indicating strong performance. This signifies that out of the 10 ETF trades conducted, only 1 trade resulted in a loss, with a maximum drawdown of −0.1%. The maximum gain observed was 28.7%, yielding a total return of 139.9%. The annualized return (AnnR) stood at 7.0%, the annualized return on maximum drawdown (ARM) ratio was 70.0%, and the positive absolute return coefficient (PARC) was 0.07%.
For the SPY ETF, which mirrors the S&P 500 index, the weekly maximum drawdown (MaxD) stood at −15.1%, while the maximum gain achieved was 12.1%. Over the tracking period, the total return amounted to 375.0%, with an annualized return (AnnR) of 11.6%. The annualized return on maximum drawdown (ARM) ratio was 0.768%, and the positive absolute return coefficient (PARC) was 0.098%.
The enhanced algorithmic model, DeepSignal+, exhibited robust performance metrics, boasting a hit ratio (HITR) of 90% and a minimal MaxD of −0.2%. Across all trades, the maximum gain reached 86.0%, resulting in a total return of 519.3%. The AnnR was notably higher at 15.1%, the ARM ratio was 68.0%, and the PARC registered at 0.136%, as below in Table 1.
The enhanced algorithmic trading model demonstrated superior performance across all metrics compared to index-tracking ETFs, encompassing maximum drawdown (MaxD), maximum gain, total return, annualized return (AnnR), annualized return on maximum drawdown (ARM) ratio, and positive absolute return coefficient (PARC). Notable enhancements were observed in maximum gain, total return, AnnR, and ARM ratio when contrasted with the existing algorithmic trading model.
The data were effectively divided into a training period (2010–2020) and a testing period (2021–2023). The ARIMA model was applied to this dataset, and a buy/sell strategy was simulated based on the specified conditions. During the testing period (2021–2023), the strategy yielded positive returns for successful trades.
A residual analysis compared the actual SPY and fitted values from the ARIMA model during the training period (2010–2020). The residuals were randomly scattered around zero with no visible patterns, indicating that the model adequately captures the underlying structure of the data. Furthermore, the Ljung–Box test was employed to check for autocorrelation in the residuals, as shown in Figure 8. A p-value of 0.894, significantly higher than typical significance levels (0.05 or 0.01), suggests no significant autocorrelation in the residuals, supporting the conclusion that the model is a good fit. The forecasting accuracy was evaluated using the mean absolute percentage error (MAPE), approximately 11.08% for the testing period (2021–2023). This relatively moderate error indicates that the model performs reasonably well predicting SPY prices during the test period.
In summary, these findings demonstrate that the ARIMA model is valid, with no substantial issues related to residual autocorrelation, and that its forecasting accuracy is within acceptable limits. Should further refinement or adjustments be required, they can be pursued accordingly.
The previous algorithmic trading model demonstrated a 90% probability of success compared to the SPY ETF. However, this model is relatively inferior to the SPY index regarding final returns, as shown in Figure 9. While it facilitates the identification of deep discounts, this advantage comes at the expense of lower returns than the benchmark index.
Contrarily, DeepSignal+, an enhanced algorithmic trading model, successfully addresses the limitations of the original model. It retains the strengths of its predecessor, particularly its capability to identify low points in price movements. To mitigate the original model’s drawbacks, we incorporated volume factors to ascertain market lows, enabling us to categorize trades into three distinct types: standard trading, 2X leverage trading, and 3X leverage trading. Consequently, we improved the return factor without compromising the hit ratio and MaxD metrics. This enhancement allowed the model to achieve higher returns than the benchmark index, thereby overcoming the original model’s shortcomings, as shown in Figure 10 below.
When comparing the old and new models, the difference in final returns was 378.1% points, with a 57.3% point difference in maximum gain. The annual return (AnnR) more than doubled, increasing from 7.0% with the traditional model to 15.1% with the improved model, as shown in Figure 11 below. Ultimately, the improved model enhanced %returns while maintaining risk and volatility at similar levels. When comparing Table 2 and Table 3, although the number of trades remained constant, the DeepSignal+ model employed a leveraged approach incorporating the volume factor, enabling differentiated returns generation. This suggests that the model’s utilization of leverage, guided by volume dynamics, was a significant factor in achieving varied performance.

4. Discussion

In this study, we expanded upon our previous research (Paik et al. 2024) by incorporating additional factors aimed at enhancing the overall performance of our algorithmic trading model. We introduced a new factor (Johnson and Lee 2023; Patel et al. 2023; Smith 2022; Baker and Stein 2004; Karpoff 1987; Amihud and Mendelson 1986) to optimize performance and ensure accessibility for a wider audience. In the context of the stock market, stock price and volume are the consistent, observable variables on any given trading day. Our enhanced algorithmic trading model leverages trading volume’s average and standard deviation to guide trade decisions. Notably, implementing this new model did not compromise the downside risk metrics, maintaining the robustness of the original strategy.
The enhanced algorithmic trading model demonstrated significant improvements, mainly by including trading volume as an additional factor. By incorporating average trading volume and its standard deviation, the model more effectively identified oversold conditions, ultimately resulting in a higher hit ratio. The use of leveraged trades (2X and 3X) during periods of high trading volume further demonstrated the robustness of the strategy. Moreover, this study shows that retail investors often lack the resources required for high-frequency trading and can achieve comparable returns using a more straightforward, volume-based strategy, making advanced market timing techniques more accessible.
Practically, the enhanced low-frequency algorithmic trading model presented in this study applies to actual trading. Retail investors, infrequent traders, and pension investors will benefit from a long-term investment horizon. A vital advantage of this model is its reliance on freely accessible factors, in contrast to the typical high-frequency trading algorithms, which are often cost-prohibitive. These conventional models usually depend on expensive datasets, making them inaccessible to retail investors, pension funds, and smaller investors. Our model, therefore, holds significance by reducing costs and enhancing accessibility. Academically, this research contributes to the existing literature by demonstrating improved performance and offering valuable insights for future research.
Previous studies have utilized two price indicators to generate buy and sell signals in the market, achieving notable success (Paik et al. 2024). However, this study introduces an additional factor to enhance the effectiveness of these signals. The limitation of this research is predictability; past success does not guarantee future returns and the possibility of finding additional superior stock market factors. Future studies should seek to improve performance by incorporating more easily obtainable factors, extending the analysis period, or testing the model across different asset classes.
A challenge in low-frequency trading is the opportunity cost of holding cash during non-investment periods. To mitigate this issue and hedge against inflation, money market funds (MMFs) can be utilized during these idle periods. From 2010 to 2023, MMF interest rates offered by investment banks ranged between 1% and 5.5%. Including MMF yields during non-investment intervals would likely improve overall returns, though these are not included in the final results for model clarity.
The online stock brokerage fee analysis was based on a USD 0.50 fee per exchange-traded fund (ETF) transaction. Twenty transactions were executed, comprising ten buy and ten sell orders, resulting in a cumulative transaction cost of USD 10. This fee amounted to only 0.1% of the total investment, which began at USD 10,000. Fees were excluded from the results as they have a negligible impact on final performance.

5. Conclusions

This study aimed to refine and expand upon our previously developed low-frequency algorithmic index trading model. Our earlier research utilized the stochastic oscillator and Williams %R to identify price valuation and oversold levels for capturing trading signals. In this extended study, we introduced a volume factor to assess market oversold conditions better, leading to improved outcomes, including enhanced returns, more diversified investment strategies, and reduced risk.
Over the 13 years from 2010 to 2023, our algorithmic model outperformed its benchmark, the S&P 500 index, achieving a total return of +519.3% and an annualized return (AnnR) of +15.1%. These results highlight the effectiveness of incorporating volume as an additional factor in the trading strategy. Leveraging price and volume data improved the model’s performance without significantly increasing downside risk.
This model’s simplicity and ease of application make it accessible and valuable for a wide range of investors, from institutional players to retail investors. It provides a practical means for making informed investment decisions in the financial markets. However, it is essential to note that, as with all investment models, past performance does not guarantee future results, and the model’s effectiveness may vary under different market conditions. During the research period, the model did not fail. However, should the model encounter failure in the future, it is recommended to apply the fixed-percentage loss-cut rule outlined in the Materials and Methods section.
Future research should explore further improvements by incorporating other easily accessible factors, extending the analysis period, or testing the model across different asset classes. Additionally, as mentioned in the Discussion, incorporating money market fund (MMF) yields during non-investment periods could enhance overall returns.
In conclusion, this study demonstrates that incorporating trading volume alongside traditional stochastic indicators significantly enhances the model’s ability to predict market turning points effectively. The improved model outperformed traditional benchmarks by achieving higher overall returns and a notable reduction in maximum drawdown. These findings underscore the potential of volume-based strategies to improve low-frequency trading models, providing a more accessible investment approach for retail and small institutional investors. Future research could extend this model by incorporating sentiment data and expanding the analysis across different asset classes to assess its generalizability and robustness in various market conditions.

Author Contributions

Conceptualization, C.P. and J.C.; methodology, C.P.; software, C.P.; validation, C.P., J.C. and I.U.V.; formal analysis, C.P.; investigation, C.P.; resources, C.P.; data curation, C.P.; writing—original draft preparation, C.P.; writing—review and editing, J.C. and I.U.V.; visualization, C.P.; supervision, J.C. and I.U.V.; project administration, J.C. and I.U.V. All authors have read and agreed to the published version of the manuscript.

Funding

This research is funded by a Seoul Business School, aSSIST University.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Cited paper, finance.yahoo.com (accessed on 4 June 2024), Bloomberg (accessed on 30 December 2023).

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Achelis, Steven B. 2001. Technical Analysis from A to Z. New York: McGraw-Hill. [Google Scholar]
  2. Amihud, Yakov, and Haim Mendelson. 1986. Asset pricing and the bid-ask spread. Journal of Financial Economics 17: 223–49. [Google Scholar] [CrossRef]
  3. Andersen, Torben G., Hyung Jin Chung, and Bent E. Sørensen. 1999. Efficient method of moments estimation of a stochastic volatility model: A Monte Carlo study. Journal of Econometrics 91: 61–87. [Google Scholar] [CrossRef]
  4. Baker, Malcolm, and Jeremy C. Stein. 2000. Trading is hazardous to your wealth: The common stock investment performance of individual investors. Journal of Finance 55: 773–806. [Google Scholar]
  5. Baker, Malcolm, and Jeremy C. Stein. 2004. Market liquidity as a sentiment indicator. Journal of Financial Markets 7: 271–99. [Google Scholar] [CrossRef]
  6. Barberis, Nicholas. 2000. Investing for the long run when returns are predictable. Journal of Finance 55: 225–64. [Google Scholar] [CrossRef]
  7. Bartolozzi, Marco, Derek Bruce Leinweber, and Anthony William Thomas. 2005. Stochastic opinion formation in scale-free networks. Physical Review E 72: 046113. [Google Scholar] [CrossRef]
  8. Bekierman, Jeremias, and Bastian Gribisch. 2021. A mixed frequency stochastic volatility model for intraday stock market returns. Journal of Financial Econometrics 19: 496–530. [Google Scholar] [CrossRef]
  9. Benos, Evangelos, Richard Payne, and Michalis Vasios. 2019. Centralized trading, transparency, and interest rate swap market liquidity: Evidence from the implementation of the Dodd-Frank Act. Journal of Financial Economics 134: 286–306. [Google Scholar] [CrossRef]
  10. Bergstra, James, and Yoshua Bengio. 2012. Random Search for Hyper-Parameter Optimization. Journal of Machine Learning Research 13: 281–305. [Google Scholar]
  11. Bershova, Nataliya, and Dmitry Rakhlin. 2013. High-frequency trading and long-term investors: A view from the buy-side. Journal of Investment Strategies 2: 25–69. [Google Scholar] [CrossRef]
  12. Bloomberg. 2024. Bloomberg.com. Available online: https://www.bloomberg.com/quote/SPX:IND (accessed on 6 June 2024).
  13. Bodie, Zvi, Alex Kane, and Alan J. Marcus. 2014. Investments, 10th ed. New York: McGraw-Hill Education. [Google Scholar]
  14. Budish, Eric, Peter Cramton, and John Shim. 2020. The high-frequency trading arms race: Frequent batch auctions as a market design response. Quarterly Journal of Economics 135: 1547–622. [Google Scholar] [CrossRef]
  15. Bustos, Oscar, and Alexandra Pomares-Quimbaya. 2020. Stock market movement forecast: A systematic review. Expert Systems with Applications 156: 113464. [Google Scholar] [CrossRef]
  16. Campbell, John Y., and Robert J. Shiller. 1988. The dividend-price ratio and expectations of future dividends and discount factors. The Review of Financial Studies 1: 195–228. [Google Scholar] [CrossRef]
  17. Carhart, Mark M. 1997. On persistence in mutual fund performance. Journal of Finance 52: 57–82. [Google Scholar] [CrossRef]
  18. Chen, James. 2020. Return over Maximum Drawdown (RoMaD). Available online: https://www.investopedia.com/terms/r/return-over-maximum-drawdown-romad.asp (accessed on 15 August 2024).
  19. Chen, You-Shyang, Ching-Hsue Cheng, Chiung-Lin Chiu, and Shu-Ting Huang. 2016. A study of ANFIS-based multi-factor time series models for forecasting stock index. Applied Intelligence 45: 277–92. [Google Scholar] [CrossRef]
  20. Chen, Shaozhen, Hui Zhu, Wenxuan Liang, Liang Yuan, and Xianhua Wei. 2020. A Stock Index Prediction Method and Trading Strategy Based on the Combination of Lasso-Grid Search-Random Forest. In BenchCouncil International Federated Intelligent Computing and Block Chain Conferences. Singapore: Springer, pp. 431–48. [Google Scholar]
  21. Chordia, Tarun, T. Clifton Green, and Badrinath Kottimukkalur. 2021. High-frequency trading and market efficiency. Journal of Financial Economics 141: 560–80. [Google Scholar] [CrossRef]
  22. Cremers, Martijn, Antti Petajisto, and Eric Zitzewitz. 2012. Should benchmark indices have alpha? Revisiting performance evaluation. Critical Finance Review 2: 1–48. [Google Scholar] [CrossRef]
  23. Damodaran, Aswath. 2012. Investment Valuation: Tools and Techniques for Determining the Value of Any Asset, 3rd ed. Hoboken: John Wiley and Sons. [Google Scholar]
  24. Davies, Shaun. 2021. Index-Linked Trading and Stock Returns. Paper presented at the Paris December 2021 Finance Meeting EUROFIDAI-ESSEC, Paris, France, December 16. [Google Scholar]
  25. Davis, P. 2023. The Impact of Macroeconomic Indicators on Market Timing Strategies. Journal of Financial Economics 75: 198–220. [Google Scholar]
  26. Dichev, Ilia D. 2007. What Are Stock Investors’ Actual Historical Returns? Evidence from Dollar-Weighted Returns. American Economic Review 97: 386–401. [Google Scholar] [CrossRef]
  27. Elton, Edwin J., and Martin J. Gruber. 1997. Modern portfolio theory, 1950 to date. Journal of Banking & Finance 21: 1743–59. [Google Scholar]
  28. Elton, Edwin J., Martin J. Gruber, and Christopher R. Blake. 2001. A first look at the accuracy of the CRSP mutual fund database and a comparison of the CRSP and Morningstar mutual fund databases. The Journal of Finance 56: 2415–30. [Google Scholar] [CrossRef]
  29. Fama, Eugene F., and Kenneth R. French. 1992. The cross-section of expected stock returns. Journal of Finance 47: 427–65. [Google Scholar]
  30. Fischer, Thomas, and Christopher Krauss. 2018. Deep learning with long short-term memory networks for financial market predictions. European Journal of Operational Research 270: 654–69. [Google Scholar] [CrossRef]
  31. Focardi, Sergio, Frank J. Fabozzi, and Petter N. Kolm. 2021. Stochastic Methods in Financial Markets. Amsterdam: Elsevier. [Google Scholar]
  32. Fu, Xiaoyi, Xinqi Ren, Ole J. Mengshoel, and Xindong Wu. 2018. Stochastic optimization for market return prediction using financial knowledge graph. Paper presented at the 2018 IEEE International Conference on Big Knowledge (ICBK), Singapore, November 17–18; pp. 25–32. [Google Scholar]
  33. Han, Yufeng, Yang Liu, Guofu Zhou, and Yingzi Zhu. 2021. Technical analysis in the stock market: A review. SSRN Electronic Journal 4: 1893–928. [Google Scholar] [CrossRef]
  34. Hassan, Md Rafiul, Baikunth Nath, and Michael Kirley. 2020. A Fusion Model of HMM, ANN and GA for Stock Market Forecasting. Expert Systems with Applications 33: 171–80. [Google Scholar] [CrossRef]
  35. Hendershott, Terrence, and Ryan Riordan. 2011. Algorithmic Trading and Information. Working Paper. Berkeley: University of California. [Google Scholar]
  36. Henriksson, Roy, and Robert Merton. 1981. On Market Timing and Investment Performance. II: Statistical Procedures for Evaluating Forecasting Skills. Working Paper. Cambridge: Sloane School of Management, MIT. [Google Scholar]
  37. Hsu, Chih Wei, Chih Chung Chang, and Chih Jen Lin. 2003. A Practical Guide to Support Vector Classification. Taipei: Department of Computer Science, National Taiwan University. [Google Scholar]
  38. Jegadeesh, Narasimhan, and Sheridan Titman. 1993. Returns to buying winners and selling losers: Implications for stock market efficiency. The Journal of Finance 48: 65–91. [Google Scholar] [CrossRef]
  39. Jensen, Michael C. 1968. The performance of mutual funds in the period 1945–1964. The Journal of Finance 23: 389–416. [Google Scholar]
  40. Johnson, M., and K. Lee. 2023. Volume-Price Dynamics and Index Forecasting. International Review of Financial Studies 58: 89–110. [Google Scholar]
  41. Kahneman, Daniel, and Amos Tversky. 1979. On the interpretation of intuitive probability: A reply to Jonathan Cohen. Cognition 7: 409–11. [Google Scholar] [CrossRef]
  42. Karpoff, Jonathan M. 1987. The relation between price changes and trading volume: A survey. Journal of Financial and Quantitative Analysis 22: 109–26. [Google Scholar] [CrossRef]
  43. Kim, H., J. Park, and S. Lee. 2023. Technical Analysis and Market Timing: An Empirical Study. International Journal of Finance 34: 45–67. [Google Scholar]
  44. Kirkpatrick, Charles D., and Julie R. Dahlquist. 2010. Technical Analysis: The Complete Resource for Financial Market Technicians, 2nd ed. Upper Saddle River: FT Press. [Google Scholar]
  45. Lane, George C. 1985. Lanes stochastics: The ultimate oscillator. Journal of Technical Analysis 21: 37–42. [Google Scholar]
  46. Leung, Mark T., Hazem Daouk, and An-Sing Chen. 2000. Forecasting stock indices: A comparison of classification and level estimation models. International Journal of Forecasting 16: 173–90. [Google Scholar] [CrossRef]
  47. Liu, Chang, Huilin Shan, Zhihao Tian, and Hangyu Cheng. 2022. Research on a quantitative trading strategy based on high-frequency trading. BCP Business & Management 26: 1–9. [Google Scholar] [CrossRef]
  48. Liu, Chao, Shiqun Yin, Miao Zhang, Yi Zeng, and Jiangyue Liu. 2014. An improved grid search algorithm for parameters optimization on SVM. Applied Mechanics and Materials 644: 2216–19. [Google Scholar] [CrossRef]
  49. Lo, Andrew W., Harry Mamaysky, and Jiang Wang. 2000. Foundations of technical analysis: Computational algorithms, statistical inference, and empirical implementation. Journal of Finance 55: 1705–65. [Google Scholar] [CrossRef]
  50. López Rodríguez, Francisco Solano, and José Manuel Zurita López. 2022. Detection of Buy and Sell Signals Using Technical Indicators with a Prediction Model Based on Neural Networks. Berlin/Heidelberg: Springer. [Google Scholar] [CrossRef]
  51. Lopez, R., and T. Wang. 2023. Market Timing and Portfolio Performance: A Comparative Analysis. Global Financial Review 18: 89–112. [Google Scholar]
  52. Mariani, Maria, and Osei Kofi Tweneboah. 2022. Modeling high frequency stock market data by using stochastic models. Stochastic Analysis and Applications 40: 573–88. [Google Scholar] [CrossRef]
  53. Market Realist. 2021. What Are Buy and Sell Signals in the Stock Market? Market Realist. Available online: https://marketrealist.com/p/buy-and-sell-signals-explained (accessed on 15 August 2024).
  54. Markus, Lawrence, and A. Weerasinghe. 1988. Stochastic oscillators. Journal of Differential Equations 71: 288–314. [Google Scholar] [CrossRef]
  55. Murphy, John J. 1999. Technical Analysis of the Financial Markets: A Comprehensive Guide to Trading Methods and Applications. New York: New York Institute of Finance. [Google Scholar]
  56. Neely, Michael J. 2010. Stock market trading via stochastic network optimization. Paper presented at 49th IEEE Conference on Decision and Control (CDC), Atlanta, GA, USA, December 15–17; pp. 2777–84. [Google Scholar]
  57. Paik, Chan Kyu, Jinhee Choi, and Ivan Ureta Vaquero. 2024. Algorithm-Based Low-Frequency Trading Using a Stochastic Oscillator and William% R: A Case Study on the US and Korean Indices. Journal of Risk and Financial Management 17: 92. [Google Scholar] [CrossRef]
  58. Patel, R., S. Gupta, and M. Sharma. 2023. Trading Volume as a Predictor for Stock Market Indices: A Comprehensive Analysis. Financial Markets Review 29: 301–24. [Google Scholar]
  59. Penman, Stephen H. 2013. Financial Statement Analysis and Security Valuation, 5th ed. New York: McGraw-Hill Education. [Google Scholar]
  60. Pring, Martin J. 2002. Technical Analysis Explained: The Successful Investor’s Guide to Spotting Investment Trends and Turning Points. New York: McGraw-Hill. [Google Scholar]
  61. Rollinger, Thomas N., and Scott T. Hoffman. 2013. Sortino: A ‘Sharper’ Ratio. Chicago: Red Rock Capital. [Google Scholar]
  62. Sezer, Omer Berat, A. Murat Ozbayoglu, and Erdogan Dogdu. 2017. An artificial neural network-based stock trading system using technical analysis and big data framework. Paper presented at ACM SE ‘17 Proceedings, Kennesaw GA, USA, April 13–15. [Google Scholar]
  63. Sharpe, William. 1994. The Sharpe ratio. The Journal of Portfolio Management 21: 49–58. [Google Scholar] [CrossRef]
  64. Shleifer, Andrei, and Robert W. Vishny. 1997. The limits of arbitrage. The Journal of Finance 52: 35–55. [Google Scholar] [CrossRef]
  65. Sher, Madiha, Nasru Minallah, Tufail Ahmad, and Waleed Khan. 2023. Hyperparameters analysis of long short-term memory architecture for crop classification. International Journal of Electrical and Computer Engineering (IJECE) 13: 4661–70. [Google Scholar] [CrossRef]
  66. Singh, R., and A. Sharma. 2020. ARIMA-based volatility modeling in emerging markets. International Journal of Financial Studies 8: 123–35. [Google Scholar]
  67. Smith, J. 2022. The Impact of Trading Volume on Market Index Prediction. Journal of Financial Analysis 47: 123–45. [Google Scholar]
  68. Topiwala, Pankaj. 2023. Surviving Black Swans II: Timing the 2020–2022 Roller Coaster. Journal of Risk and Financial Management 16: 106. [Google Scholar] [CrossRef]
  69. Topiwala, Pankaj, and Wei Dai. 2022. Surviving Black Swans: The Challenge of Market Timing Systems. Journal of Risk and Financial Management 15: 280. [Google Scholar] [CrossRef]
  70. Treynor, Jack, and Kay Mazuy. 1966. Can Mutual Funds Outguess the Market? Harvard Business Review 44: 131–36. [Google Scholar]
  71. Tsay, Ruey S. 2010. Analysis of Financial Time Series. Hoboken: John Wiley & Sons, vol. 543. [Google Scholar]
  72. Tsay, Ruey S. 2019. An Introduction to Analysis of Financial Data with R, 2nd ed. Hoboken: Wiley. [Google Scholar]
  73. Van Dyk, Francois, Gary Van Vuuren, and Andre Heymans. 2014. Hedge Fund Performance Using Scaled Sharpe and Treynor Measures. International Journal of Economics and Business Research 13: 1261–300. [Google Scholar] [CrossRef]
  74. Verma, Satya, Satya Prakash Sahu, and Tirath Prasad Sahu. 2023. Stock market forecasting using hyperparameter-tuned ensemble model. Paper presented at 2023 IEEE World Conference on Applied Intelligence and Computing (AIC), Sonbhadra, India, July 29–30; pp. 267–71. [Google Scholar]
  75. Wang, H., X. Li, and Y. Zhang. 2021. Forecasting stock prices using ARIMA: A case study on Chinese market indices. Journal of Economic Forecasting 29: 88–102. [Google Scholar]
  76. Williams, Larry. 2011. Long-Term Secrets to Short-Term Trading. New York: John Wiley & Sons, vol. 499, pp. 140–44. [Google Scholar]
  77. Zhang, J., Y. Liu, and H. Zhao. 2022. Optimizing SVM parameters with grid search for stock price prediction. Journal of Financial Analytics. [Google Scholar]
Figure 1. Deep Signal + Algorithm flow. w = Willams %R number, s = Stochastic Oscillator number, 52w avg vol = 52-week average trading volume, 1stdev = one standard deviation.
Figure 1. Deep Signal + Algorithm flow. w = Willams %R number, s = Stochastic Oscillator number, 52w avg vol = 52-week average trading volume, 1stdev = one standard deviation.
Jrfm 17 00501 g001
Figure 2. SPY ETF’s combined William %R and stochastic oscillator trends.
Figure 2. SPY ETF’s combined William %R and stochastic oscillator trends.
Jrfm 17 00501 g002
Figure 3. SPY ETF’s separate William %R and stochastic oscillator trends.
Figure 3. SPY ETF’s separate William %R and stochastic oscillator trends.
Jrfm 17 00501 g003
Figure 4. SPY ETF’s buy and sell signals according to the algorithm. Black arrows indicate a buy signal and blue arrows indicate a sell signal. Ten trading signals were generated (buy and sell).
Figure 4. SPY ETF’s buy and sell signals according to the algorithm. Black arrows indicate a buy signal and blue arrows indicate a sell signal. Ten trading signals were generated (buy and sell).
Jrfm 17 00501 g004
Figure 5. SPY ETF’s price and volume trends.
Figure 5. SPY ETF’s price and volume trends.
Jrfm 17 00501 g005
Figure 6. SPY ETF’s one-year average volume and volume trends.
Figure 6. SPY ETF’s one-year average volume and volume trends.
Jrfm 17 00501 g006
Figure 7. SPY ETF’s one-year average volume plus one standard deviation, one-year average volume, and volume trends.
Figure 7. SPY ETF’s one-year average volume plus one standard deviation, one-year average volume, and volume trends.
Jrfm 17 00501 g007
Figure 8. Residuals from ARIMA Model.
Figure 8. Residuals from ARIMA Model.
Jrfm 17 00501 g008
Figure 9. SPY ETF trend, standard (×1) trading trend.
Figure 9. SPY ETF trend, standard (×1) trading trend.
Jrfm 17 00501 g009
Figure 10. SPY ETF trend, leverage trading trend.
Figure 10. SPY ETF trend, leverage trading trend.
Jrfm 17 00501 g010
Figure 11. SPY ETF trend, leverage trading trend.
Figure 11. SPY ETF trend, leverage trading trend.
Jrfm 17 00501 g011
Table 1. The core measurement numbers of SPY ETF algorithm trading.
Table 1. The core measurement numbers of SPY ETF algorithm trading.
IndexSPY Results
periodJanuary 2010~December 2023
trading numbers10
number of gains9
number of losses1
hit ratio (%)90.0
DeepSignal
Model
standard
trading
(x1)
max drawdown (%)−0.1
max gain (%)28.7
total return (%)141.2
AnnR (%)7.0
ARM ratio (%)70.0
PARC (%)0.07
DeepSignal+
Model
leverage
trading
max drawdown (%)−0.2
max gain (%)86.0
total return (%)519.3
AnnR (%)15.1
ARM ratio (%)75.5
PARC (%)0.151
S&P 500
index
max drawdown (%)−15.1
max gain (%)12.1
total return (%)375.0
AnnR (%)11.6
ARM ratio (%)0.768
PARC (%)0.098
Maximum drawdown is based on the weekly negative change rate; maximum gain is based on the weakly positive change rate; AnnR = end price/start price; ARM ratio = AnnR/MaxD; PARC = AnnR × (1 − MaxD).
Table 2. A DeepSignal simulation trading table of the SPY (S&P 500) ETF.
Table 2. A DeepSignal simulation trading table of the SPY (S&P 500) ETF.
DateSPY *DeepSignalBuy/SellReturn
Rate
StochasticWilliams %R
4 January 2010114.6100.0Start
21 June 2010107.9100.0BUY 26.1−80.3
27 September 2010114.6106.2SELL6.282.3−10.3
20 June 2011126.8106.2BUY 26.0−94.4
7 November 2011126.7106.1SELL−0.182.4−12.6
28 May 2012128.2106.1BUY 24.7−100.0
6 August 2012140.8116.6SELL9.986.1−0.6
12 November 2012136.4116.6BUY 22.0−87.5
21 January 2013150.3128.5SELL10.285.60.0
11 January 2016187.8128.5BUY 23.2−91.0
28 March 2016206.9141.6SELL10.285.3−0.8
31 October 2016208.6141.6BUY 27.6−98.4
12 December 2016225.0152.8SELL7.989.0−16.5
19 November 2018263.3152.8BUY 28.9−90.0
18 February 2019279.1162.0SELL6.082.5−0.5
30 March 2020248.2162.0BUY 20.1−75.2
1 June 2020319.3208.4SELL28.785.7−2.5
16 May 2022389.6208.4BUY 21.5−88.9
1 May 2023412.6220.7SELL5.986.2−13.5
16 October 2023421.2220.7BUY 19.3−97.0
4 December 2023460.2241.2SELL9.387.7−1.1
25 December 2023475.3241.2End
* The primary ETF price data from the Yahoo Finance site.
Table 3. A DeepSignal+ simulation trading table of the SPY (S&P 500) ETF.
Table 3. A DeepSignal+ simulation trading table of the SPY (S&P 500) ETF.
DateSPY *Deep
Signal+
StochasticWilliams %RBuy/SellReturn
Rate
Volume
(k)
52w AVG
Volume (k)
52w
+1std (k)
4 January 2010114.6100.0 Start
21 June 2010107.9100.026.1−80.3BUY 213,140.7204,608.1 84,282.4
27 September 2010114.6106.282.3−10.3SELL6.2
20 June 2011126.8106.226.0−94.4BUY 159,479.0179,370.8 60,152.6
7 November 2011126.7106.082.4−12.6SELL−0.2
28 May 2012128.2106.024.7−100.0BUY 152,883.5214,504.6 99,797.0
6 August 2012140.8127.086.1−0.6SELL19.8
12 November 2012136.4127.022.0−87.5BUY 97,677.5150,794.1 45,951.9
21 January 2013150.3152.885.60.0SELL20.4
11 January 2016187.8152.823.2−91.0BUY 187,941.3124,275.5 55,937.7
28 March 2016206.9199.585.3−0.8SELL30.5
31 October 2016208.6199.527.6−98.4BUY 61,272.5108,508.7 48,956.4
12 December 2016225.0231.089.0−16.5SELL15.8
19 November 2018263.3231.028.9−90.0BUY 103,061.790,593.1 45,031.4
18 February 2019279.1258.982.5−0.5SELL12.1
30 March 2020248.2258.920.1−75.2BUY 171,369.586,450.7 68,913.9
1 June 2020319.3481.685.7−2.5SELL86.0
16 May 2022389.6481.621.5−88.9BUY 78,622.485,514.8 36,783.2
1 May 2023412.6566.886.2−13.5SELL17.7
16 October 2023421.2566.819.3−97.0BUY 75,433.282,986.7 21,914.7
4 December 2023460.2619.387.7−1.1SELL9.3159,479.0179,370.8 60,152.6
25 December 2023475.3619.3 End
* The primary ETF price data from the Yahoo Finance site.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Paik, C.; Choi, J.; Vaquero, I.U. Algorithm-Based Low-Frequency Trading Using a Stochastic Oscillator, Williams%R, and Trading Volume for the S&P 500. J. Risk Financial Manag. 2024, 17, 501. https://doi.org/10.3390/jrfm17110501

AMA Style

Paik C, Choi J, Vaquero IU. Algorithm-Based Low-Frequency Trading Using a Stochastic Oscillator, Williams%R, and Trading Volume for the S&P 500. Journal of Risk and Financial Management. 2024; 17(11):501. https://doi.org/10.3390/jrfm17110501

Chicago/Turabian Style

Paik, ChanKyu, Jinhee Choi, and Ivan Ureta Vaquero. 2024. "Algorithm-Based Low-Frequency Trading Using a Stochastic Oscillator, Williams%R, and Trading Volume for the S&P 500" Journal of Risk and Financial Management 17, no. 11: 501. https://doi.org/10.3390/jrfm17110501

APA Style

Paik, C., Choi, J., & Vaquero, I. U. (2024). Algorithm-Based Low-Frequency Trading Using a Stochastic Oscillator, Williams%R, and Trading Volume for the S&P 500. Journal of Risk and Financial Management, 17(11), 501. https://doi.org/10.3390/jrfm17110501

Article Metrics

Back to TopTop