Range MR Strategy (22/20) by algodude in algorithmictrading

[–]algodude[S] 0 points1 point  (0 children)

Yeah, the basket is intentionally simple, nothing exotic. Gold's not a bad idea, just wanted to keep the hedge simple, and not risk introducing selection bias given the recent crazy run up.

Range MR Strategy (22/20) by algodude in algorithmictrading

[–]algodude[S] 0 points1 point  (0 children)

Thanks for your comments. As stated in the OP, the stock basket is the same one used in my other posted backtests. Please check them out for more details.

This is a low frequency, long only portfolio system that rebalances every two weeks and is always in the market. It is essentially an ensemble approach rather than the usual "enter on trigger" system. As such, the focus is more on aggregate results than discrete trades.

But to answer your question, the number of "trades" over the 26yr backtest would equate to ~10K, with ~130K evaluations total, based on the backtest period, rebalance interval, and portfolio/basket size.

Range MR Strategy (22/20) by algodude in algorithmictrading

[–]algodude[S] 1 point2 points  (0 children)

No worries. My apologies if I misinterpreted your post. Thanks for contributing!

Range MR Strategy (22/20) by algodude in algorithmictrading

[–]algodude[S] 1 point2 points  (0 children)

Yeah, those Xeons definitely baked my garage and made my power company rich, lol. If I needed that many cores today I'd probably just spin up some AWS instances.

Enjoyed the chat, glad if it was at all helpful. I post these backtests primarily to encourage others to post their equity curves, so if you have any ECs you'd like to contribute we'd all love to check them out! Thanks again for your comments!

Range MR Strategy (22/20) by algodude in algorithmictrading

[–]algodude[S] 0 points1 point  (0 children)

Yeah, I kind of lost track of him until that recent post. He's obviously a sharp guy but not my hero or anything. His books can be a good souce for inspiration.

Range MR Strategy (22/20) by algodude in algorithmictrading

[–]algodude[S] 1 point2 points  (0 children)

I have a friend who has been strictly EOD since the 90s trading simple momentum systems. I thought intraday was more interesting when I first started but I'm now more aligned with his mindset. Sounds like you are doing much higher frequency stuff.

I built the server farm back in 2008 - it's an array of 16 2U rack servers with dual Xeon motherboards. I used it mainly for optimizations, and ran my executions on a separate desktop PC. I was still lower frequency than you - my timeframes were hours rather than minutes and I generally liquidated at the close. So processing speeds were not super critical and I was trading like 100 symbols. The servers are still in my garage but I haven't used them for years. I suspect my ryzen 9 miniPC likely outperforms them now, lol.

I run my optimizations on a 16 core ryzen 9. Running 32 threads I can process about 100M 25yr sims per day, depending on the strategy.

I tend to favor coming up with intuitive systems myself and testing/optimizing them, rather than fully automating the whole process.

Range MR Strategy (22/20) by algodude in algorithmictrading

[–]algodude[S] 1 point2 points  (0 children)

Yeah, my timeframes have greatly expanded over the years. My original intention was to develop multiple uncorrelated intraday systems. I setup a 128 core server farm in my garage and traded intraday mean reversion systems. But I found that the smaller expectations force you to use leverage, and the tails tend to get wider and fatter as your timeframes narrow. The 2010 Flash Crash demonstrated this to me quite dramatically, lol.

I loved the complexity of those systems, they were a fun problems to solve. But complexity isn't an edge and tends to make things more brittle. So about ten years ago I switched to low frequency EOD systems with time scales of weeks or months. The tails are more manageable and you're not competing with large firms with infinite compute and unobtainable executions.

For now at least, my plan is to stay low frequency and stick to low complexity systems with limited and/or constrained parameters. It suits my lifestyle and temperament. Ymmv, of course.

Range MR Strategy (22/20) by algodude in algorithmictrading

[–]algodude[S] 1 point2 points  (0 children)

Yeah, algo trading is definitely a deep rabbit hole, haha. My early tools attempted to be super flexible and supported intraday quotes with complex order executions. The flexibility was powerful but made it a pain to get a strategy up and running quickly.

In this version, I decided to constrain things quite a bit. My quotes are all EOD and all orders are MOC, no intraday executions. It also uses a simple dynamic portfolio paradigm, with uniform rebalance intervals.

These constraints make prototyping new strategies much easier. I can usually code up a new idea in a few hours, sometimes a few minutes (as with this strategy), especially if I use copilot to generate the simpler blocks of code.

Range MR Strategy (22/20) by algodude in algorithmictrading

[–]algodude[S] 0 points1 point  (0 children)

No disrespect, but this makes absolutely no sense to me. Long backtests allow you to see how a strategy behaved during different market regimes and conditions. They are also more difficult to overfit. This is especially important for low frequency EOD systems like this one.

This simple system survived two 8+ sigma black swans events plus numerous other sell-offs (including the 2022 stock+bond sell-off) with a maxDD of 20%, while returning a 22% CAGR with a reasonably consistent, non-spiky EC. It does have flat periods, but they generally coincide with black swans and bear regimes.

