Skip to content
All library documents

Monte Carlo First-Passage Time Estimates for Price Thresholds

Article TradingView scripts

Summary

This indicator estimates how many bars simulated prices may take to reach an upside or downside threshold from the current close. It derives historical log-return volatility and average drift over a configurable lookback, then generates Monte Carlo paths using normally distributed random shocks. For each path, it records the first time each threshold is reached, tallies which side is reached first, and summarizes hit times with percentiles or sigma-based displays. Results are translated into approximate clock time using the chart timeframe, with optional projected risk zones and labels.

The tool allows users to change the threshold, simulation count, maximum path length, and drift assumption, including neutral and reduced-drift scenarios. These outputs are conditional on the chosen historical estimates and the simulated return model; they are not forecasts or guaranteed probabilities. The excerpt supplies no empirical calibration or out-of-sample validation, and finite simulations can leave some thresholds untouched or produce noisy estimates. The displayed first-hit proportions and timing distributions should therefore be interpreted as model-dependent scenarios.

Key ideas

  • The indicator simulates price paths from estimated log-return drift and volatility.
  • Each path records whether an upside or downside price threshold is reached first and the associated times.
  • Hit-time distributions are summarized with percentiles or sigma-related levels.
  • Users can vary drift assumptions, threshold size, simulation horizon, and simulation count.
  • Estimates depend on the historical window and random-walk model and are not validated forecasts.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.