ml_forecast Probabilistic forecasting toolkit

The “emit P(event), don’t assert yes/no” pillar: an analytical volatility cone, an empirical session-open reach-probability counter, a robust (Theil-Sen) trendline, a pretrained logistic hazard head with its survival curve, total-variation distance for scoring a predicted distribution, and empirical-Bayes trust shrinkage.
Design: Pine has no RNG, so the cone is ANALYTICAL (z·σ·√h) — deterministic and non-repainting, not a random Monte-Carlo. The hazard head is a FORWARD PASS over weights you train OFFLINE (logistic regression on your labeled events) and pass frozen — the library does the inference, not the training. Stateful pieces (reach counters) keep their state HOST-side; this library owns the math.
Concept credit: volatility cones, empirical reach/touch probability, Theil-Sen robust regression, discrete-time survival hazards, total-variation distance, and empirical-Bayes shrinkage are standard statistical techniques — original, dependency-free Pine v6 packaging. Educational; not financial advice.
Library "ml_forecast"
volCone(price, sigmaPerBar, horizon, z)
Parameters:
price (float)
sigmaPerBar (float)
horizon (simple int)
z (simple float)
reachRecord(hits, maxExcursionPct, stepPct)
Parameters:
hits (array<float>)
maxExcursionPct (float)
stepPct (simple float)
reachProb(hits, k, sessions)
Parameters:
hits (array<float>)
k (int)
sessions (float)
theilSen(src, len)
Parameters:
src (float)
len (simple int)
logisticHazard(features, weights, bias)
Parameters:
features (array<float>)
weights (array<float>)
bias (simple float)
survivalProb(p0, h, k)
Parameters:
p0 (float)
h (float)
k (simple int)
survLen(p0, h, kmax)
Parameters:
p0 (float)
h (float)
kmax (simple int)
tvd(p, q)
Parameters:
p (array<float>)
q (array<float>)
trustWeight(trustCx, trustCc)
Parameters:
trustCx (float)
trustCc (float)
trustShrink(forecast, realized, trust)
Parameters:
forecast (float)
realized (float)
trust (float)
Design: Pine has no RNG, so the cone is ANALYTICAL (z·σ·√h) — deterministic and non-repainting, not a random Monte-Carlo. The hazard head is a FORWARD PASS over weights you train OFFLINE (logistic regression on your labeled events) and pass frozen — the library does the inference, not the training. Stateful pieces (reach counters) keep their state HOST-side; this library owns the math.
Concept credit: volatility cones, empirical reach/touch probability, Theil-Sen robust regression, discrete-time survival hazards, total-variation distance, and empirical-Bayes shrinkage are standard statistical techniques — original, dependency-free Pine v6 packaging. Educational; not financial advice.
Library "ml_forecast"
volCone(price, sigmaPerBar, horizon, z)
Parameters:
price (float)
sigmaPerBar (float)
horizon (simple int)
z (simple float)
reachRecord(hits, maxExcursionPct, stepPct)
Parameters:
hits (array<float>)
maxExcursionPct (float)
stepPct (simple float)
reachProb(hits, k, sessions)
Parameters:
hits (array<float>)
k (int)
sessions (float)
theilSen(src, len)
Parameters:
src (float)
len (simple int)
logisticHazard(features, weights, bias)
Parameters:
features (array<float>)
weights (array<float>)
bias (simple float)
survivalProb(p0, h, k)
Parameters:
p0 (float)
h (float)
k (simple int)
survLen(p0, h, kmax)
Parameters:
p0 (float)
h (float)
kmax (simple int)
tvd(p, q)
Parameters:
p (array<float>)
q (array<float>)
trustWeight(trustCx, trustCc)
Parameters:
trustCx (float)
trustCc (float)
trustShrink(forecast, realized, trust)
Parameters:
forecast (float)
realized (float)
trust (float)
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.