Dip Accumulators
- Asset
- SOXL, 3x leveraged semiconductors
- Capital
- $1,000
- Strategy
- Phase 1: 80/20 volatility harvest. Phase 2: buy 50% of cash on a −7% daily drop, ratcheted sells above cost basis
- Outcome
- Phase 1 abandoned before it ever rebalanced. Phase 2 is the template the later bots were built on.
The first version of this bot never traded. It technically didn’t break, it simply needed to appreciate by 46% to execute a transaction.
With the boom of AI, data centers, and companies beefing up on capex to build the infrastructure, I’ve been closely watching the performance of semiconductors. The next bot would trade SOXL as the underlying asset. SOXL is a 3x leveraged ETF tracking the daily return of the NYSE Semiconductor Index, which consists of 30 of the largest semiconductor companies listed in the U.S.
Phase 1: Volatility Harvest
- Strategy. 80/20 equity/cash rebalancing
- Buy SOXL with 80% of cash while holding 20% as cash reserve
- Rebalance when 80/20 drifts 5% in either direction
- Capital. $1,000
The bot only acts when the equity/cash split drifts 5 points. How far does SOXL have to run before that happens?
| SOXL Volatility Harvest | |||
|---|---|---|---|
| SOXL Price | % Equity | % Cash | Notes |
| $240.00 | 80% | 20% | Position opened |
| $264.00 | 81% | 19% | +10% |
| $290.40 | 83% | 17% | +10% |
| $319.44 | 84% | 16% | +10% |
| $351.38 | 85% | 15% | +10%, first rebalance triggers |
SOXL has to reach $351, a 46% run from entry, before the bot does anything at all, and the first rebalance banks $73. Four straight 10% moves to earn 7% on capital is not a strategy; it is a waiting room.
The strategy needs to be revised so capital is actively deployed. Trades need to be executed to properly gauge the bot’s performance. Instead of rebalancing positions, I could buy on daily drops and sell based on the average cost basis.
Phase 2: Dip Accumulator
- Strategy
- Buy on -7% daily drops with 50% of allocated cash
- Ratcheted sells in bands once the price is 5% or more above average cost
How much gets sold, and when?
| Gain above Avg Cost | Sell % |
|---|---|
| +5% to 15% | 20% |
| +15% to 25% | 30% |
| +25% to 40% | 45% |
| +40% and above | 50% |
Each band sells a percentage of what is still held, never the whole position, so the bot always keeps shares in the market.
One detail in that table does more work than it looks like it does. The +5% is measured from average cost only until the first sell. After that the anchor moves to the last sell price, and the next sell needs another +5% above that. The bands still size the trade off the gain over cost, but the trigger walks up the ladder behind the price.
That is why the last row of the chop table below says HOLD at $243 while sitting 5.8% above a $229.60 cost basis: the previous sell at $245 moved the anchor, so nothing fires again until $257.25.
What it looks like in a chop
The ladder is not there to beat a rally. It is there to earn its keep when the price oscillates, which is most of the time. SOXL does not fall 7% three days running: it drops hard, bounces, and drops again. Here is $1,000 through ten sessions of exactly that.
Down, up, down, up. That is the market SOXL actually delivers. Yellow rows are sessions the bot sat out; on the rest, green is above average cost and red below. Who is ahead after ten?
| SOXL Dip Accumulator in a chop | ||||||
|---|---|---|---|---|---|---|
| After Trade | Portfolio Value | |||||
| Price | Day | Action | Shares | Avg Cost | Bot | Buy & Hold |
| $240.00 | -7.0% | BUY | 2.083 | $240.00 | $1,000.00 | $1,000.00 |
| $222.00 | -7.5% | BUY | 3.209 | $233.68 | $962.50 | $925.00 |
| $235.00 | +5.9% | HOLD, under the +5% gate | 3.209 | $233.68 | $1,004.22 | $979.17 |
| $218.00 | -7.2% | BUY | 3.783 | $231.31 | $949.66 | $908.33 |
| $231.00 | +6.0% | HOLD, under cost, no-loss gate | 3.783 | $231.31 | $998.84 | $962.50 |
| $214.00 | -7.4% | BUY | 4.075 | $230.07 | $934.53 | $891.67 |
| $236.00 | +10.3% | HOLD, under the +5% gate | 4.075 | $230.07 | $1,024.18 | $983.33 |
| $245.00 | +3.8% | SELL 20% at +6% over cost | 3.260 | $230.07 | $1,060.85 | $1,020.83 |
| $227.00 | -7.3% | BUY | 3.837 | $229.60 | $1,002.17 | $945.83 |
| $243.00 | +7.0% | HOLD, ratchet sits at $257 | 3.837 | $229.60 | $1,063.57 | $1,012.50 |
Four dips pull the average cost from $240.00 to $229.60, and exactly one sell ever fires. The bot ends at $1,063.57 against $1,012.50 for buy-and-hold, and it was ahead from the second session onward, because every bounce lifted a position that had been bought cheaper.
Both lines fall on the dips and rise on the bounces; the bot just falls less each time, because half its money is still in cash waiting for the next drop. The gap is set on the way down and never given back.
The rally case, where the ladder loses
Run a clean four-step climb through the new rules. With $1,000 in capital and an entry at $240 on a -7% daily drop, the bot deploys 50% ($500) into 2.083 shares and holds $500 as dry powder.
A market that only goes up, which is the one thing the ladder has no answer to. What does it do with four straight 10% moves?
| SOXL Dip Accumulator in a rally | ||||||
|---|---|---|---|---|---|---|
| Bot portfolio | ||||||
| Price | Action | Shares | Cash | Equity | Total | Buy & Hold |
| $240.00 | BUY 50% of cash | 2.083 | $500.00 | $500.00 | $1,000.00 | $1,000.00 |
| $264.00 | SELL 20% at +10% | 1.667 | $610.00 | $440.00 | $1,050.00 | $1,100.00 |
| $290.40 | SELL 30% at +21% | 1.167 | $755.20 | $338.80 | $1,094.00 | $1,210.00 |
| $319.44 | SELL 45% at +33% | 0.642 | $922.91 | $204.98 | $1,127.88 | $1,331.00 |
| $351.38 | SELL 50% at +46% | 0.321 | $1,035.64 | $112.73 | $1,148.37 | $1,464.08 |
Watch the two middle columns trade places. Equity falls from $500 to $112.73 while cash climbs to $1,035.64. By the top, 90% of the portfolio is sitting in cash and only $112.73 is still exposed to the move. That is $315 behind buy-and-hold, and it is the strategy working as designed: a rally is the one market where a dip accumulator can only sell.
The triggers are states, not events
This is the part I got wrong when I wrote the rules. The bot runs on a cron, a scheduled job that wakes every 300 seconds and asks whether SOXL is down 7% against yesterday’s close. On a bad day the answer is yes at 6:35 AM PT, still yes at 6:40 AM, at 9:15 AM, and at 12:55 PM, five minutes before the close. The condition does not fire once and clear itself. It stays true all session, and every tick that finds it true trades again.
The first version of the sell rule had the identical flaw pointing the other way: sell 20% whenever the price is 5% above average cost. Also a state. Also true on every tick until something else changes it.
Here are both, run separately over the same bad day: on the left a bot with $1,000 of cash and nothing else, on the right a bot holding a $1,000 position and no cash. Two different accounts. The point is the shape of each column, not a comparison across them.
One qualifying day, no cap and no ratchet. How long does each side last?
| Buy bot: 50% a tick | Sell bot: 20% a tick | ||
|---|---|---|---|
| Tick | Elapsed | Cash left | Position left |
| 1 | 5 min | $500.00 | $800.00 |
| 2 | 10 min | $250.00 | $640.00 |
| 3 | 15 min | $125.00 | $512.00 |
| 4 | 20 min | $62.50 | $409.60 |
| 5 | 25 min | $31.25 | $327.68 |
| 6 | 30 min | $15.63 | $262.14 |
| 7 | 35 min | $0.00 | $209.72 |
Seven ticks, thirty-five minutes: the buy bot has spent $1,000 of cash to the last cent, and the sell bot has taken a $1,000 position down to $209.72. A 6.5-hour trading session is 78 ticks long, and this is the first seven of them.
Neither side ever quite reaches zero by taking a fraction, but it makes no practical difference: the $10 minimum order size ends the buying at the seventh tick, and a position worth a fifth of what it started at is not much of a position.
Each side got its own fix: buys are capped at two per day, so the same session deploys $750 and keeps $250 back, and sells got the ratchet: once one fires, the next needs another 5% above it. Not because the first trade was wrong in either case, but because everything after it was placed by a scheduler rather than a decision.
What the dry powder is actually for
The cap and the ladder solve the same problem from opposite ends. What the strategy pays you for is worth saying plainly.
It pays you for holding. The no-loss gate means an underwater position is never sold, so a drawdown cannot turn into a realized loss. The bot’s only available move while below cost is to buy more. Every dip that gets bought pulls the average cost down, which is the entire mechanism.
And it pays you for keeping cash. Buying half the cash rather than all of it is not caution for its own sake: it is what makes the next leg down an opportunity instead of a loss. A bot that is fully deployed after the first bad day has no answer to the second one. The cap enforces that same reserve against its own scheduler.
The uncomfortable part is that both of those only pay off if the price comes back. Nothing here protects against a fund that goes down and stays down, and a 3x ETF in a sustained downtrend is exactly the thing that does not come back.
How the sell rule got here
None of this was designed. Each clause is a patch on something an earlier version did badly, starting with the grid bot.
A flat +5% over cost. The first dip accumulator. Two things were wrong with it. It fired on every tick for as long as the condition held. And the gate was easy to point at the wrong number: measure the move from the previous close rather than from average cost, and the bot will happily sell at a loss on a green day.
A day the bot is up 6% and still underwater:
| Reading | Value |
|---|---|
| Previous close | $218.00 |
| Price now | $231.00 |
| Move on the day | +6.0% |
| Average cost | $231.31 |
| Position against cost | -0.1% |
Keyed to the day's move, a sell fires here and books a loss. Keyed to average cost, the no-loss gate holds and the position stays intact.
Bands, then a ratchet. Bands fixed the sizing: 20% early and 50% once the gain extends, so a rally is trimmed lightly at first and the position survives to be trimmed again. The ratchet fixed the trigger, as above. One sell per leg up, instead of one per tick.
Gates last. The no-loss gate blocks any sell below average cost. The red-day gate blocks a ratchet sell while the stock is down on the day. A spike can satisfy the ratchet on a session that is otherwise red, and selling into that is selling into weakness.
Still unfixed is the thing The One That Beat Buy-and-Hold ran into: none of this stops the ladder selling a position down to nothing in a market that only goes up.
Next: these rules went live on LABU, and over fourteen weeks they did what this post claims, barely, and not in the way I expected. The One That Beat Buy-and-Hold.
Terms used above are defined in the glossary. Figures are illustrative unless labelled otherwise.