The MATOA trading algorithm by SHASH86
Added 2024-08-30 14:00:01 +0000 UTCIntroduction
Hello, everyone! In this post, I'll dive into the "Matoa" trading strategy, an algorithm crafted for the Freqtrade platform by a developer known as STASH68. This strategy employs several complex techniques to make trading decisions in cryptocurrency markets. So, let’s break down how this strategy works and discuss its potential effectiveness and applicability.
Strategy Overview
"Matoa" utilizes a variety of technical indicators and custom logic to determine the optimal times to enter and exit trades on a 5-minute timeframe. It aims to capitalize on short-term market movements by employing a set of rules defined for buying and selling based on the behavior of these indicators.
Key Components of the Strategy
Hull Moving Average (HMA): This is a pivotal element of the buying logic. The strategy uses different lengths and offsets of the HMA to identify potential buying opportunities when the price is favorable compared to the HMA.
Exponential Moving Average (EMA): For selling signals, the strategy relies on different configurations of the EMA. The EMA helps determine if the price has reached a point that suggests a profitable exit.
Volatility: The strategy uses standard deviation to measure volatility, which helps in filtering entry points based on the market's stability.
Protections: It includes a cooldown period to avoid re-entering trades too soon after an exit, which helps in risk management.
Entry Conditions
Buying Conditions: The strategy generates a buy signal if:
The current price is less than one of the calculated HMAs.
The market volatility is within specified limits, ensuring the trade is not made in overly volatile conditions.
Each buying rule is accompanied by specific conditions using rolling windows and checks against historical data, ensuring robustness in the trading signals.
Exit Conditions
Selling Conditions: A sell signal is triggered when:
The price exceeds certain thresholds of the EMAs.
These conditions are designed to capture profit when the price reaches a peak after the entry.
The strategy also incorporates a trailing stop loss, which dynamically adjusts the stop loss level as the price moves favorably, allowing for protected yet flexible exit points.
Advanced Features
Indicator Optimization: Many of the parameters for the indicators used in "Matoa" are optimized through backtesting, which means they have been adjusted to maximize performance based on historical data.
Backtest results
Before we jump in, remember that backtesting is a simulation. Past results don't guarantee future performances, but they can give us valuable insights. So, take this analysis as a learning tool, not a promise of profits.
Let's pull up the results chart and unpack the numbers. The strategy was tested on a 4-hour timeframe, and here's how it panned out:
End Balance: The final balance stood at $1945.35, turning a significant profit from the initial investment.
Profit Percentage: An impressive 94.54% gain! This figure is enough to turn heads in any trading circle. But be aware that there are many other trading strategies that perform way better then this.
Win Rate: More than half of the trades were winners, at 57.71%. A win rate above 50% is often considered good in trading, as it means more wins than losses. But winning trades do not say the complete story, its also a matter of keeping those gains. And we will explore that further down this post.
Maximum Winning and Losing Trade: The strategy's biggest winner brought in 15 times the risk, while the biggest loser cost 8 times the risk. This ratio of winners to losers is crucial as it speaks to potential risk management.
Compound Annual Growth Rate (CAGR): At 0.14%, it's relatively low, suggesting this strategy may not be the best for those seeking aggressive annual growth.
Maximum Drawdown: This sits at 8.64%, indicating the largest drop from a peak to a trough during the backtesting period. It's moderate, showing a controlled level of risk.
Calmar Ratio: At 1.57, it shows a decent return compared to the drawdown risk.
Sortino Ratio: This is at 2.26, which suggests that the strategy provided a good return on the risk taken, considering only the negative volatility.
Sharpe Ratio: At 0.67, it's a bit on the lower end. The higher this ratio, the better the risk-adjusted returns, so there might be room for improvement.
Profit Factor: At 1.44, the strategy earns $1.44 for every dollar lost, which is a solid indicator of its profitability.
Pairs Percentage: 61.22% of pairs were profitable, which is a strong outcome, showing that the
So looking at these results, Matoa seems to be a promising strategy, especially with its high profit percentage and reasonable management of risk. However, the low CAGR may raise questions for long-term growth expectations.
But looking at the end results only tell one part of the complete story, so let me also show you how this algo performs over time:
First up, we have the cumulative wins, draws, and losses chart over a weekly period. You can see from the chart that the cumulative wins (in green) ramped up significantly leading to the bull market peak of 2021.
Moving on to the drawdown analysis chart. The red line indicates the drawdown percentages, which measures the decline from a peak in the equity of the strategy. The average drawdown, displayed by the green line, gives us an indication of the typical losses you might expect during trading.
Now, let's talk about the win/loss ratio chart. The bars represent weeks where the strategy had more wins (in green) than losses (in red), and vice versa. The tall green bars right before the 2021 bull market peak tell us that the strategy was having significantly more wins than losses, aligning well with the cumulative profits chart.
Lastly, we compare Matoa's performance with other top strategies in various categories such as total score, profit factor, and Sharpe ratio. Matoa stands out with a high total score, but when it comes to the Sharpe ratio, which measures risk-adjusted returns, there's room for improvement.
Conclusion
As we come to the end of our analysis, let’s take a moment to critically assess what we've uncovered about the Matoa strategy through our backtesting deep dive. While we saw some impressive peaks and a strategy that capitalized well during the bull run, it's essential to step back and look at the bigger picture.
When compared to other strategies, Matoa shows it has potential, but it doesn't top the charts. The win/loss ratio was healthy in the up-trending market but remember, a strategy is tested by its performance across various market conditions. When we look at the Sharpe ratio, it’s evident that when you adjust for risk, Matoa's returns are not as competitive. This suggests that while Matoa could be a piece of the puzzle, it may not be the cornerstone of a robust trading portfolio.
Additionally, the strategy's Compound Annual Growth Rate (CAGR) is low, which indicates that it might not be the best fit for traders looking for aggressive growth. The drawdown spikes also suggest that it might have periods of significant risk, which could be a red flag for more conservative investors.
It's vital to approach any strategy with a healthy dose of skepticism and consider how it fits within your risk tolerance and investment goals. Matoa, while having its moments, does show that there are better-performing strategies out there that might be more deserving of your capital.
To my patrons, I extend a heartfelt thank you for your support. Your contributions make these deep dives possible, and it’s with your backing that we continue to provide unbiased, critical analyses of crypto trading strategies. Your support is incredibly valued, and I'm excited to bring you even more insights to help you navigate these ever-changing markets.
Remember, no strategy is perfect, and backtesting is just one tool in a trader’s kit. Stay tuned, stay informed, and let's keep striving for those optimal trades.
Until next time, thank you for watching, and thank you for your support.
Goodbye!!
Comments
thanks
Claudio
2024-08-31 08:07:28 +0000 UTC