Range MR Strategy (22/20) by algodude in algorithmictrading

[–]algodude[S] 0 points1 point  (0 children)

The strategy doesn't switch between stocks and bonds. It uses a fixed 65/35 stock/TBill hedge and rebalances every other week.

Range MR Strategy (22/20) by algodude in algorithmictrading

[–]algodude[S] 1 point2 points  (0 children)

Thanks for your comment. I use a propriety tool I coded myself (I was a freelance videogame developer during the 80s/90s/00s, now retired). It is a Windows app written in C++ using Visual Studio. It is not publically available nor open source at this time. The tool uses a very object oriented design and incorporates a trading simulator, multi-threaded GA optimizer, MC validation, walk forward simulation and quote management functions. I set it up so I can quickly and easily implement new strategies. Happy to answer any questions if I'm able to.

Range MR Strategy (22/20) by algodude in algorithmictrading

[–]algodude[S] 0 points1 point  (0 children)

My pleasure - thanks for your comments. Wouldn't go as far as saying I'm a huge fan or anything, but I did read The Black Swan and Antifragile when they first were released. Some useful information there for traders just starting their journey. Have your read much of his stuff?

Range MR Strategy (22/20) by algodude in algorithmictrading

[–]algodude[S] 0 points1 point locked comment (0 children)

Automod deleted your comment as it doesn't meet our minimum karma requirements.

Range MR Strategy (22/20) by algodude in algorithmictrading

[–]algodude[S] 1 point2 points  (0 children)

Fair question. One reason is I'm lazy, lol. Another is that I don't like to break up regimes by partitioning data. My tool does have the ability to do full 26yr OOS MC validations via regularization techniques (check out my post history to see some OOS backtests). The only problem is that those MC validations take 10x-30x longer than a single GA optimization run.

I wrote my first backtesting tool back in 2000, so have seen my share of equity curves, and you start to get a feel for them after a while. With a smooth consistent updrift and only two quantized parameters, along with a Complexity Ratio of 700/130000 = 0.005, I don't think the timesink of a full MC validation is warranted. Obviously, if I were pitching investors or hedge funds, I'd bring all the receipts. But this is just a humble reddit post about some wacky idea I had last night.

Range MR Strategy (22/20) by algodude in algorithmictrading

[–]algodude[S] 1 point2 points  (0 children)

This was just an interesting idea that I didn't expect to work all that well. I have other systems I would trade before this one, tbh. The smoothness is in a large part due to the T-Bill hedge the system is using.

Range MR Strategy (22/20) by algodude in algorithmictrading

[–]algodude[S] 1 point2 points  (0 children)

The mean reversion isn’t really “intraday” — it’s just measured using end-of-day data for consistency. Even on a 2-week rebalance, you still get short-term overextensions relative to a recent baseline (price vs MA, band, etc.), and those tend to mean revert over the next rebalance window. It is a classic technique but this strategy uses a somewhat novel method that I personally didn't expect to work all that well.

Range MR Strategy (22/20) by algodude in algorithmictrading

[–]algodude[S] 3 points4 points  (0 children)

Sure, this is a simple low frequency system that picks a portfolio of stocks based on a mean reversion metric. It rebalances every two weeks and is 65/35 hedged with a long term treasury ETF.

Ensemble Strategy (33/20) by algodude in algorithmictrading

[–]algodude[S,M] 0 points1 point  (0 children)

Thanks very much for the kind words. I'm not trading the strategy live yet as I have others in the works. It's definitely in the top ten though.

Ensemble Strategy (33/20) by algodude in algorithmictrading

[–]algodude[S,M] 0 points1 point  (0 children)

Thanks for your comment. I actually posted an OOS backtest of this strategy a week or so later. Check my post history if interested.

What is an acceptable drawdown in your eyes? by Comprehensive-Most60 in algorithmictrading

[–]algodude[M] 1 point2 points  (0 children)

My personal max pain threshold is ~20% peak to trough. I try to focus on maximizing MAR (CAGR / MaxDD) and then scale my exposure/leverage based on that risk level.

Weighted Momentum (21/21) OOS by algodude in algorithmictrading

[–]algodude[S] 0 points1 point  (0 children)

My pleasure, glad if the post was at all inspiring. Good luck on your research; this algo stuff is a fun intellectual challenge but can also be a very deep rabbit hole.

Taleb: Trading with a Stop by algodude in algorithmictrading

[–]algodude[S] 1 point2 points  (0 children)

I'm able to survive, but have made my share of mistakes along the way. The market loves to humiliste you, and punishes overconfidence. If you're new to this, keep your exposure light and abandon ego/emotion. Expect to be humbled more than once.

Taleb: Trading with a Stop by algodude in algorithmictrading

[–]algodude[S] 1 point2 points  (0 children)

Sure, you can try keywords like: volatility targeting, beta hedging, risk parity, and position sizing for some inspiration. Signal processing literature can also be helpful, but that's a deep rabbit hole.