How key markets have performed either side of a US electionI wanted to see how major markets have performed in the days before, during and after US elections. So I coded up a new spreadsheet. Here are the results...
Please note:
- Price data supplied by Refinitiv
- Most markets go back 8 elections
- US futures and VIX are the exception, which go back 6 elections
MS
Backtest
Dangerous Lies Your Backtest TellsDangerous Lies Your Backtest Tells
We are easily hooked on the dopamine rush of seeing profitable equity curves during backtesting. The allure of parabolic returns is often so strong it is blinding to the inherent flaws that exist, to varying degrees, in every backtest.
Backtesting, while often seen as an essential step in designing and verifying trading strategies - is far from a foolproof method. Many traders place too much confidence in their backtested results, only to see their strategies fail when used in the live markets. The reality is that backtesting is riddled with limitations and biases that lead to a false sense of security in a strategy’s effectiveness. Let’s take a comprehensive look into the many flaws of backtesting, and explore the common pitfalls of using a simple back test as your only method of verifying a strategy's efficacy.
1. Choosing the Winning Team After the Game is Already Over
(Selection Bias)
When selecting which instruments for backtesting, it is common to choose assets you are already interested in or those that performed well in the past. This introduces selection bias, as the strategy is tested on assets that may have been outliers. While this may produce impressive backtest results, it creates an illusion of reliability that may not hold up when applied to other assets or future market conditions - a theme that will be common for most of the explored backtesting drawbacks.
Example:
Imagine backtesting a Long only strategy using only tech stocks that surged during a market boom. The strategy might look incredibly successful in the backtest, but when applied to other sectors or different market phases it will most likely fail to perform - because the selection was based on past winners rather than a broader, more balanced approach.
2. You Only See the Ships that Make it to Shore
(Survivorship Bias)
Similar to the above, survivorship bias occurs when backtests only include assets that have survived of the test period - excluding those that were delisted, went bankrupt, or failed entirely. This creates a skewed dataset, inflating performance metrics beyond reasonable levels once again. By only focusing on assets that are still around, you overlook the fact that many others didn’t make it - and these failures could have significantly impacted the strategy’s results. By ignoring delisted companies, or rug-pulled crypto projects, you inherently induce a selection bias - as purely because your chosen instruments didn’t go to zero they must have performed better.
Example:
Suppose you backtest a low-cap cryptocurrency strategy. If your backtest spans for, say, five years the test can give the illusion of success - but what’s missing is the hundreds of tokens that were launched and failed during the same period. How can we possibly assume that we will be lucky enough to only pick tokens that survive the next five years?
3. Reading Tomorrow’s News Today
(Look-Ahead Bias)
Look ahead bias occurs when future information is unintentionally used in past decision making during a backtest. This can often occur due to coding errors in an automated system which leads to unreasonable and unrepeatable results. Look-ahead bias isn’t limited to algorithmic backtesting - it can also affect manual backtests. Traders will often miss false signals because they can already see the outcome of the trade. This knowledge of the future can affect the accuracy of a manual backtest - both as a conscious decision by the trader but also subconsciously.
if Current_Price < Tomorrows_Close
strategy.entry("Enter a Long Position", strategy.long)
// An extreme example
4. Perfecting the Final Chord, but Forgetting the Song
(Recency Bias)
Recency bias occurs when traders place too much emphasis on the most recent data or market conditions in a backtest. This usually occurs when a trader feels they missed an opportunity in the past few months - and tries to develop a strategy that would have captured that specific move. By focusing too heavily on recent history, it is easy to neglect the fact that markets usually move in long cyclical phases. This over optimisation for recent conditions will, at best, result in a strategy that performs well in the short term but fails as soon as market dynamics shift.
Example
Frustrated by missing the most recent leg of the bull market, a trader develops a strategy that would have perfectly performed during this period. However, when the trader begins live trading at the top of the market, the strategy quickly fails. It was only optimized for that short and specific market phase and was unable to adapt to the changing market conditions.
5. Forcing the Square into the Round Hole
(Overfitting)
Overfitting occurs when a strategy is excessively optimized for historical data, capturing noise and random fluctuations rather than meaningful patterns. Overfitting is common when traders test too many parameter combinations, tweaking their strategy until it fits the past data perfectly. In contrast to the previous point, this over optimisation can occur on data of any length, whether years or even longer periods.
Example
Adjusting a large range of parameters in a high frequency strategy by incredibly small increments and deciding to use the calibrations that yield the highest performance.
6. Mixing Oil and Water
(Conflating Trend and Mean Reversion Systems)
Traders often attempt to design strategies that perform well in both trending and mean reverting environments, which leads to muddled logic and poor performance in ALL environments. A trend following strategy is meant to capitalize on sustained price movements, and should naturally underperform during mean-reverting or ‘ranging’ periods. In a range-bound market, a trend-following strategy will often buy near the top of the range after detecting strength, only for the price to reverse. Conversely, a mean reversion strategy is built to profit from oscillations around a stable point and forcing both approaches into a single system results in unrealistic backtest performance and poor real-world results.
One of the common mistakes is when a trend following strategy ‘accidently’ performs well during mean-reverting periods. This skews the backtest metrics because any gains during non-trending markets are multiplied significantly during actual trends. As a result, the backtest shows artificially positive performance - but the strategy quickly falls apart in live trading. Normally, a trend following strategy would incur losses during a range-bound market and only begin to recover once a new trend emerges. However, if a strategy is overfit to handle both the trend and mean reversion periods of the past, it doesn’t need to recover losses and instead compounds gains during the entire trend. This creates inflated backtest results that won’t hold up in real trading.
Example:
A trader develops a trend following system that, through over-optimization, performs surprisingly well during mean-reversion phases. In the backtest, the strategy shows strong returns, even in ranging markets. However, in live trading, the system fails, leaving the trader with poor performance. Instead, the trader should have accepted ‘lower’ returns from a strategy that wasn’t overfit - because in live markets robust strategies with mediocre backtests perform better than overfit strategies that only excel in backtesting.
7. Seeing the World Through a Keyhole
(Limited Data Skewed by Outliers)
Strategies built on assets with limited data are highly susceptible to skew results, especially when outliers dominate the dataset. Without sufficient data, it becomes nearly impossible to assess whether a strategy can consistently perform into the future. Some strategies, like trend following, are designed to capture outliers, that is, the periods of performance above the norm. The issue arises when testing on a small sample as it’s difficult to determine if the strategy can consistently capture trends or just got lucky.
Example:
A trader develops a trend following strategy for a cryptocurrency that has recently launched. The backtest shows massive gains, as it is common for projects to make large returns as soon as they are listed. However without enough data history, it is impossible to assess the actual effectiveness of this strategy, as its performance metrics are positively skewed by the ‘listing pump.’
The image shows a cryptocurrency project launched in October 2020. At first glance, the EMA Crossover strategy appears profitable, but a closer look reveals that most of the profit comes from the first trade, which is considered an outlier. If that trade was removed, the strategy as a whole would become unprofitable. Following this strategy is essentially betting on the project to experience another sharp rise similar to what occurred in 2020. While technically this isn’t impossible, it is much riskier - a more proven and verified strategy would increase your probability of success.
8. Designing a Car that Doesn’t Fit on the Road
(Execution Constraints and Positions Sizing)
In backtesting, real world constraints such as minimum or maximum order sizes are often ignored, leading to unrealistic trade execution. Traders may find that they either don’t have enough capital to satisfy the minimum order size - either immediately or after a small drawdown. Additionally, compounded returns on a backtest can lead to absurd positions sizes that could never be bought or sold in the real market. This particularly is more problematic for deep backtestests.
Example:
A backtest shows spectacular growth, with the account size ballooning overtime and resulting in an extremely high profit percentage. However, in real-word conditions, the required position size to continue executing the strategy becomes so large that it exceeds the liquidity of the market - making it impossible to receive comparable profit percentages on real world trading.
9. Death by a Thousand Paper Cuts
(Not Accounting for Fees, Commissions and Slippage)
When performing a backtest, traders often overlook critical transaction costs such as fees, slippages and spreads. These seemingly small costs can accumulate and significantly erode profits, especially strategies that rely on frequent trades with a low average return per trade. Slippage also should include execution slippage - the time delay between receiving a signal from a system, placing an order and its execution. This is particularly problematic for lower timeframe trading where even minor delays can drastically swing a strategy from profitable to unprofitable
Example:
A day trader runs a backtest on a scalping strategy and sees parabolic returns. However in live trading, the small profits from each trade are wiped out by broker commissions, spreads and the slippage that occurs from both position sizing, and when trades are executed slightly later than expected. This strategy, while successful in the backtest, failed to account for the ‘death by a thousand paper cuts.’
10. Filling Half of the Grocery Cart
(Partial Order Fills)
In low liquidity environments, or when trading large position sizes, partial order fills are common - meaning traders only get a portion of their order executed at their desired price. This can significantly impact returns. Backtests will usually assume complete fills at the exact target price. However, in reality a trader experiencing a partial order fill must decide whether to complete the position at a worse price or leave a portion of the target position size out of the market. Both choices will lead to results that are not comparable to the backtested results.
Example:
A trader places a limit order to buy 100 shares of a low-liquidity stock at a price of $10. The order is only partially filled, with 60 shares bought at $10, while the remaining 40 shares require the new, higher price. The trader now faces the choice of paying more, or leaving part of the trade out. This is a major deviation from the backtest, which assumed the complete position was bought at $10.
11. Betting on Lightning Striking Twice
(Black Swan Events)
Black swan events are rare, inherently unpredictable, and have a significant impact on financial markets. Strategies designed to avoid drawdowns during these events are at risk of being overfit. Traders often fall into the trap of building systems that avoid drawdowns during past black swan events - overfitting their strategies to these rare occurrences. These strategies are unlikely to succeed in regular market conditions and contain no extra edge in protecting a trader from future black swans events.
Example:
After the FTX collapse caused a sharp drop in crypto prices, a trader chooses to develop a swing trading strategy designed to avoid all losses during this event. However, by optimizing the strategy to exit positions before the collapse, the trader unintentionally overfits it. As a result, the strategy begins to sell off positions too early in other situations, cutting profits short. Prior to the FTX collapse, the market was still in an uptrend, and there were no clear signs of an impending downturn - so attempting to optimize for such a rare event ends up compromising the strategy’s performance in more typical market conditions.
12. Expecting a Weeks Pay After Only Working One Shift
(Time of Day and Day of Week Restrictions)
Many traders are only able to trade during specific hours or days of the week, yet their backtests often include data from periods where they are unavailable - such as overnight sessions. This creates an unrealistic expectation of returns. For example, in markets like crypto that trade 24/7, backtesting a day trading strategy on the full market period gives a false impression of potential profits if you can only trade during certain hours. Additionally, market participants also differ depending on the time of day, as entire countries wake up and go to sleep at different times of day. One could make the assumption that human behavior as a whole might be the same, but the number of participants and liquidity will definitely change.
Example:
A day trader backtests a strategy using 24/7 crypto market data - but is only able to trade on weekday afternoons due to other commitments.
13. Siphoning Gas from a Moving Car
(Capital Drain and Addition)
Backtests frequently assume infinite compounding, where no capital is ever added or withdrawn from the trading account. In practice, however, traders will regularly add or remove funds - which significantly impacts the performance of a strategy. For instance, withdrawing money during a drawdown forces the strategy to work harder to recover losses, as it now requires higher returns to break even. Similarly, adding capital can skew results by altering position sizing. While it is necessary to manage capital in this way, backtests usually don’t account for these changes and once again, leads to results that are not repeated in practice.
Example:
A trader consistently pulls a portion of profits from their account each month. In the backtest, no withdrawals are considered, and the strategy appears highly profitable. However, in live trading these regular withdrawals put pressure on the account, and especially over longer periods of time, this reduced level of compound will lead to significant underperformance relative to the backtest due to the reduced compounding effect on returns.
14. Your Subscription Service Increase Price Without You Realizing
(Interest Rates and Funding Costs)
The ‘cost of capital’ - such as leverage costs, interest rate and funding fees - can fluctuate over time, but backtests often overlook these dynamic costs or even fail to account for them altogether. In live markets, these changes can significantly erode profit margins. Not considering these costs, especially the factors affecting their variability, can easily turn a profitable backtest into an unprofitable strategy in live trading.
Example:
A trader backtests a strategy for use in cryptocurrency perpetual futures. The strategy is designed for bull markets but fails to account for the rising funding rates frequently seen during periods of high demand. As the cost to maintain an open position skyrockets, the trader’s profit margins quickly shrink, making the strategy far less viable than the backtest indicated. This is particularly dangerous because as the funding fees erode the position’s margin, the liquidation price rises faster than expected, potentially resulting in the entire position being liquidated - even though the trade appeared profitable on paper.
15. You Can’t Ride the Wave Past the Shore
(Alpha Decay)
In highly competitive markets, especially in high-frequency trading, the edge of a strategy (alpha) can erode over time as more participants exploit similar inefficiencies. This gradual loss of profitability - known as alpha decay - often isn’t captured in backtesting, which assumes static market conditions. Alpha decay is particularly relevant in high-frequency trading, where competition and frontrunning are more intense, while it tends to be less of an issue in higher time-frame swing trading.
16. Playing Chess Against Yourself and Expecting to Win Every Time
(Psychological Factors)
Psychological biases still affect fully systematic traders. The assumption that traders will follow their strategy without hesitation or emotional interference rarely holds true in live trading, especially during periods of drawdown or high volatility. Manual and automated traders alike feel the same compulsion after experiencing drawdown. The temptation to tweak or abandon a strategy during this period is strong and often leads to the worst decision. It is well documented anecdotally that many traders find that after modifying a ‘losing’ strategy, the new version performs worse than the original, as it has been adjusted to avoid the losses of the past and misses future gains by virtue of overfitting.
Example:
An algorithmic trader watches as their automated strategy experiences a significant drawdown. Panicking, the trader tweaks the parameters in order to avoid further losses. Shortly after, the original strategy would have recovered, but the modified version continues to struggle as the adjustments were made in reaction to short term losses instead of accounting for long term performance.
Final Note:
Congratulations if you made it this far! This might not be the most exciting topic, but it’s essential knowledge for every trader and investor. This article was written to warn you of the dangers of relying on backtests - and provides a checklist of common pitfalls to watch out for. Whether you’re running your own backtest or reviewing someone else’s, it’s critical to look beyond the shiny numbers and assess the real-world viability. What looks great on paper may not hold up in the real world.
Best of luck in the markets - but remember: stay prudent, and you’ll make your own luck!
BTC Crash to 38K (SHORT) Flash Crash & RecoveryThe market maker may want to get one final flush down to 38k to backtest the January low and flush out all of the long leverage just before they pump the markets. BTC can still flash crash and then turn around and pump within the same weekly candle, avoiding braking the bullish structure. High target could then be 88k to 96k.....
Backtesting strategies using TradingView's replay featureBacktesting trading strategies using TradingView's replay feature is a valuable tool to evaluate the effectiveness of your strategy in different market conditions and timeframes. Here's a step-by-step guide on how to backtest strategies using TradingView's replay feature:
**1. Define Your Strategy:**
- Clearly define the rules and parameters of your trading strategy, including entry and exit conditions, stop-loss and take-profit levels, and any other relevant criteria.
**2. Access the Replay Feature:**
- Open the chart for the GBP/USD pair on TradingView.
- Click on the "Replay" button located at the bottom of the chart. This will activate the replay feature, allowing you to scroll back and forth through historical price data.
**3. Set the Timeframe and Date Range:**
- Choose the timeframe (e.g., 1-hour, 4-hour, daily) that matches the trading frequency of your strategy.
- Select the specific date range you want to backtest your strategy on. You can adjust the date range using the timeline at the bottom of the chart.
**4. Apply Indicators and Drawing Tools:**
- Apply any indicators, drawing tools, or overlays that are part of your trading strategy to the chart.
- Ensure that the parameters of your indicators are set according to your strategy's rules.
**5. Start the Replay:**
- Begin the replay by clicking on the play button in the replay control panel.
- You can adjust the playback speed using the speed slider to simulate different market conditions and trading environments.
**6. Execute Trades:**
- As the replay progresses, identify potential trade setups according to your strategy's rules.
- Manually execute trades (open, close, or modify positions) based on your predefined entry and exit conditions.
**7. Record Results and Observations:**
- Keep track of the performance of each trade, including entry and exit prices, profit or loss, and any deviations from your strategy's rules.
- Take note of any observations or insights gained during the backtesting process, such as areas of strength or weakness in your strategy.
**8. Analyze Results and Refine Strategy:**
- Analyze the overall performance of your strategy, including profitability, win rate, maximum drawdown, and risk-adjusted returns.
- Identify areas for improvement or optimization based on the results of your backtesting.
- Consider making adjustments to your strategy's parameters, entry/exit rules, or risk management techniques to enhance its effectiveness.
**9. Repeat and Iterate:**
- Repeat the backtesting process on different timeframes, market conditions, and historical periods to validate the robustness of your strategy.
- Continuously iterate and refine your strategy based on feedback from backtesting results and real-time trading experience.
By utilizing TradingView's replay feature for backtesting, you can gain valuable insights into the performance of your trading strategy and make informed decisions about its suitability for live trading.
Unveiling Hidden Bullish Divergence: Targeting $156 Fibonacci 📈 Spotting Hidden Bullish Divergence! 🚀
Hey traders! 📣 Keeping an eye on some exciting market dynamics here. Just identified a hidden bullish divergence pattern over the last 2 to 3 days on our charts. 📊 This pattern often signals a potential reversal in the current downtrend and hints at an upcoming bullish momentum.
🔍 Hidden bullish divergence occurs when the price forms lower lows, while the corresponding oscillator (such as the RSI or MACD) forms higher lows. It suggests that even though the price is trending downwards, the momentum behind the selling pressure is weakening, and a bullish reversal might be on the horizon. 📈💡
Now, onto the juicy part – our Fibonacci retracement levels! 🎯 The next fib target we're eyeing is at the $156 mark. Historically significant, this level could serve as a crucial pivot point for the current price action. 🎯💰
Breaking above $156 could trigger a significant bullish move, potentially propelling the price back towards the $365 to $560 range. 🚀📈 So, keep a close watch on this level as it could mark the beginning of a substantial upward trend.
Remember, trading involves risk, so make sure to employ proper risk management strategies. Stay tuned for further updates as we track this exciting development! 💼💰
Disclaimer: This analysis is for informational purposes only and should not be considered financial advice. Always do your own research before making any investment decisions. 📚💡 #TradingView #TechnicalAnalysis #BullishDivergence #FibonacciLevels #MarketAnalysis 📊📈
BAC HKEX BUYHi, according to my analysis of BAC stock. There is a good chance to buy. We notice that the stock started moving very positively. With the arrow exiting the triangle pattern. And breaking the resistance at 29.50. We also notice that a strong green candle is forming outside the pattern, which indicates the power of buyers. good luck for everbody
General Motors: Bear Flag Bearish BacktestGeneral Motors after getting the TSLA Charging Plug collaboration news was able to generate enough energy to come back up to test the Bearish Channel and 55 Week EMA and from there it got a moderate rejection from it. This could be just the start of a greater move down to the zone between the 0.786 and 0.886 Fibonacci Retraces.
I could aslo see a scenario as to where GM and Ford Motors comes down as the Charging Station Stocks such as ChargePoint and maybe Blink rebound back up, as the moves between these after the news report were opposite of each other and they have two opposing setups.
Unlocking Algorithmic Success: #1 Probability Enhancer Revealed!Discover the ultimate indicator for determining if your algorithmic trading strategy is set for success or doomed to fail! Dive deep into this game-changing metric and learn how to optimize your approach for consistent profits. Don't miss this captivating, eye-opening video that will forever transform the way you trade! 💹🚀📈
Be sure to leave a LIKE if you found this information valuable, and drop any QUESTIONS or COMMENTS below! We love hearing your thoughts and ideas. Don't forget to SUBSCRIBE for more insightful content on algorithmic trading!
#AlgorithmicTrading #TradingSuccess #ProfitableStrategies #TradingIndicators
Testing a Youtube MACD StrategyIn previous articles, I’ve tested moving average crossovers and bounces.
But I didn’t test this famous (or infamous?) indicator related to them…
The MACD.
When I saw a video from TradingLab on Youtube called “BEST MACD Strategy,” I was curious to test his approach.
What’s a MACD Daddy-o?
It stands for Moving Averages Convergence Divergence. It’s meant to help us see momentum in the market.
So we take a shorter-duration moving average and pair it up with a longer one.
We then graph the difference between the two as its own line.
We also plot an MA of the difference, called the “signal” line.
When the signal line crosses over the difference line, we might be seeing a shift in direction.
The farther the signal line pushes away from the other, the stronger the momentum is in that direction.
Note: most charting software, including TradingView, also shows the difference as bars (a histogram).
So how are we gonna test this thing?
The Trading Truth Test Setup
We’re keeping the market and the test period the same as some of the previous tests, for easier comparison.
(The TradingLab video just says MACD works in many markets and timeframes, without limiting it to one for testing.)
Market: the S&P 500 index (using SPY to trade it, assuming SPY is exactly 1/10th the S&P 500 Index price)
Timeframe: Jan 2, 2008 to March 28, 2023
Bar interval: 1 hour
Moving averages: Unlike previous tests, where we used simple moving averages, we’re using exponential moving average here to weight recent prices more.
We use a 200 exponential moving average for overall trend direction.
For the MACD, we’re using the classic 12 bars and 26 bars to see the difference between them. And we’re the normal 9-bar MA of that difference as the signal line.
Starting Equity: $ 25,000
Max % of Equity Per Trade: 3%
Commissions, fees and taxes. To keep things super simple, we’re assuming these are all zero.
Our Test
When we get a MACD crossover between the signal line and the difference line, we look to go long.
But we only go long if:
the last closing price is above the 200 MA, and
When an upside MACD crossover (the signal line crossing up through the difference line) happens below its zero line (the lower half of the plotted indicator area).
We do the opposite to go short…
We short when price closes below the 200 MA and we get a downside MACD crossover above the zero line.
Our stop loss is 1 penny past the 200 MA value when entering the trade.
And our take-profit price is the difference between the entry price and the 200 MA (on entry) multiplied by 1.5. That’s the suggestion in the TradingLab video.
Note: The Youtube video suggests using support and resistance as another filter to avoid choppy markets. But there aren’t clear rules given, so I didn’t do that.
The Test Results
The test ended at $ 30,401.39, up 21.6% with a 46.9% win rate.
The biggest loss from the initial $ 25,000 deposit was $ 270.85, a 1.1% loss.
The maximum losing streak was $ 800.22 or 3.0% (from $ 26,908.66).
That said, the buy-and-hold return was 173.1%.
Quite a reward for sitting on your hands, especially given the tax advantages from long-term capital gains.
Note: I did this analysis in a spreadsheet, with exported TradingView data. If you see any errors, please let me know.
What Test Tweaks We Could Make
We could identify rules on when to stay out of the market.
MACD strategies, like many, get chopped up in sideways price action.
Some other MACD settings might also be interesting to test. We used only the most common settings here.
What would you test? And what else would you like to see tested?
Comment below!
Are Keltner Channel Bounces Worth Trading?Since I tested Bollinger Bands in the last article , what’s natural to think of testing next?
Rubber bands? Rock bands?
No, you silly goose! Keltner Channels…
What’s the Difference Between Keltner Channels and Bollinger Bands?
Bollinger Bands are based on chunks (called “standard deviations”) away from an average.
Keltner Channel bands are based on multiples of the average true range (ATR) away from the average.
Alrighty then. Let’s get into our test setup…
The Trading Truth Test Setup
We’re keeping this the same as our Bollinger Bands test, except for the ATR period.
Since we’re using ATR to determine the Keltner Channels, we’re going with the same period as the moving average.
Market: the S&P 500 index (using SPY to trade it, assuming SPY is exactly 1/10th the S&P 500 Index price)
Timeframe: Jan 2, 2008 to March 28, 2023
Bar interval: 1 hour
Moving averages: 50 bars (simple moving averages, meaning every bar gets equal weight, unlike with exponential)
Average true range: 50 bars
Starting Equity: $ 25,000
Max % of Equity Per Trade: 3%
Commissions, fees and taxes. To keep things super simple, we’re assuming these are all zero.
Our 2 Tests
Test A:
We’re using Keltner Channel bands 2 ATRs away from the moving average.
Any time a high pierces the upper Keltner band and then a high is below the band, go short (if we’re not already in a trade).
Any time a low pierces the lower Keltner band and then a low is above the band, go short (if we’re not already in a trade).
This way, we’re waiting for a cross back over the band after it gets pierced.
We didn’t do this for our Bollinger Bands tests, which makes this not a direct performance comparison.
Test B:
The same as Test A, except we’ll use Keltner bands 3 ATRs away from the MA instead of 2.
The Test Results
Test A's equity ended at $ 38,137.63, up 52.6%. The biggest loss from the initial $ 25,000 deposit was $ 843.16, a 3.4% loss. The maximum losing streak was $ 1,805.75 or 6.36%.
Test B's equity ended with $ 34,435.71, up 37.7%. The biggest loss from the initial $ 25,000 deposit was $ 3,027.42, a 12.1% loss. The maximum losing streak was $ 2,080.71 or 8.22%.
The worse results 3 ATRs away from the MA is surprising. Seems like that’d give us higher-quality trades.
Even Test A’s numbers don’t come close to what plain-Jane buy and hold did: ending up 173.1%.
Note: I did this analysis in a spreadsheet, with exported TradingView data. If you see any errors, please let me know.
What Test Tweaks We Could Make
Some traders wait for when Bollinger Bands or Keltner Channels get pinched (narrower in width). That’d be interesting to test vs bounces.
One well-known trader, John Carter, looks for when Bollinger Bands go inside (“squeeze into”) Keltner Channels. He sees that as an indicator of bigger-than-normal moves.
What would you test? And what else would you like to see tested?
Comment below!
Testing a Famous Indicator 2 (& 3) Steps Beyond Moving AveragesSince trading is all about having a statistical edge (well, if you wanna make a living at it)...
How about we use an indicator with deeper insight than averages?
It’s called the Bollinger Band, and it’s what we’re testing today.
What the Heck Is a Bollinger Band?
Without getting all mathy on you (the formula is gnarly), imagine slicing up a regular bell curve in sections.
The middle section (first standard deviation) has about 68% of the data.
A broader chunk (2 standard deviations, which includes the first) has about 95%.
And the widest chunk (3 standard deviations, including the first 2) has 99.7%
Whenever price pierces one of the bands, we look to take a trade. We’ll test this in 3 ways, which we’ll dig into after laying out our basic setup…
The Trading Truth Test Setup
Market: the S&P 500 index (using SPY to trade it, assuming SPY is exactly 1/10th the S&P 500 Index price)
Timeframe: Jan 2, 2008 to March 28, 2023
Bar interval: 1 hour
Moving averages: 50 bars (simple moving averages, meaning every bar gets equal weight, unlike with exponential)
Starting Equity: $25,000
Max % of Equity Per Trade: 3%
Commissions, fees and taxes. To keep things super simple, we’re assuming these are all zero.
Our 3 Tests
Test A:
Any time a high pierces the upper band 2 standard deviations away, go short (if we’re not already in a trade).
Any time a low pierces the upper band 2 standard deviations below, go long (if we’re not already in a trade).
Take profits and losses 2 average true ranges (ATRs) away from the previous close.
Test B:
The same as Test A, except we’ll use 3 standard deviations, instead of 2.
Test C:
Any time a high pierces the 3-standard-deviations upper band, exit a long position and go short.
Any time a low pierces the 3-standard-deviations lower band, exit a short position and go long.
We’re not using ATRs to take profits and losses on this one.
The Test Results
Test A ended down at $20,810.61, down 16.8%. From equity high to equity low, this strategy had a 19.0% drawdown.
Test B ended with $22,818.73. So, we lost 8.7%, with a 9.2% peak-to-trough drawdown. Waiting for price to pierce 3 standard deviations helped reduce our loss.
Test C ended with $25,127.75, a 0.5% gain, with a 15.1% equity high-to-low drawdown.
But but but… buy and hold once again came out the winner by far, up 173.1%.
Note: I did this analysis in a spreadsheet, with exported TradingView data. If you see any errors, please let me know.
What Test Tweaks We Could Make
For Tests A and B, I’d be curious to test waiting for at least a 1-bar price reversal after a Bollinger Band is pierced.
That way, we’d have some momentum back in the trade direction before jumping in.
Test C seems to show this, since we only exit trades when a band gets pierced going in the opposite direction. Still, the results are basically breakeven, so some other rule(s) may help there.
What would you test? And what else would you like to see tested?
Comment below!
EURAUD trendline breakout | Up to 1.1%EURAUD
Timeframe: 1 Hr
Short Day Trading Position
Initial Take Profit : 1.602 (to the nearest Higher Low)
TP2: 1.595 (Second Higher Low)
SL: 1.62 (Breaking the structure)
The pair is in an upward trendline since the beginning of the week. It broke the small trendline on the 30 minutes timeframe, then broke the 1 hour trend, and it is showing a potential downside movement back to the heads of the trend. Traders should be cautious and monitor key levels of support and resistance , as well as any further bearish signals that may confirm this potential move.
I would be grateful to get your feedback for this idea if you have any opinion to share.
✽↝✔
Esteem your Analysis and seek improvements ⌁
@AbdullahTech ♾
Which Moving Average Strategy Crushes MA Crossovers? This...If you read last week’s article, you saw results for the famous (or infamous!) moving average crossover.
It bombed vs buy and hold over the last 10 years, even when using take-profit and stop-loss levels.
So, how do moving average bounces perform with the same exit levels?
That’s what we’re testing today…
The Trading Truth Test Setup
Our setup is the same as last time, except we just need one moving average.
Market: the S&P 500 index (using SPY to trade it)
Timeframe: Jan 1, 2013 to January 31, 2023
Bar interval: 30 minutes.
Moving averages: 50 bars (simple moving averages, meaning every bar gets equal weight, unlike with exponential)
Starting Equity: $25,000
Max % of Equity Per Trade: 3%
Commissions, fees and taxes. To keep things super simple, we’re again assuming these are all zero.
How Is “Bounce” Defined?
Traders look for ricochets off moving averages in a bajillion ways.
Let’s be real: most just eyeball charts without real rules.
That won’t work for rigorous renegades like us, though. :-)
So, for Test A, here’s how we defined a bounce when price is above the MA:
A price bar’s low is above the moving average
The next price bar’s low touches or pierces the MA for one bar. (A close below the MA is ok.)
The bar touching or piercing the MA can’t go more than 0.5% below the MA
The next bar’s low must again be above the MA.
Flip these rules for a bounce when price is below the MA.
I know, I know… many bounces don’t happen until 2 bars (sometimes more) hover on or below the MA. We're keeping the criteria here simple.
We define Test B the same way, except with an extra filter:
The 50-bar MA needs to be sloping up at least 0.5% over the last 25 bars for long trades (and -0.5% or less for short trades).
Alrighty, now, let’s check out the results…
The Test Results
Like with the MA crossovers test before, let’s first look at how plain ol’ buy and hold did over the same period.
If you parked your cash in the S&P 500, your money would be worth 2.9 times as much by the end. Pretty good.
So how did Test A do?
The ending equity after 10 years was $40,112.74, 1.6 times your money with 24.27% max drawdown.
Test B, in which we only took trades if the MA was sloping (trending) enough, we ended with $43,149.00, for a 1.7x return with only 17.75% max drawdown.
That makes the return on risk much better than Test A.
Yet, while these returns beat the pants off of our MA crossover tests, boring old buy and hold still whooped them both.
What Would You Change About This Bounce Strategy?
Trade a different market?
Longer or shorter time frame?
Tweak how a bounce is defined?
Comment below to share. Also, please let me know: what else do you want to see tested?
P2P | Deep Dive Into My SetupsHello family! Sending you all love and light today.
So I wanted to do an in-depth video about my style of attacking the markets now. I unlocked a new way to view my trades and I believe it just leveled up my confidence a TON!
So I will keep this description brief and go along with the day.
Thank you guys and gals, lets keep making it happen on trade at a time!
ADX + DMI + LineReg Live TradingI used the replay trade function to test out ADX+DMI + using a LineReg to set TP + SL areas. I thinked it worked pretty well trading USD/JPY for the week of 1/9/2023. Success rate was 66.67% but I wasn't having strict trading rules since I was trying to trade how a normal would psychologically. I think with follows stricter rules this could have higher percent win rate & higher profit. Even with losses I was hit with I still cleared over $2000 for the week. Please ignore my girlfriends family as they are cleaning out a closet lol
🟨 Ned Davis - 3 Day Price Thrust The market triggered last week the Ned Davis 3 Day Price Thrust Trigger Indicator - indicator available in my profile.
The Thrusts occur when the S&P 500 rises at least 1.5% for one day, at least 1.15% for a second day, and at least 1.5% on the third day. The record since 1970 is perfect one year later. However, the prior18 cases, ending in 1938, only show 11 out of 18 profitable one year later.
We have backtested this for you and show you the result.
Bare in mind that the FED is speaking this week, which always brings extra volatility.
SPX May Rally to Backtest H&S Neckline or Fill GapsPrimary Chart
SPX may rally this week to backtest the H&S neckline (now resistance) where SPX price experienced a downward breakout in late August 2022. So far, price action has come off the lows last week with some force and velocity.
Short-term price targets are 4106 first, and if that level holds, then 4137 and 4187. Much depends on the CPI print on Tuesday.
Bollinger Bands on the 2-hour chart show increasing directional volatility with an upward bias into this week.
Bollinger Bands on the daily chart have begun to narrow, showing that the trending downward move is temporarily paused while price chops within the recent range. Chop includes the current rally to retrace a substantial portion of the recent downtrending move since August highs.
Further technical evidence supporting ongoing choppy price action arises from the SPX triangle pattern discussed last week , where SPX bounced right off the lower trendline of the triangle—which is an upward trendline from June 2022 lows.
The H&S neckline where a backtest may occur is shown on the Primary Chart above. This area is around 4130-4150 SPX.
Two gap fill areas lie above the H&S breakout area around 4219 and 4279. If CPI on Tuesday comes in better than expected, these gap-fill areas could be filled before the downtrend resumes.
Fibonacci levels of resistance and support include a cluster of support from 4054-4072, 4106 (coinciding with the H&S neckline that may be backtested soon), 4137, 4187, and 4231. See Supplementary Chart A with Fibonacci Levels chart below.
A supply / resistance zone is near 4200-4220, coinciding with the lower gap-fill area.
Supplementary Chart A: Fibonacci Levels to Watch over The Next Week
Please note that this technical-analysis viewpoint is short-term in nature . This is not a trade recommendation, and countertrend trading, e.g., trading a rally in a bear market, is tricky and challenging even for the most experienced traders. Countertrend trades are lower probability trades as well.
Author's Comment: Thank you for reviewing this post and considering its charts and analysis. The author welcomes comments, discussion and debate (respectfully presented) in the comment section. Shared charts are especially helpful to support any opposing or alternative view. This article is intended to present an unbiased, technical view of the security or tradable risk asset discussed.
DISCLAIMER: This post contains commentary published solely for educational and informational purposes. This post's content (and any content available through links in this post) and its views do not constitute financial advice or an investment recommendation, and they do not account for readers' personal financial circumstances, or their investing or trading objectives, time frame, and risk tolerance. Readers should perform their own due diligence, and consult a qualified financial adviser or other investment / financial professional before entering any trade, investment or other transaction.
SP:SPX
AMEX:SPY
CME_MINI:ES1!
Backtesting Made EasyBacktest with me. the best way to trade..
A Daily Reminder:
avoid imbalances—HH and LLs or LH and HLs.
P.S: Strategy— structures, divergence & trends
Triggers— LHs & HLs
My disclaimer:
All biases are subject to change because according to the market, that's the only constant..
Past profits do not predict future earnings. Risk only 1% on your account. Low risk only!