Algorithm and Portfolio Stats: 02/12/2024 - 02/16/2024
To begin, our day trading algorithm is currently under-performing, however, a large part of its recent under-performance was due to a bug which we have recently fixed. First off, let’s discuss this bug. Some of you may recall that, at the start of this month, we were considering removing the ability for the algorithm to hold positions overnight. Back tests showed that, during the month of January, this change would have helped us, but longer term back tests showed the opposite trend, suggesting that January had just been an unusually bad month for overnight positions. This led us to revert that change at the last minute.
The bug originated in that reversion. When we implemented this change, we added it in two ways. First, the model itself would send an “exit” order for any ticker it held a position in, once the last candle of the day came in. Secondly, our live bot would silently mark all open trades as “closed” at the most recent price, a few hours after close. The latter was a safeguard we had in place, in case our model missed the final candle (among other things, this can happen due to outages from our data source, computing issues, etc).
When I reverted these changes, I reverted the former, but neglected the latter. This was an oversight on my part, and I wish to apologize to all users who have been negatively impacted by the change. Consequently, from February 6th to February 15th, our bot silently considered all open positions to be closed at the end of each day, when the model we had plugged in wasn’t designed to do so. This led to us taking on artificially large losses.
To elaborate on why this was a substantial problem, I need to go into detail about the difference between the model that was designed to hold positions overnight, and the one that wasn’t (for brevity: “Model A” and “Model B”). Model A did more than just close out positions, it became more reluctant to take on new ones as the day got closer to market close. Why take on a position at 3:55 PM if you think it’ll take up to an hour to hit your target, but you know you’ll close out in 5 minutes? This caused substantial under-performance during the first part of the month: the model was taking on positions without knowing it would be forced to close them.
On the bright side, we feel that user-side impact of this bug was relatively small. No faulty entry notifications were sent as a consequence of this glitch, nor were any entry signals missed, or any faulty exit signals. The only consequence of this issue is that a number of exit signals were not sent, and in prior analyses, our numbers assumed that these positions had been exited prematurely.
We’re going to perform overall analysis of the algorithm based on its performance without this glitch, but we’re going to analyze individual trades as they were actually notified in real time.
If you’d taken every trade the algorithm recommended, allocating 1/75th of your capital to each (the algorithm is currently watching 75 tickers), you’d be down 0.33%. In the most extreme possible allocation conditions, 100% of your capital in every single trade, with no selection from the user, you’d be down 25%. That sounds bad, and it is, but it’s also highly unrealistic. In order to guarantee your ability to achieve this, you’d need a broker who provides up to 75x margin. Regardless, these numbers aren’t good, though they only turned sour after a particular bad day on Friday.
At this time, we are focusing our development time on a mix of improvements to this system, as well as a plan B algorithm should it under-perform by a large margin. If you attended our technical analysis seminar on Saturday, our plan B algorithm will utilize a lot of the ideas we discussed there.
Now then, let’s talk about our best and worst trades of the week.
Our best and worst trades this week were on the same ticker: ALB. Our best is fairly by-the-books, but our worst is a pretty clear fake-out - a massive spike in volatility in the opening stretch, driven by an earnings report throwing off our technical analysis. Looking at particularly poor trades like these is one of the main ways we find ways to improve our algorithm. This particular trade offers us several potential changes to make. All of these are currently being tested, but we aren’t ready to make a definitive call on them at this time:
Limit all trades a stop loss of X% or less
Refuse all trades with a stop loss greater than X%
Refuse all trades close to an earnings report
Refuse all trades on tickers that recently had unusually high volatility
Refuse all trades on tickers where 1 recent candle was unusually large
Refuse all trades on tickers that had an “unusual” opening stretch
As mentioned in a previous daily review, I don’t think the user impact of this losing trade has been significant - it’s an obvious enough fake out that it’s doubtful most users were interested - but I’d still prefer our system have not sent it out to begin with. Many of our biggest losers this week fall into that category, in that for a human looking at the chart, it’s obviously not a valid signal, but that’s much harder for a quantitative algorithm to catch. If we continue with this algorithm next month, we will be pushing an update to prevent trades like these.
For a change of pace, our best short of the week was not on ALB, but ZBRA. We got in at $249.28, in the early afternoon of the market day. We exited at $244.71, for a return of 1.85%. This is exactly what we want to see from our system. The movement to our target exit is clean and consistent, with our target exit being almost exactly the low of day from our entry time.
Now then, let’s examine the long term portfolio.
This is the first tough week our portfolio has had for a while. We under-performed the market by about 1%, with an upside capture ratio of 1.04, and a downside capture ratio of 1.14. The main reason we did poorly was our market cap weighting, since this week our biggest losers were mostly the bigger tech companies.
Looking at our breakdown of returns by ticker and sector, it’s pretty clear where we took our losses. We’re sticking with our market cap weighting, as well as our beta-1 strategy. One poor week does not a failed strategy make. We will however be re-balancing our portfolio with a new batch of tickers. I’ve listed all tickers with an allocation above 0.5% below.
That’s all I have for you tonight. Thank you for reading, and happy trading!