Hierarchical Hidden Markov Model - Probability Cone

To estimate the probability cone forecast, the indicator integrates two primary methodologies: Gaussian approximation and importance sampling with Monte Carlo. The Gaussian approximation is utilized for estimating the central 90% of future prices. This method provides a quick and efficient estimation within this central range, capturing the most likely price movements. The Gaussian approximation results in a forecast with an equal mean and variance as the true forecast, but it may not accurately reflect higher moments like skewness and kurtosis. Therefore, the tail quantiles, which represent extreme price movements beyond the central range (90%), are estimated via importance sampling. This approach ensures a more accurate estimation of the skewness and kurtosis associated with extreme scenarios. While importance sampling leverages the flexibility of Monte Carlo and attempts to increase its efficiency by sampling from more precise areas of the distribution, it may still underestimate the most extreme quantiles associated with the lowest probabilities, which is an inherent limitation of the indicator.
Example of gaussian approximation cone:
Example of importance sampling cone:
Settings:
- Source: Data source used for the model
- Forecast Period: Number of bars ahead for generating forecasts.
- Simulation Number: Number of Monte Carlo simulations to run in the case of importance sampling.
- Body Probability: Specifies the inner range of the probability cone. The probability specifies the amount of observations that are expected to fall outside of this range.
- Tail Probability: Specifies the outer range of the probability cone. When this probability is under 5%, importance sampling will turn on.
- Lock Cone: When ticked on, the cone will be locked at its current position.
- Offset Cone Based on Date: When ticked on, the position of the cone will be determined by the selected date.
- Offset: When "Offset Cone Based on Date" is turned off, you can use offset setting to specify the position of the cone projection.
- Date: When "Offset Cone Based on Date" is turned on, you can use the date setting to specify the date from which the forecast starts.
- Reestimate Model Every N Bars: This is especially useful if you wish to use the indicator on lower timeframes where model estimation might take longer than for the new datapoint to arrive. In that case you can specify after how many bars the model should be reestimated.
- Training Period: Length of historical data used to train the HMM.
- Expectation Maximization Iterations: Number of iterations for the EM algorithm.
- Cone Colors: Customizable colors for the probability cone, when approximation is on and when importance sampling is on
Script sur invitation seulement
Seuls les utilisateurs approuvés par l'auteur peuvent accéder à ce script. Vous devrez demander et obtenir l'autorisation pour l'utiliser. Celle-ci est généralement accordée après paiement. Pour plus de détails, suivez les instructions de l'auteur ci-dessous ou contactez directement Motgench.
Notez que ce script privé, sur invitation uniquement, n'a pas été revu par les modérateurs de scripts et que sa conformité avec nos Règles est indéterminée. TradingView ne recommande PAS de payer ou d'utiliser un script à moins que vous ne fassiez entièrement confiance à son auteur et que vous compreniez comment il fonctionne. Vous pouvez également trouver des alternatives gratuites et open-source dans nos scripts communautaires.
Instructions de l'auteur
Clause de non-responsabilité
Script sur invitation seulement
Seuls les utilisateurs approuvés par l'auteur peuvent accéder à ce script. Vous devrez demander et obtenir l'autorisation pour l'utiliser. Celle-ci est généralement accordée après paiement. Pour plus de détails, suivez les instructions de l'auteur ci-dessous ou contactez directement Motgench.
Notez que ce script privé, sur invitation uniquement, n'a pas été revu par les modérateurs de scripts et que sa conformité avec nos Règles est indéterminée. TradingView ne recommande PAS de payer ou d'utiliser un script à moins que vous ne fassiez entièrement confiance à son auteur et que vous compreniez comment il fonctionne. Vous pouvez également trouver des alternatives gratuites et open-source dans nos scripts communautaires.