INVITE-ONLY SCRIPT
Interest Rate Direction Probability

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.
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.
招待専用スクリプト
このスクリプトは作者が承認したユーザーのみアクセス可能です。使用するにはアクセス申請をして許可を得る必要があります。通常は支払い後に承認されます。詳細は下記の作者の指示に従うか、gurpleに直接お問い合わせください。
TradingViewは、作者を完全に信頼し、スクリプトの動作を理解していない限り、有料スクリプトの購入・使用を推奨しません。コミュニティスクリプトには無料のオープンソースの代替が多数あります。
作者の指示
You ask me in person and, like a proper gentleman, I give you access.
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。
招待専用スクリプト
このスクリプトは作者が承認したユーザーのみアクセス可能です。使用するにはアクセス申請をして許可を得る必要があります。通常は支払い後に承認されます。詳細は下記の作者の指示に従うか、gurpleに直接お問い合わせください。
TradingViewは、作者を完全に信頼し、スクリプトの動作を理解していない限り、有料スクリプトの購入・使用を推奨しません。コミュニティスクリプトには無料のオープンソースの代替が多数あります。
作者の指示
You ask me in person and, like a proper gentleman, I give you access.
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。