Direct answer
A worked example of Stochastic Strategies is a step-by-step, numeric scenario that translates Stochastic oscillator readings into conditional decision rules. It states every assumption (window lengths, thresholds, evaluation timing, and any costs) so a reader can reproduce the same calculations and see how the rules would behave under a specific set of price data.
Mechanism or definition
The Stochastic oscillator compares the current closing price to the high–low range over a recent lookback window. Two common outputs are:
- %K: the current position of price within the recent range.
- %D: a moving average (often a simple average) of %K across several steps.
A typical %K formula (using the standard “fast stochastic” style) is:
- %K = 100 × (Close − LowestLow) / (HighestHigh − LowestLow)
Assume a lookback window of N periods. “HighestHigh” and “LowestLow” refer to the maximum high and minimum low within those N periods. If the range is zero (HighestHigh equals LowestLow), %K is undefined; practical rules often need a defined fallback.
A “Stochastic strategy” then means rules that use these indicator values in a conditional way (for example: “if %K is below a threshold and %D is rising, then do X”). The key is that the strategy’s behavior comes from the rule logic, not from the oscillator alone.
Evidence or example
Worked scenario (with all assumptions)
Assumptions for this example:
- Lookback window N = 5 periods.
- Use %D as a 3-period simple moving average of %K.
- “Evaluation timing”: indicator values are computed at the end of each period using that period’s close.
- Decision rule (illustrative only): Trigger condition is “%K crosses above %D” and %K ≥ 20.
- Two costs included as fixed fractions (illustrative): transaction cost c = 0.10% of price on entry and c = 0.10% on exit.
- We simulate one position: enter at the next period’s open price and exit at the following period’s open price. (This avoids guessing intraperiod moves.)
Now the data. Suppose periods 1–6 have highs, lows, and closes like this (price units are arbitrary):
- Period 6 (to compute %K and %D for period 6):
- LowestLow over periods 2–6 = 95
- HighestHigh over periods 2–6 = 110
- Close6 = 102
Compute %K6:
- %K6 = 100 × (102 − 95) / (110 − 95)
- %K6 = 100 × 7 / 15
- %K6 = 46.67
To compute %D6 (a 3-period average of %K), assume prior computed %K values:
- %K4 = 35
- %K5 = 40
- %K6 = 46.67
Then:
- %D6 = (35 + 40 + 46.67) / 3
- %D6 = 121.67 / 3
- %D6 = 40.56
Check the trigger
Assume at period 5 the relationship was reversed (so a cross happens):
- %K5 = 40
- %D5 = 42 (assume based on %D5’s prior three %K values)
At period 6:
- %K6 = 46.67 and %D6 = 40.56
- %K crossed above %D
- %K6 ≥ 20
So the trigger condition is met at period 6.
Translate to one scenario return
Assume execution prices under the evaluation timing:
- Enter at Open7 = 103
- Exit at Open8 = 106
- Transaction cost each side: c = 0.10%
Gross price change factor:
- Gross return = 106/103 − 1
- Gross return ≈ 0.02913 (2.913%)
Apply costs as multiplicative deductions on entry and exit for simplicity:
- Net factor ≈ (1 − 0.001) × (106/103) × (1 − 0.001)
- Net ≈ (0.999 × 106/103 × 0.999) − 1
- Net ≈ 0.999^2 × 1.02913 − 1
- Net ≈ 0.998001 × 1.02913 − 1
- Net ≈ 1.02710 − 1
- Net ≈ 2.71%
The worked example shows exactly how indicator math and rule logic combine into a hypothetical trade outcome under stated assumptions.
Limitations and risks
- The oscillator is not the market outcome. %K and %D are transformations of recent ranges; turning them into decisions does not remove uncertainty.
- Assumptions drive results. Window length (N), %D averaging method, and evaluation timing (close vs. open execution) can materially change triggers.
- Undefined or noisy conditions. If HighestHigh equals LowestLow, %K becomes undefined. Also, indicator values can react quickly to recent highs/lows, creating whipsaw behavior.
- Failure mode: rule overfitting. Choosing thresholds and logic that match one historical scenario may not transfer to other periods; historical relationships do not establish future results.
- Costs and execution can erase edge. Even if a trigger occurs, slippage, spread, and transaction costs can dominate, especially when rules trade frequently.