INVITE-ONLY SCRIPT
업데이트됨 Hierarchical Hidden Markov Model - Probability Cone

The Hierarchical Hidden Markov Model - Probability Cone Indicator utilizes Hierarchical Hidden Markov Models (HHMMs) to forecast future price movements in financial markets. The hierarchical structure allows HHMMs to capture longer-term dependencies and more complex patterns in time series data compared to standard HMMs. The indicator uses HHMMs to model and predict future states and their associated outputs based on the current state and model parameters. These models are comprised of three main components: transition and termination probabilites, emission probabilities, and initial probabilities. Transition probabilities determine the likelihood of moving from one state to another. Emission probabilities indicate the likelihood of observing a specific output given a state (e.g., log return). Initial probabilities describe the overall probability distribution of the states in the model (i.e., long-run probabilities).
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
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
릴리즈 노트
- minor changes릴리즈 노트
-초대 전용 스크립트
이 스크립트는 작성자가 승인한 사용자만 접근할 수 있습니다. 사용하려면 요청을 보내고 승인을 받아야 합니다. 일반적으로 결제 후에 승인이 이루어집니다. 자세한 내용은 아래 작성자의 지침을 따르거나 Motgench에게 직접 문의하세요.
이 프라이빗, 인바이트-온리 스크립트는 스크립트 관리자가 리뷰하지 않았으며 하우스 룰 준수 여부가 결정되지 않았습니다. 트레이딩뷰는 스크립트 작성자를 완전히 신뢰하고 스크립트 작동 방식을 이해하지 않는 한 스크립트 비용을 지불하거나 사용하지 않는 것을 권장하지 않습니다. 무료 오픈소스 대체 스크립트는 커뮤니티 스크립트에서 찾을 수 있습니다.
작성자 지시 사항
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
초대 전용 스크립트
이 스크립트는 작성자가 승인한 사용자만 접근할 수 있습니다. 사용하려면 요청을 보내고 승인을 받아야 합니다. 일반적으로 결제 후에 승인이 이루어집니다. 자세한 내용은 아래 작성자의 지침을 따르거나 Motgench에게 직접 문의하세요.
이 프라이빗, 인바이트-온리 스크립트는 스크립트 관리자가 리뷰하지 않았으며 하우스 룰 준수 여부가 결정되지 않았습니다. 트레이딩뷰는 스크립트 작성자를 완전히 신뢰하고 스크립트 작동 방식을 이해하지 않는 한 스크립트 비용을 지불하거나 사용하지 않는 것을 권장하지 않습니다. 무료 오픈소스 대체 스크립트는 커뮤니티 스크립트에서 찾을 수 있습니다.
작성자 지시 사항
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.