Zeiierman

AMA versus SMA. Is smarter really better?

Education
OANDA:XAUUSD   Gold Spot / U.S. Dollar
Adaptive versus Simple Moving Average Trading Strategies. Is smarter really better?
Computer-aided trading systems have revolutionized the way trading decisions are made. We now employ sophisticated algorithms to predict market movements and execute trades at optimal times. Among these, moving average(MA) strategies stand out for their simplicity and effectiveness among the many available strategies. This study by Craig A. Ellis and Simon A. Parbery compares two prominent MA strategies: the Adaptive Moving Average(AMA) and the Simple Moving Average(SMA).


Conclusion: While adaptive moving average strategies may provide an edge in certain market conditions by capturing trends more efficiently than simple moving averages, investors must carefully consider transaction costs.
These costs can significantly impact net returns, particularly in frequent trading strategies. Findings suggest that the effectiveness of adaptive versus simple moving average trading strategies is nuanced in varying market conditions, with no one-size-fits-all answer. Investors should weigh the potential benefits of adaptability against the increased costs and risks associated with such strategies.

Moving Average Trading Systems
Among the various types of moving averages, the Simple Moving Average(SMA) and the Adaptive Moving Average(AMA) are particularly noteworthy due to their distinct characteristics and applications in trading strategies.

Simple Moving Average and Its Calculation
SMA is one of the most basic moving averages in trading. It calculates the average price of a security over a defined number of periods. The SMA is straightforward to compute; you sum up the security's closing prices for a set number of periods and then divide this total by the number of periods.

This process results in a smooth line that traders can overlay on their price charts to assess the direction of the trend. For example, a 20-day SMA would add up the closing prices of the past 20 days and divide the total by 20. This calculation is continuously updated as new closing prices become available, giving traders a dynamic view of the market's trend.

// Function to calculate the SMA using an array
sma(source, length) =>
    // Initialize an array to hold the prices
    prices = array.new_float(length)
    // Fill the array with the most recent `length` prices
    for i = 0 to length - 1
        array.set(prices, i, source[i])
    // Calculate the sum of the array elements
    sum = array.sum(prices)
    // Return the average
    sum / length

Adaptive Moving Average and Its Calculation
The Adaptive Moving Average (AMA), proposed by Perry Kaufman in his book "New Trading Systems and Methods," represents a significant advancement in moving average technology. Unlike the SMA, which gives equal weight to all data points, the AMA adjusts its sensitivity based on the market's volatility. This adaptability makes the AMA particularly useful in identifying market trends with varying degrees of volatility.

The core of the AMA's adaptability lies in its Efficiency Ratio (ER), which measures the directionality of the market over a given period. The ER is calculated by dividing the absolute change in price over a period by the sum of the absolute differences in daily prices over the same period.

// Calculate the Efficiency Ratio (ER)
change = math.abs(close - close[length])
volatility = math.sum(math.abs(close - close[1]), length)
ER = change / volatility

The ratio helps determine how efficiently the price is moving in one direction. A higher ER indicates a more directional market, prompting the AMA to react quickly to price changes. A lower ER suggests a consolidating market, leading the AMA to respond more to recent price changes.

Data and Research Methodology
The data set encompasses daily closing prices for three major stock indices: the Australian All Ordinaries, the Dow Jones Industrial Average (DJIA), and the S&P 500, spanning from 1980 to 2002. This period provides a comprehensive view of market behavior, including various economic cycles, bull and bear markets, and periods of high volatility. Such a diverse data set is crucial for testing the robustness of the AMA in different market environments.

This study investigates whether AMA's adaptive nature results in superior performance compared to the more static SMA and the passive buy-hold approach. The key steps in the research methodology include:

  1. Parameter Selection: Identifying optimal parameters for both AMA and SMA to ensure a fair comparison. This involves selecting the look-back periods and thresholds for triggering buy or sell signals.
  2. Strategy Implementation: Developing trading strategies based on AMA, SMA, and a buy-hold benchmark. Each strategy is applied to the data set to simulate real-world trading, with buy or sell signals generated according to the specific rules of each approach.
  3. Performance Evaluation: The performance of each strategy is assessed using several metrics, including total return, risk-adjusted return, and maximum drawdown.
    This comprehensive evaluation aims to determine the effectiveness of AMA in navigating various market conditions compared to SMA and buy-hold strategies.
  4. Statistical Testing: Conducting statistical tests to ascertain the significance of the differences in performance outcomes among the strategies. This includes tests for statistical significance in returns and risk metrics, providing a robust framework for comparison.
  5. Sensitivity Analysis: Exploring how changes in the parameters of AMA and SMA affect the strategies' performance. This analysis helps understand the flexibility and adaptability of AMA in response to different market dynamics

Results
The empirical analysis focused on comparing the performance of Adaptive Moving Average (AMA) and Simple Moving Average (SMA) strategies across a variety of indices, including the S&P 500, Dow Jones Industrial Average (DJIA), and NASDAQ.

The performance metrics were primarily based on the total return over the investment period, the Sharpe ratio, and the maximum drawdown to assess each strategy's risk-adjusted returns and resilience during market downturns.

The table demonstrates that the AMA strategy consistently outperformed the SMA strategy across all indices regarding total return and Sharpe ratio, indicating a superior risk-adjusted return. However, it's important to note that the AMA strategy also experienced slightly higher drawdowns than the SMA in certain instances, suggesting a potentially higher risk during market downturns.

⚪ In discussing the market timing ability of AMA, the analysis found that AMA could better adapt to changing market conditions, thereby capturing trends more efficiently than the SMA strategy. This adaptability resulted in higher returns during periods of significant market movements. However, when accounting for transaction costs, the advantage of AMA over SMA diminished, particularly in markets characterized by frequent, small movements that triggered more trading activity by the AMA strategy.

Reference
Ellis, C. A., & Parbery, S. A. (2005). Is smarter better? A comparison of adaptive, and simple moving average trading strategies. Research in International Business and Finance, 19, 399-411.

-----------------
Disclaimer
This is an educational study for entertainment purposes only.

The information in my Scripts/Indicators/Ideas/Algos/Systems does not constitute financial advice or a solicitation to buy or sell securities. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.

All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on evaluating their financial circumstances, investment objectives, risk tolerance, and liquidity needs.

My Scripts/Indicators/Ideas/Algos/Systems are only for educational purposes!

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.