OPEN-SOURCE SCRIPT
Bitcoin Gold Fair Value Model | FREE

Bitcoin Gold Fair Value Model | FREE
This script presents a quantitative model that explores the historical relationship between Bitcoin (BTCUSD) and Gold (TVC:GOLD).
It estimates Bitcoin’s fair value projection based on the price of gold, using a rolling regression model calculated over a user-defined lookback period (default: 1000 days).
📘 How It Works
⚙️ Features
📊 How to Use
⚠️ Important Notes
This script presents a quantitative model that explores the historical relationship between Bitcoin (BTCUSD) and Gold (TVC:GOLD).
It estimates Bitcoin’s fair value projection based on the price of gold, using a rolling regression model calculated over a user-defined lookback period (default: 1000 days).
📘 How It Works
- The model fits a simple linear regression of Bitcoin’s daily close price versus Gold’s daily close price.
- From this relationship, it computes a projected Bitcoin price based on today’s gold value, plotted forward by a chosen number of days (default: 65).
- Confidence ranges (±1 standard deviation and 95% interval) help visualize the uncertainty around the projection.
- A statistical panel displays the projected price, range estimates, and R² value, indicating the strength of correlation between the two assets.
⚙️ Features
- Rolling regression using historical BTC and Gold data.
- Forward fair-value projection line (customizable projection period).
- 1σ (standard deviation) and 95% confidence bands.
- On-chart statistical summary with current model values.
- Real-time updates when new daily data becomes available.
📊 How to Use
- Recommended for use on the daily timeframe with the INDEX:BTCUSD symbol.
- The model provides a statistical estimate of Bitcoin’s price relative to gold trends, not a trading signal.
- The R² value can be used to assess the current strength of correlation - higher R² suggests a more stable relationship, while lower values indicate weaker or changing dynamics.
⚠️ Important Notes
- This indicator is intended for educational and analytical purposes only.
- It does not predict prices or provide financial advice.
- Relationships between assets can and do change over time.
- Always perform your own research and use additional tools for confirmation.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.