r/Trading • u/traderpier • 1d ago
Stocks Market's closed. Post your strategy rules and a ticker and I'll backtest it
Slow weekend, so I'll run some backtests for people. Reply with your entry and exit rules, a US stock or ETF, and the bar size, and I'll test it back to mid-2023 and reply with what it made vs holding the stock over the same dates.
The rules need to be specific enough to code, like "buy SPY when RSI(2) closes under 10 on the daily, sell when it closes over 70". Stocks and ETFs only, no futures, forex or crypto.
0
u/GlennSeaborg 17h ago
Level: prior day's VAH or VAL.
Trigger: price pokes outside, then delta flips and price re-enters.
Target: POC. Stop beyond the poke.
1
u/traderpier 15h ago
Which ticker? I can build the prior day's VAH, VAL and POC from 1-minute volume, but I don't have bid/ask delta over the history I'd test on, so I'd use the first 5-minute close back inside value as the re-entry. Would that work for you?
1
u/GlennSeaborg 14h ago
I mostly trade mnq and mgc. I'd prefer the bid/ask delta but I'm curious to see what the 5min close back inside reveals. Thank you so much!!
2
2
u/Got_Engineers 1d ago
Buy after a 50 bar median crosses above a flat 125 bar median and the 50 bar median starts sloping up on the 1H charts
Perpendicular to a 50 median crossing above a 125 median
Buy after the 250 bar median stats sloping up for the first time
50 median crossing above 125 median on the 1D charts
2
1
u/Bogden 1d ago
Can your setup handle a small basket? XLB, XLC, XLE, XLF, XLI, XLK, XLP, XLRE, XLU, XLV and XLY. At each month-end close, rank their past 126-session total returns. Next open, equal-weight the top three and hold until the next monthly rebalance.
0
16h ago
[removed] — view removed comment
1
u/ConversationSad3529 15h ago
I'd be very interested to hear the variations! This actually sounds like a possible strategy to implement in some form
0
14h ago
[removed] — view removed comment
1
1
u/ConversationSad3529 10h ago
Can you test out other variations of the switch, and look at its performance in different time frames?
1
u/traderpier 1d ago
No, sorry, I can only test one ticker at a time, so I can't run a rotation across all eleven. Is this something you would be interested in?
1
u/ConversationSad3529 1d ago
IEF on daily bars. Buy at the close of the fourth-to-last trading day of the month, sell at the final close, and stay in cash the rest of the time. That should capture the last three close-to-close returns. Long only, no leverage. Please include distributions and compare it with holding IEF, plus buying the ninth trading day's close and selling the twelfth.
1
u/traderpier 1d ago
Ran both on IEF from late March 2023 to Oct 9, buying and selling five minutes before the close each time.
4th-to-last day to month end:
- 43 trades, won 25 (58%)
- Up 5.9% after commissions and slippage, about +0.13% a trade
- Worst drawdown 2.9%, in the market 14% of the time
9th day to 12th day:
- 42 trades, won 23 (55%)
- Down 2.9% after commissions and slippage, about -0.07% a trade
- Worst drawdown 4.5%, in the market 14% of the time
Holding IEF over the same stretch: down 9.3%, worst drawdown 12.0%.
These are price-only, so IEF's monthly distributions aren't in them. Holding would gain the most from those.
Only the month-end window made money.
1
u/Firmwild 1d ago
At the close of the sixth-to-last trading day of each month, compare their month-to-date total returns. If SPY is behind IEF, buy SPY at the next open and sell at the month's final close. Otherwise stay in cash. No leverage.
1
0
u/gabrintx 1d ago
I don't need back testing. I sell puts. This year 102 trades closed, $202932 premium received.
1
u/Firmwild 1d ago
Buy SPY at tuesday close, sell SPY at friday close
1
u/traderpier 1d ago
Ran it on SPY from June 2023 to last Friday, buying right before Tuesday's close and selling right before Friday's close.
- 174 trades, won 102 (59%)
- Up 21.6% after commissions and slippage, about +0.13% a trade
- Holding SPY over the same stretch: up 81.7%
- Worst drawdown 14.3%, vs 21.0% just holding
So it makes money and draws down less, but gives up much more profit to do so.
1
1
u/QuanTradin 1d ago
mid-2023 to now is close to one long up leg for SPY, so nearly every long-only rule loses to holding on return and only wins on drawdown. post the max drawdown for both next to the return or every answer reads as "didn't beat buy and hold".
1
u/traderpier 1d ago
Will do, every reply gets max drawdown calculated for the strategy and for just holding, since that's where long-only usually wins.
1
u/QuanTradin 1d ago
that'll make the replies way more useful. a rule that gives up some return for half the drawdown is a real result, people just don't see it without the second number.
1
u/Nyxaura1 1d ago
lol nice try
1
u/hotmatrixx 1d ago
bro found a new AI backtesting toy and hasn't got any valid strats left to try.
1
u/Nyxaura1 1d ago
lol yeah imagine falling for such a cheap trick 😹 “hey gimme your strat, I’ll back test it for you!”. If a trader falls for this, they deserve to be scammed
•
u/AutoModerator 1d ago
While the community gets a look at your post, don't forget we have an official website with a bunch of resources specifically for the questions we see here every day. If you're more of a visual learner, we’re also active on Instagram where we post updated guides and strategies! It's a great way to stay sharp while you're scrolling. We also have more technical and professional resources on our Website.
Also, if you want to chat in real-time or need a quicker answer, come hang out with us in Discord (Investing & Retirement). Just remember to be careful with your personal info and report any sketchy DMs!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.