INVITE-ONLY SCRIPT

Interest Rate Direction Probability

44
This script estimates the probability that an interest‑rate series (e.g., Fed Funds Rate, 10‑yr Treasury yield) will move up or down in the next period. It exists as a learning effort in creating TV Strategies. It's probably good for nothing. Then again, I've found 'good for nothing' scripts from others that I've twisted to neat indicator toys so…

It uses a simple rolling‑lookback of historical data to count how often a chosen predictor (currently 10‑bar momentum) correctly forecasted the direction of the next move.

The resulting probability curves are plotted on the chart, and optional strategy entries can be generated when those probabilities cross user‑defined thresholds.

Important: This is a research / back‑testing tool only.

Predicting macro‑economic rates is inherently noisy and uncertain; never rely on this script for live trading without extensive validation.

What it tries to do:
•Historical Probability: Calculates the frequency of correct predictions over a user‑defined lookback window.
•Momentum Predictor: Uses 10‑bar momentum (close – SMA) as the primary signal.
•Correlation Preview: Correlation between the rate and unemployment (20‑bar) is computed but not yet used in the probability calculation – a placeholder for future extensions.
•Plotting: Two curves: green = probability of an up‑move, red = probability of a down‑move.
•Strategy Mode: Optional strategy() logic that goes long when prob_up > thresh_up and short when prob_down > thresh_dn.
•Customizable Inputs: Rate symbol, unemployment symbol, lookback length, probability thresholds.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.