Beating the S&P500 (SPX) Buy&Hold strategy by 16 timesS&P500 (SPX) strategy using Stochastic RSI Min-Max, normalized Volatility and Trailing Stop signals, beats the Buy&Hold strategy by 16 times
Embarking on the quest to time the market accurately, the 'Holy Grail' of strategies, led me to create a script to approach this goal. Unlike other strategies that I tested, this one not only surpasses the long-term S&P500 Buy&Hold approach but does so by a remarkable 16.38 times!
Initially, I employed an A.I. program based on an LSTM Neural Network using TensorFlow. Despite achieving a 55% next-day prediction accuracy for short/long positions, I sought improvement using a heuristic pine-scripting approach, incorporating stochastic RSI oscillators, moving averages, and volatility signals.
With default parameters, this strategy, freely available as "XPloRR S&P500 Stock Market Crash Detection Strategy v2" delivered a staggering 2,663,001% profit since February 1871. In the same period, the Buy&Hold strategy "only" generated 162,599% profit. Picture this: a $1,000 investment in 1871 would now be worth $26,630,014 by February 2024. Check it out for yourself loading this strategy.
The script operates as a Stochastic RSI Min-Max script, automatically generating buy and sell alerts on the S&P500 SPX. What sets it apart? The strategy detects "corrections," minimizes losses using Trailing Stop and Moving Average parameters, and strategically re-enters the market after detecting bottoms using tuned Stochastic RSI signals and normalized Volatility thresholds.
Tailor its parameters to your preference, use it for strategic exits and entries, or stick to the Buy&Hold strategy and start new buy trades at regular intervals using buy signals only. In the pursuit of minimizing losses, the script has learned the effectiveness of a 9% trailing stop on trades. As you can clearly see on the upper graph (revolving around 100), the average overall green surfaces (profits) of all trades are much bigger than the average red surfaces (losses). This follows Warren Buffets first rule of trading to "Never lose money" and thus minimizing losses.
Update: Advanced S&P500 Stochastic RSI Min-Max Buy/Sell Alert Generator
I have also created an Alerter script based on the same engine as this script, which auto-generates buy and sell alert signals (via e-mail, in-app push-notifications, pop-ups etc.).
The script is currently fine-tuned for the S&P500 SPX tracker, but parameters can be fine-tuned upon request for other trackers or stocks.
If you are interested in this alerter-version script or fine-tuning other trackers, please drop me a message or mail xplorr at live dot com.
How to use this Strategy?
Select the SPX (S&P500) graph and set the value to "Day" values (top) and set "Auto Fit Data To Screen" (bottom-right).
Select in the Indicators the "XPloRR S&P500 Stock Market Crash Detection Strategy v2" script and set "Auto Fit Data To Screen" (bottom-right)
Look in the strategy tester overview to optimize the values "Percent Profitable" and "Net Profit" (using the strategy settings icon, you can increase/decrease the parameters).
How to interpret the graphical information?
In the SPX graph, you will see the Buy(Blue) and Sell(Purple) labels created by the strategy.
The green/red graph below shows the accumulated profit/loss in % of to the initial buy value of the trade (it revolves around 100%, 110 means 10% profit, 95 means 5% loss)
The small purple blocks indicate out-of-trade periods
The green graph below the zero line is the stochastic RSI buy signal. You can set a threshold (green horizontal line). The vertical green lines show minima below that threshold and indicate possible buy signals.
The blue graph above the zero line is the normalized volatility signal. You can set a threshold (blue horizontal line) affecting buy signals.
The red graph above the zero line is the slower stochastic RSI sell signal. You can set a threshold (red horizontal line). The red areas indicate values above that threshold.
However real exits are triggered if close values are crossing below the trailing stop value or optionally when the fast moving average crosses under the slow one. The red areas above the threshold are rather indicative to show that the SPX is expensive and not ideal to enter. Please note that in bullish periods the red line and areas can stay at a permanent high value, so it is not ideal to use as a strict sell signal. However, when it drops below zero and the green vertical lines appear, these are strong buy signals together with a high volatility.
These Parameters can be changed
Buy Stochastic Lookback
Buy Stochastic Smoother
Buy Threshold
Buy Only After Fall
Minimum % Fall
Sell Stochastic Lookback
Sell Stochastic Smoother
Sell Threshold
Sell Only With Profit
Minimum % Profit
Use Sell MA
Fast MA Sell
Slow MA Sell
MA Sell Threshold
Use Buy Volatility
Volatility Smoother
Volatility Threshold
Use Trailing Stop
Use ATR (iso of a fixed percentage for the trailing stop)
ATR Lookback
Trailing Stop Factor(or fixed percentage if "use ATR" is false)
Trailing Stop Smoother
Important : optimizing and using these parameters is no guarantee for future winning trades!
Exponential Moving Average (EMA)
EURUSD, AB=CD at 61% Fib, at 4H chart 200EMA & at 20 Daily EMA A potential area for a low-risk high-reward trade.
The area marked is an AB=CD move that will happen above a prior high which means stops might be taken which will provide ample liquidity for a move down.
Additional confluence - this happens at the 61% Fib retracement level, and also the 200EMA of the 4-Hour Chart. Overall the price is at the 20 Daily EMA area so hope for a bounce from there.
One option is to enter at the level with a Stop Loss based on the ATR. I am mindful that the 78% retracement is also great for a short, but we might miss the move. Another option is to wait for some price action confirmation in the form of a good entry bar, but it will require a bigger stop loss.
Algorand(ALGO): Good Time To Buy?Algorand seems to be having a pretty decent bounce from the daily 200EMA, which can be a start to a good potential upward movement here.
We are looking for those upper target zones as long as we are above 200 EMA; upon breaking the 200 EMA, we will most likely see a sharp movement to the lower zones!
Swallow Team
VeChain(VET): Waiting For A Breakdown!Another coin that is looking promising is VeChain, where we are looking for a potential breakdown that would result in a nice downward fall in the market price.
We are going to look for a breakdown as long as we are below that 200EMA, so keep an eye sharp for this one!!
Swallow Team
Dogecoin(DOGE): 2 Potential Scenarios To TradeAs Dogecoin is in a "calm before the storm" situation, we are looking here for two potential trades that can be taken: bullish and bearish scenarios.
For Bullish scenario we need to break at least that 100EMA which would activate two potential long positions where for Bearish sceanrio we need to close price below 200EMA and secure it fully for a potential 22% of marketprice movement!
Swallow Team
CMG - it might be expensive but the value is there LONGCMG on the weekly chart has been uptrending for a year after being rangebound sideways for a
year. It has seen a volume spike and corresponding price action with the current earnings beat
Price rose 60% in the past year and 16% YTD. This is not linear and nor is it parabolic.
The MACD supports the bullish momentum observation in the price action while the RS indicator
shows good strength in both shorter and longer time frames. This is a blue chip megacap for
sure. While it is not technology like the MAg7, the food business is lucrative. the CEO in the
earnings call announced plans to expand to 7000 stores nationally. This is ambitious. Those who
are ambitious investors or traders and are well funded could consider adding some shares
or even a few options of CMG. I am going with a few options OTM at $3000 six months out.
I believe that I will be well rewarded for the risk taken especially given the expansion plans
and the historical track record here.
ONEUSDT.PIn the 1-hour time frame, the 1-hour order block (OB) hasn't been confirmed yet. Its confirmation depends on the 1-hour break of structure (BOS), which hasn't validly broken the recent low. If a short position is taken with a target set at the 4-hour order block, there might be fluctuations before bouncing from that zone.
On the flip side of this analysis, the 1-hour order block is not confirmed as a take-profit point for a long position.
Chainlink(LINK): Getting Ready For Another Rejection?LINK coin is another one that caught our attention with a great possibility of downward movement here!
We see that upon reaching that upper line of BB, we are getting rejected multiple times and now we are seeing that last time we had reaction, we had a really nice attempt to move further but we got stopped by 100EMA
We are looking here for a good rejection to happen (another one), and once we get it, we will be looking for a short here!
Swallow Team
Decentraland(MANA): Should We Buy or Sell?MANA has been pushed to the end of a tight gap where the price is nearing a breakout or breakdown soon.
We are looking here more for that downward movement to happen but we might as well see a quick liquidity breakout, which would result in a price movement towards EMAs
Swallow Team
Bitcoin(BTC): Get Ready, We Might See A Fall Soon!As Bitcoin is hunting those upper liquidity zones, we are looking for the price to hover for some time there and eventually move and test that $40K zone.
Currently, after a significant breakout from the $40K zone, we are seeing that volume is slowly fading away, which indicates a potential re-test to happen soon!
Swallow Team
Aave(AAVE): 200 EMA Broken!!!! Now Where? Coin has broken so compliantly that 200EMA is currently re-testing this same EMA.
As long as this re-test holds its zone, we might see some further movement to the lower zones, but if the re-test fails and moves slightly to the upper zone, we might move towards our upper, smaller resistance that we displayed as "orange" zones!
Swallow Team
Hooked Protocol(HOOK): 200EMA Holding Strong!!200EMA has been tested multiple times and has been holding strong! With the bullish movement it has been having, it shows good strength for potential growth here, for sure, but we need to keep an eye on that EMA!
As long as we are above the 200EMA, we are going to go further to the upper zones! Once the 200EMA is broken and secured by sellers, we can see some major corrections for HOOK to come!
Swallow Team
Polkadot(DOT): Looking For Short 👀 DOT is looking for a good entry to move to lower zones, it seems.
After another touch at 200 EMA, the price has bounced back up but remains in between 100 and 200 EMA.
We are monitoring for market price movement here and any potential correction to upper zones or a potential breakdown from 200EMA.
Swallow Team
Binance Coin(BNB): Waiting For $335 ZoneBNB has been showing some massive strength here, where prices bounced nicely from 200EMA and 100EMA as well.
$335 zone has been a point of interest for us, and with the current push, we are seeing pretty high price changes heading there!
Once we are there, we will be looking for any potential downward movement or rejection from there!
Swallow Team
EURJPY 30m chart potential Falling wedgeThe the 30m chart the EURJPY is forming a potential falling wedge. On the chart infront, you can discover a bullish market structure
Additional confluences:
- Price has dropped to the support range created from the previous major high
- The price is testing the 0.382 Fib. Have in mind that the 0.5 and the 0.618 levels are also in the support range so it is possible for the price to drop lower. If it does, monitor if it's still in the ranges of the falling wedge. If it goes out of them, then the pattern will be invalidated.
- Price is close to the 200 EMA, Might drop a bit lower to test it before providing a potential breakout of the pattern to the up side
Gold at a crossroad, 200 USD+ move, massive symmetrical triangleThis is a Daily chart for Gold. On it we can notice that the price has formed a massive symmetrical triangle. As per the deffinition of the pattern, after the price produces a breakout up or down, the potential movement can be equivalent to the distance between the highest and the lowest points in the pattern. This is about 215 USD movement
If the price breaks to the up side, according to the pattern, it can reach levels of about 2250 - 2270. If it breaks down then it can drop close to the 1800 level
Additional confluence:
- On the daily chart, the price has been showing a lot of respect towards the 50 EMA. On the latest drop it hit it and bounced straight up from it. On the 4H chart, the situation is similar with the 200 EMA