DEV Community

I Replaced the Entry Rule With a Clock. The Strategy Still Made $706.

Lei Chen on November 25, 2026

I Replaced the Entry Rule With a Clock. The Strategy Still Made $706. TL;DR: Post #18 ended with a pre-commitment: same script, same tr...
Collapse
 
kamalmosadegh profile image
Kamal Mosadegh •

This is the post the series needed, Lei — and the headline number is not the one I would lead with. Yes, the clock made +$706.11 against the RSI's +$2,530.24, and the gap widening to $2,279.41 once you remove each run's biggest winner is the cleanest evidence that the RSI entry is doing real work in the middle of the distribution, not just catching one move.

But Probe 2 is the finding that will save someone real money: a $26.73 affordability shortfall silently dropped bar 1660, with no diagnostic, no trade row, and nothing in any CSV. That is the same failure class I keep hitting in PDF extraction — a silent drop is always worse than a loud error, because the backtest looks complete while one observation is quietly missing. If PyneCore will not log it, the cheap guard is to size on a next-open estimate rather than the signal close, or to log every signal where the computed size does not produce a fill so the count can be reconciled (49 scheduled vs 48 fired should never need detective work).

Two things I am watching for in the costs post: whether the clock's +$706 survives 0.1% per round trip — at 48 trades it only needs about $15 of cost per trade to go under — and whether the RSI's three extra wins are concentrated in the same regime as trade #14, which the RSI missed entirely. The strategy being one trade deep either way is the honest takeaway here.

Collapse
 
leichenbuilds profile image
Lei Chen •

Thanks — and you're right that the silent drop is the finding that matters most here. Two answers, both run since you asked:

Does the clock survive the 0.1% fee? Yes — and it traded one MORE time with fees on. Same clock script, same 0.1% round-trip fee as post #20: net +$536.42 against +$706.11 without fees, Profit Factor 1.068 against 1.092, in our testing — 49 closed trades against 48, 17 wins against 16. Your ~$15-a-trade estimate was about double the real number: the fee averaged $7.35 a trade, $359.93 total. And the extra trade is the twist: the bar-1660 tick that was dropped in the no-fee run filled in the fee run. Lower equity meant 2 contracts instead of 3, 2 × 3,367.70 = $6,735.40 fit inside the $9,927.61 the account held, and the trade made +$190.25 (entered 2016-11-08, trail exit 2016-12-06). So on the clock the fee cost $359.93 and handed back a trade worth $190.25 — the fee run lost only $169.69 of net. The fee giveth, occasionally, by shrinking the order below the affordability line.

Are the RSI's three extra wins in #14's regime? No — the RSI had no winning entry there at all. The two entry streams share zero entry bars (a clock tick every 83 bars and an RSI crossover never land on the same bar), so "the three extra wins" isn't three specific trades — it's a different population, win rate 39.6% against 33.3%. The RSI's 19 wins are spread across 2010–2026, and none of them was entered in the 2014-10-24 → 2015-01-20 window where the clock's #14 (+$2,816.82) sits. The clock caught the best window; the RSI's edge, such as it is, is spread out, not concentrated.

On your reconciliation suggestion — agreed, and it's the right fix. 49 planned signals vs 48 fills shouldn't need detective work; the harness should log every unfilled signal with the reason. I'm folding that into the next runs rather than re-running history. Post #20 (dev.to/leichenbuilds/i-added-a-01-...) covers the RSI side of the fee test; the clock-with-fee numbers above will be written up with the trail-sensitivity test next.

Collapse
 
kamalmosadegh profile image
Kamal Mosadegh •

The bar-1660 twist is the best result in the series so far, because it breaks the frame of the test itself. The fee didn't just cost $359.93: by shrinking equity it cut the order from 3 contracts to 2, which made the previously unaffordable trade fill — and that trade paid back $190.25, so the clock's true fee cost was $169.69, not $359.93. But notice what else it means: the two runs differ in two variables, not one. Fees changed AND the trade population changed (49 vs 48 trades, 17 vs 16 wins). With 100%-of-equity sizing there is no fee-only comparison available — the sizing rule couples cost to existence, so the fee test and the sizing test are secretly the same test. My ~$15-a-trade estimate being double the real $7.35 is almost a footnote next to that.

Your regime answer is stronger than I expected, too: zero shared entry bars means the RSI and clock streams aren't two views of one population, they're disjoint populations — so the honest comparison really is just the win rates, 39.6% against 33.3%, and 'the RSI missed #14's window entirely' is a property of the entry rule, not bad luck.

Collapse
 
kamalmosadegh profile image
Kamal Mosadegh •

You ran the test — respect. And the detail that matters most is the one that is easy to skim past: with fees on, the system traded MORE (49 vs 48) and won more (17 vs 16), yet made less. The fees did not just tax the trades; they changed which trades the clock took, because a fee-adjusted equity path crosses the same rules at different moments. That path-dependence is why 'just subtract 0.1% per trade at the end' understates the damage for rule-based entries. PF 1.068 vs 1.092 is the honest headline: the edge survives, but roughly a fifth of the gross profit went to friction. If you ever run the same pair on a second instrument, I would genuinely like to see whether the trade-count flip repeats.

Thread Thread
 
leichenbuilds profile image
Lei Chen •

Your reframe holds up — and the arithmetic closes to the cent. The clock's gross fee column is $359.93, the rescued bar-1660 trade paid back $190.25, and $359.93 − $190.25 = $169.68 against the $169.69 net difference between the no-fee and fee runs. So the honest fee cost is ~$170, not ~$360. But the deeper point is the one that matters: with 100%-of-equity sizing there is no fee-only comparison to run — the fee test and the sizing test are secretly the same test, which is why the split test (#22) comes before any more fee claims.

And yes on the trade-count flip: 49 vs 48 trades, 17 vs 16 wins, yet less money. 'Just subtract 0.1% at the end' understates the damage because the fee changes which trades the clock takes, not just what they pay. PF 1.068 vs 1.092 is the honest headline.

The second-instrument repeat goes on the list after #22 and the placebo. Which repeat would convince you more — the same script on a second index, or the same script on weekly bars of the same index?

Thread Thread
 
kamalmosadegh profile image
Kamal Mosadegh •

Second index, same daily bars. That is the out-of-sample test that matters: it asks whether the exit rule generalises to a different market, holding everything else fixed. Weekly bars of the same index change two things at once — the timeframe and the trade count, which collapses — so a different result there wouldn't tell you whether the clock or the timeframe did it. Run the second index first; keep weekly bars as a separate robustness check after #22 and the placebo, not as the repeat that decides it.