Testing and Refining Exit Rules
First published 25 Aug 2026 · Last verified 29 Aug 2026
Rupak Basnet had a rule. He could tell you the rule in one breath: sell if a stock falls 15 percent from what he paid for it. He had said this rule out loud to friends at the tea shop below his electronics store in Pokhara for two years, and it had made him sound disciplined, the kind of investor who does not fall in love with a stock. What Rupak did not know, because he had never checked, was that his rule had already failed him once, in the exact year he was proudest of having one. This chapter is about closing that gap: the gap between a rule that sounds disciplined and a rule that has actually been tested against real NEPSE price history, including the ugly stretches where the rule and the market disagreed about what price a trade could happen at.
Part XII built the plumbing for this: the 20-session average daily volume, or ADV, rule for sizing positions so that a single investor's own buying and selling does not move a thin stock's price, and the free-float limits that cap how much of a low-float company any one investor should hold, precisely because low-float stocks are the ones that get stuck. Chapter 76 built the habit of deciding an exit plan before entry, and reading the depth ladder — the live list of buy and sell orders waiting at each price level — so an investor knows in advance whether an exit is likely to find a buyer or not. Chapter 79 laid out the general discipline of backtesting: testing a rule against past data honestly, watching out for biases that make a rule look better than it is, and holding back some data as an out-of-sample test the rule was never tuned against. Chapter 80 applied that discipline to the entry side, calibrating the weights inside the Canon Score. This chapter turns the same discipline toward the other end of the trade: the exit. An entry score can be excellent and the trade can still lose money, if the exit rule attached to it was never actually tested.
Lesson 81.1 — Why Exits Need Their Own Backtest, Not a Borrowed One
Most retail investors in Nepal, and most retail investors anywhere, put far more thought into when to buy a stock than when to sell it. This is understandable. Buying is exciting; it is the moment of a decision, backed by a story about a company's earnings, a sector tailwind, a friend's tip, or a score like the Canon Score built earlier in this book. Selling is different. Selling usually means admitting one of two things: either the story is not playing out the way it was supposed to, or the story played out and now it is time to stop being greedy. Both admissions are uncomfortable, and discomfort is exactly the condition under which people reach for vague language instead of precise rules.
Ask most NEPSE investors what their exit rule is and you will hear something like: I will sell if it feels like it is turning, or I will get out if the fundamentals change, or I am in this for the long term so I do not really have a stop-loss. None of these are rules in the sense this book uses the word. A rule, for the purposes of testing, is an instruction specific enough that it produces the same decision no matter who is applying it. "If it feels like it is turning" fails this test immediately, because two investors looking at the same chart on the same day will feel differently about it, and the same investor will feel differently about it depending on whether they had a good or bad day. A feeling cannot be backtested, because a feeling has no fixed definition to apply consistently to a hundred past trades.
This matters more than it sounds like it should, because the entry side of a trade and the exit side of a trade are graded on completely different curves. The Canon Score, calibrated in Chapter 80, is trying to answer one question: is this a reasonable stock to buy right now, given liquidity, price behaviour, and the other factors folded into the score. It says nothing about what happens after the buy. A stock can score well on entry, behave exactly as expected for two months, and then the position can still lose a third of its value, purely because the investor's plan for getting out was never precise enough to execute, or was precise but untested against the specific way NEPSE stocks actually behave when they fall. Good entries and bad exits combine into bad outcomes constantly. Testing only the entry side and calling the job done is like a driving instructor who only ever teaches acceleration.
Rupak's own history is the clearest illustration available. He had an exit habit, in the loose sense — sell around 15 percent down, unless he felt the stock still had a story — that he had never once gone back and tested against his own trading history. He assumed it worked because he could recite it. The rest of this chapter follows him through the process of writing that habit down as an actual testable rule, running it against real NEPSE-style price sequences from the 2021-2022 correction, discovering it had already failed him once in a way he had half-forgotten, and refining it into something narrower and more honest.
Lesson 81.2 — Writing an Exit Rule Precisely Enough to Test
A testable exit rule needs three things: a trigger condition stated in numbers or unambiguous mechanical terms, a clock or price series it is checked against, and an action that follows automatically once the trigger condition is met. If any of the three is missing or fuzzy, the rule is not a rule yet, it is an intention.
Here are two examples of rules that pass the test.
Rule A, a fixed percentage stop-loss: exit the position at the close of any session in which the closing price is 15 percent or more below the purchase price. There is nothing to argue about here. Given a purchase price and a sequence of daily closes, any two people, or a spreadsheet, will identify the exact same session as the trigger session every time.
Rule B, a moving-average trend exit: exit the position at the close of the second consecutive session in which the closing price is below the 50-day simple moving average, where the 50-day simple moving average is the average of the most recent 50 closing prices, recalculated every session. Again, given the same 50 sessions of closing prices, two people will always agree on where the average sits and which sessions closed below it.
Compare those with the rules retail investors actually carry around in their heads. "I will sell if the volume looks weak and the story stops making sense" fails on every count: weak compared to what, over what number of sessions, and whose judgment about the story counts. "I will hold long term but get out if it really falls apart" has no numeric trigger and no defined clock; it just relocates the decision to some future moment of gut feeling, which is exactly what a testable rule exists to remove. A rule that cannot be written as an instruction to a very literal-minded assistant, one who has access only to a price and volume table and nothing else, is not ready to be backtested, and arguably is not ready to be traded on either.
Precision has a second benefit beyond testability: it removes the exit decision from the emotional moment itself. When a stock is actually falling and the investor's own money is draining away in real time, that is the worst possible moment to be inventing criteria on the spot. A rule decided in advance, in a calm moment, and already tested against history, is a rule the investor can execute without negotiating with themselves at the worst possible time.
Lesson 81.3 — The NEPSE Wrinkle: When the Exit You Wanted Is Not the Exit You Get
Everything in Lesson 81.2 assumes that once a rule fires, the investor can actually sell at or near the trigger price. On most developed exchanges, for a reasonably liquid stock, that assumption is close enough to true to build a simple backtest on. On NEPSE, for a meaningful share of the market, that assumption is dangerously wrong, and the reason is the circuit breaker system.
A circuit breaker, in plain terms, is a rule that limits how far a stock's price is allowed to move in a single trading session, expressed as a percentage band around the previous closing price. If a stock closed the prior session at 500 rupees and the daily band is 15 percent, the stock can trade anywhere between 425 and 575 in the next session, but not beyond either edge, no matter how many people want to buy or sell at a more extreme price. Hit the lower edge of that band, and NEPSE terminology calls it the lower circuit; hit the upper edge, the upper circuit. The mechanism exists for a good reason, to slow down panic and prevent single-session chaos, but it has a side effect that matters enormously for exit planning: a stock can sit frozen at its lower circuit price, with far more sellers queued up than buyers willing to appear, for several consecutive sessions in a row. During that stretch, an investor who wants out is not choosing whether to sell. They are watching a locked door.
The mechanical detail matters because it changes the arithmetic of a stop-loss. Under a 10 percent daily band, a stock cannot fall more than 10 percent in one session even if every single order on the sell side is a market order desperate to get out. That sounds protective, until the stock keeps closing at its lower limit day after day because there is still no buyer willing to step in anywhere near that price. A five-session run of consecutive lower-circuit closes, each one 10 percent below the last, takes a stock down roughly 41 percent from where it started, and for every session of that run, an investor's sell order sits in the queue unfilled, because a lower circuit session with no genuine two-sided trading is a session where almost nobody's exit order actually executes.
This is not a hypothetical risk invented for this book. During the correction that followed NEPSE's 2021 peak, when the index fell from roughly 3,200 points to below 1,700 over about two years, the descent did not happen as one smooth line; it happened as a staircase of sharp drops and partial bear-market rallies, and thinner stocks were disproportionately the ones that got stuck at the bottom of each step. A separate, well-documented episode in 2023 saw a cluster of microfinance company shares, a sector already known on NEPSE for thin free float and low daily turnover, hit consecutive lower circuits during a regulatory scare specific to that sector. Investors holding those shares were not choosing to hold through the decline out of conviction; they were locked in place while the price kept resetting lower each morning, unable to find a buyer at any price near the frozen quote.
This is the wrinkle that makes NEPSE exit-rule testing different from generic exit advice found in international investing books. Those books, quite reasonably, assume that once a stop-loss triggers, the position gets sold that day or the next, give or take a small amount of slippage — the gap between the price you wanted and the price you actually got. On NEPSE, for a low-free-float, low-ADV stock in the middle of a broad correction, that gap between wanted and got can stretch into weeks and tens of percentage points, and a backtest that ignores this will produce numbers that look far better than what an investor would have actually experienced. From here forward, every exit-rule test in this chapter tracks two separate numbers for every trade: the paper outcome, meaning what the rule's trigger price says the exit should have been, and the realistic-execution outcome, meaning the price at which the position could plausibly have actually been sold once thin liquidity and circuit-limited sessions are accounted for.
Lesson 81.4 — Running the Backtest: Walking Forward Through Real Price Sequences
A backtest for an exit rule is, mechanically, simpler than the entry-side backtesting covered in Chapters 79 and 80, but it demands more discipline about one specific thing: honesty about what could actually be sold, on what day, at what price. The process runs like this.
Start with a real historical price and volume sequence for the stock in question, going back far enough to include at least one meaningfully stressful period, not just a calm uptrend. Pick a plausible entry point and price, exactly as an investor would have faced it at the time, using only information that was available on that date. Then walk forward one session at a time, applying the exit rule mechanically at each new session using only the data available up to and including that session — never using tomorrow's price to decide today's action, which is the same look-ahead bias problem flagged in Chapter 79's discussion of backtesting pitfalls. At each session, check whether the rule's trigger condition is met. If it is, do not simply record the trigger price as the outcome. Instead check the depth ladder and volume conditions for that session and the sessions immediately after: was this a normal trading session with genuine two-sided volume, or was it a circuit-limited session with the price frozen at its band edge and little to no real matched volume? If normal, record a realistic exit close to the trigger price, adjusted for typical slippage. If circuit-limited, carry the position forward, session by session, until a session appears with genuine two-sided volume at a price the position could actually have been sold into, and record that price as the realistic exit.
This produces two numbers for every simulated trade: the paper return, which is what a naive backtest would report by simply applying the rule's percentage to the trigger price, and the realistic return, which is what an investor holding that exact position would actually have experienced. The gap between the two numbers is not noise to be averaged away. It is the single most important output of the entire exercise, because it tells you how much to trust the paper number for any given rule and any given category of stock.
The final piece of an honest exit-rule backtest is comparing more than one candidate rule against the identical historical sequences, not testing each rule against whichever period happens to flatter it. A tighter stop-loss and a looser one, a price-based rule and a time-based or trend-based rule, should all be walked through the same stretch of NEPSE history, including the same correction periods, so that their outcomes are directly comparable. Lesson 81.5 does exactly that, using a reconstructed price sequence modelled on the pattern NEPSE stocks actually followed during the 2021-2022 correction and the 2023 circuit-trap episode described above.
Lesson 81.5 — Two Rules, One Price Sequence: Where Each One Breaks
Rupak's original rule was a fixed percentage stop-loss: exit at the close of any session where the price sits 15 percent or more below the purchase price. Call this Rule A. As a natural alternative, consider a trend-following exit built on the 50-day moving average introduced in Lesson 81.2: exit at the close of the second consecutive session below the 50-day average. Call this Rule B. Rule A reacts fast to a sharp drop and does not care about the broader trend; Rule B is slower to react to a sharp drop but tends to keep an investor in a stock through ordinary short-term wobbles, since a single bad day rarely drags the 50-day average down with it.
To compare them fairly, both rules were walked forward, mechanically and identically, through four reconstructed NEPSE-style price sequences, each modelled on a real pattern this market has shown: a grinding decline in a liquid, high-free-float stock; a sideways, choppy stretch with no clear trend; a sharp correction in a thin, low-free-float stock that ends in a multi-session lower-circuit trap, modelled directly on the pattern described in Lesson 81.3; and a sharp but short-lived dip followed by a V-shaped recovery. The reconstructed sequences are composites, not a single real ticker's exact tape, but every price move, circuit band, and freeze length in them is drawn from patterns NEPSE has actually produced.
The clearest and most consequential case is the third one, so it is worth walking through in detail before looking at the summary table. Picture Rupak buying a small, thinly traded finance-sector stock, call it a composite ticker TRSL, at 850 rupees per share in early November 2021, near the broad market's peak, sized correctly under the ADV rule from Part XII so his own order would not move the thin market by itself. His Rule A trigger sits at 722.50 rupees, 15 percent below his purchase price. The reconstructed sequence, built to match how the 2021-2022 correction actually behaved in low-float names, unfolds like this:
| Date | Session Close (Rs) | Move from Prior Close | Session Type |
|---|---|---|---|
| 2021-11-01 | 850 | Purchase | Normal trading |
| 2021-11-15 | 810 | -4.7% | Normal trading |
| 2021-11-16 | 729 | -10.0% | Lower circuit (10% band, still above trigger) |
| 2021-11-17 | 656 | -10.0% | Lower circuit, Rule A trigger fires (below 722.50) |
| 2021-11-18 | 656 | 0.0% | Frozen at lower circuit, no real buy-side volume |
| 2021-11-21 | 656 | 0.0% | Frozen at lower circuit, no real buy-side volume |
| 2021-11-22 | 590 | -10.0% | Lower circuit continues |
| 2021-11-23 | 531 | -10.0% | Lower circuit continues |
| 2021-11-24 | 480 | -9.6% | First session with genuine two-sided volume, realistic fill |
Rule A's paper outcome says Rupak should have exited at 656, an 22.8 percent loss, once the position is actually marked at the trigger session's close rather than the round 15 percent figure, since the stock gapped past the exact trigger price on the way down. But 656 was a circuit-frozen close with no real buyers behind it. The realistic exit, once actual sellable volume reappears, is 480, a 43.5 percent loss from the 850 purchase price, nearly double what the rule's own percentage promised. This is the honest failure moment Rupak had never gone back to check: his 15 percent rule had already let him down once, not because the rule was badly designed on paper, but because it was never built with a circuit-trap scenario in mind, and he had simply not looked closely enough afterward to notice how large the gap between paper and reality had actually been.
Rule B behaves differently on the same sequence. The 50-day moving average lags a sharp drop like this substantially, since it is averaging in many earlier, higher prices; it does not cross below the falling price and stay there for two sessions until later in the decline, by which point the stock is already deep into the circuit-locked stretch. Rule B's own trigger, in this scenario, does not even fire until the stock is already frozen, meaning Rule B offers no earlier warning than Rule A here, and produces a similar realistic exit near 480, simply arriving at the same bad outcome by a different and slower path.
The fourth scenario shows the opposite failure. In a sharp but short-lived dip followed by a swift recovery, a liquid stock drops 16 percent over a week on broad market jitters, briefly clearing Rule A's 15 percent trigger, and then rallies back to a new high over the following month, once whatever caused the dip passes. Rule A exits near the bottom of the dip and misses the entire recovery, turning a temporary paper loss into a locked-in one and forfeiting the subsequent gain. Rule B, because the 50-day average has not had time to turn down meaningfully over a one-week dip, never triggers at all, and the position rides through to the recovery intact.
| Scenario | Rule A Paper Result | Rule A Realistic Result | Rule B Paper Result | Rule B Realistic Result |
|---|---|---|---|---|
| Grinding decline, liquid high-float stock | -15.4% | -16.9% | -19.2% | -20.5% |
| Sideways chop, no clear trend | No trigger (0%) | 0% | -6% then re-entry, -4% (whipsaw) | -9% net after two round-trips |
| Sharp correction, thin low-float stock, circuit trap | -22.8% (at trigger close) | -43.5% | Triggers late, near bottom | -41.0% |
| Sharp dip with V-shaped recovery | -15.8%, locked in | -16.5%, locked in | No trigger, held through | +11.0% (captured recovery) |
The pattern across all four rows is the trade-off this lesson is built to show concretely. Rule A protects capital fastest in an ordinary decline but sacrifices upside whenever the drop turns out to be temporary, and it does not protect against a circuit trap at all, since the trigger fires but the fill does not follow. Rule B avoids some whipsaw losses and rides out temporary dips well, but its slowness becomes actively dangerous in the exact scenario where speed matters most, a fast, illiquid collapse, because by the time its trigger condition is finally met the stock may already be frozen. Neither rule, in its raw form, handles the low-free-float circuit-trap case acceptably. That is the specific problem Lesson 81.6 is built to fix.
Lesson 81.6 — Refining the Rule: Small Steps, Documented Reasons, and a Liquidity Buffer
Once a backtest has shown where a rule breaks, the temptation is to overhaul it completely, swapping 15 percent for some other round number pulled out of the air, or abandoning fixed stops for trend rules or vice versa. Resist that. The discipline that made Chapter 80's calibration of the Canon Score trustworthy applies here too: adjust thresholds in small, deliberate steps, test each step against the same historical sequences used before, and write down the specific reason for each change so that a future version of yourself, or another investor reading your notes, can see why the number is what it is rather than treating it as an arbitrary preference.
The single most important refinement to come out of this chapter's backtest is not a different percentage. It is recognising that a single exit rule applied identically to every stock on NEPSE is itself the mistake, because the free-float and ADV rules from Part XII already told us these stocks are not identical in one crucial respect: how easily a seller can find a buyer when the market turns. A rule tuned as a compromise across both liquid and illiquid names will always be too loose for the illiquid ones, since that is where the circuit-trap risk actually lives.
The practical fix is a liquidity buffer: a stricter, earlier trigger applied specifically to positions in stocks that fall below a free-float or ADV threshold already defined back in Part XII, chapters 54 through 58. For a stock comfortably above that threshold, Rupak's original 15 percent stop, refined only slightly, remains reasonable, because such a stock is far less likely to freeze at consecutive circuit limits with no buyers appearing for days. For a stock below the threshold, the same 15 percent trigger is not conservative at all, it is close to useless, since the backtest showed the realistic exit landing more than 40 percent below purchase price precisely because the position could not be sold anywhere near the intended level. For those names, the rule should trigger earlier, for example at 8 to 10 percent below purchase rather than 15, precisely to get the sell order into the queue before the stock has enough downward momentum to start gapping through consecutive circuit limits, and it should be paired with the depth-ladder reading habit from Chapter 76, checking whether there is still real buy-side depth at each price level before assuming a trigger will actually fill.
Rupak's refined rule, after this backtesting exercise, reads like this: for stocks above the Part XII free-float and ADV thresholds, exit at the close of any session where price is 15 percent or more below purchase price, treating this as validated by the backtest's grinding-decline scenario. For stocks below those thresholds, exit at the close of any session where price is 10 percent or more below purchase price, and additionally begin exiting a portion of the position, not waiting for the full trigger, the moment the depth ladder shows buy-side volume thinning meaningfully below its 20-session average, since that thinning is an early warning that a circuit trap may be forming before the price trigger itself is even reached. Each of these numbers came from a specific comparison against the reconstructed 2021-2022 and 2023-style sequences, not from a gut feeling about round numbers, and each is written down with the reasoning attached, so the next review of this rule, whenever the market regime shifts, has something concrete to test against rather than a vague memory of what once felt right.
This is also where the refinement process has to stop rather than keep tightening indefinitely. An exit trigger set too tight, say at 5 percent for every stock regardless of liquidity, would have converted the sideways-chop scenario in Lesson 81.5 into a string of small, repeated losses from whipsaw, since ordinary daily noise in a NEPSE stock routinely exceeds 5 percent without indicating a real trend change. The right threshold is not the tightest possible one; it is the one that the backtest across several different historical conditions, not just the worst one, shows to perform reasonably across all of them.
Chapter recap
This chapter took the backtesting discipline built in Chapter 79 and applied to entry scoring in Chapter 80, and pointed it at the other half of every trade: the exit. The starting problem was that most retail exit plans are not rules at all, but vague intentions dressed up as discipline, things like selling when it feels like it is turning, which cannot be tested because they cannot be applied identically twice. A real exit rule needs an exact, numeric trigger, whether that is a fixed percentage stop-loss like Rupak's original 15 percent rule or a trend-based rule like the 50-day moving-average exit, stated precisely enough that any two people looking at the same price history would make the identical decision on the identical day.
The specifically NEPSE part of this chapter was the circuit breaker system: the daily percentage band, long set at 10 percent and widened to 15 percent in 2026, along with the market-wide index halt mechanism, and the very real risk that a falling stock, especially a thin, low-free-float one, can sit frozen at its lower circuit price for several consecutive sessions with no buyers appearing at any price near the frozen quote. This is not a theoretical risk; it echoes real patterns from NEPSE's 2021-2022 correction and the 2023 microfinance circuit-trap episode. Because of this, an honest backtest of any NEPSE exit rule has to track two separate numbers for every simulated trade: the paper outcome the rule's trigger price implies, and the realistic-execution outcome that accounts for circuit-limited sessions where no genuine sale was actually possible. Rupak's own worked example showed exactly this gap in action: a rule that promised roughly a 15 percent loss delivered a realised loss of over 43 percent once a five-session circuit-trap stretch was properly modelled, a failure his own informal version of the rule had already suffered once, unnoticed, years earlier.
The worked comparison between a fixed percentage stop and a trend-following moving-average exit showed that neither rule is simply better in every condition. The fixed stop protects capital fastest in an ordinary decline but forfeits recoveries after temporary dips and offers no real protection once a stock gaps into a circuit trap. The trend-following rule avoids some whipsaw losses in sideways markets and rides out short dips well, but its natural lag becomes dangerous in exactly the fast, illiquid collapse where speed matters most. Neither rule, used identically across every NEPSE stock regardless of its liquidity profile, is good enough, which is why the refinement in Lesson 81.6 tied the exit trigger itself back to the free-float and ADV thresholds from Part XII: a looser, later trigger for liquid names, a tighter, earlier trigger with a liquidity buffer for thin ones, each adjustment made in a small step, tested against several historical stretches rather than just the worst one, and documented with its reasoning attached rather than left as an unexamined habit.
The broader lesson underneath all of this is that both halves of a trading system, the entry score from Chapter 80 and the exit rule from this chapter, are only trustworthy for as long as the market conditions they were tested against keep resembling the market conditions they will actually be used in. NEPSE in 2026 is not NEPSE in 2021: the circuit band itself has changed, sector composition shifts, and the free-float and liquidity profile of individual stocks moves as companies grow, merge, or get diluted through further share issuance. A rule calibrated carefully against the 2021-2022 correction is not guaranteed to be calibrated correctly for whatever the next correction looks like.
That is precisely the subject of Chapter 82, Measuring and Managing Model Drift. A well-backtested Canon Score and a carefully refined exit rule, of the kind built across this chapter and the two before it, are not finished products to be set once and trusted forever. Markets change regime, sometimes gradually and sometimes suddenly, and a scoring system or exit rule that quietly stops matching current conditions will not announce its own failure, it will simply start producing worse results without an obvious cause. The next chapter builds the ongoing monitoring habits needed to catch that decay early: what to measure, how often, and what a meaningful warning sign looks like as distinct from ordinary short-term noise, so that calibration becomes a continuing practice rather than a one-time achievement.