OPEN-SOURCE SCRIPT
Speculation/Caution Ratio

█ OVERVIEW
Speculation/Caution Ratio (NDX/DJU, raw) plots the Nasdaq-100 divided by the Dow Jones Utility Average as an absolute level in a separate pane, with reference lines at documented historical milestones and a label showing the current ratio. It is the long-history companion to the detrended sector z-score. It deliberately preserves the non-stationary level so that the full record from 1985 to the present, including the 2000 peak, is visible on a single pane.
█ HISTORY / BACKGROUND
The ratio of the Nasdaq-100 to the Dow Jones Utility Average as a speculation-versus-caution gauge is associated with Robert Prechter and Elliott Wave International. The reasoning is that the Nasdaq-100 represents high-beta, long-duration growth, standing in for speculation, while the Dow Jones Utility Average, a price-weighted average of fifteen utilities, represents low-beta, yield-driven caution. Observed levels include approximate parity in the 1980s, roughly 15 to 1 at the March 2000 peak, a decline toward 3 to 1 across the post-2000 decade, and a higher reading in the 2020s. These are descriptive observations of where the ratio has traded, not signals.
█ HOW IT WORKS
• Both legs are requested with request.security at the chart resolution using closing values.
• The ratio is the numerator close divided by the denominator close, computed only when both legs are present and positive.
• An optional simple moving average smooths the ratio when the smoothing length is greater than 1. At the default of 1, the raw ratio is plotted.
• Horizontal reference lines are drawn at 1, 3, and 15, corresponding to the historical levels described above.
• On the last bar, a label prints the current ratio to one decimal place.
█ HOW TO USE
Read the line as the prevailing balance of offensive versus defensive leadership. A rising ratio indicates speculation outpacing caution; a falling ratio indicates the reverse. The reference lines provide historical context: proximity to the 15 line recalls the 2000 peak, the 1 line marks historical parity, and the 3 line marks the post-2000 trough.
Recommended timeframe is weekly or monthly for the secular view. Note that the level is not comparable across decades; see Notes. For a calibrated, cross-era reading, use the companion z-score script.
Visual elements: the ratio line is teal. The 1 and 3 references are gray, dashed and dotted respectively, and the 15 reference is orange dashed. The last-bar label shows the live value.
█ SETTINGS
• Speculation leg (numerator): default NASDAQ:NDX (Nasdaq-100).
• Caution leg (denominator): default DJ:DJU (Dow Jones Utility Average). If it does not load, try TVC:DJU.
• Smoothing (SMA, bars): 1 plots the raw ratio; higher values reduce visual noise. Default 1, minimum 1.
• Show historical reference levels: toggles the 1, 3, and 15 lines. Default on.
• Label current ratio: toggles the last-bar value label. Default on.
█ WHAT MAKES IT ORIGINAL
This is a faithful implementation of a known public construct rather than a new method, and it is published open. Its contribution is framing and disclosure. It pairs the raw ratio with documented historical reference levels and an explicit statement of the level's non-stationarity, and it is built as the deep-history half of a two-part pairing whose other half supplies the calibrated, detrended reading. The value it adds is the long, uninterrupted record that cap-weighted, sector-clean pairs cannot reach on this platform.
█ NOTES / LIMITATIONS
• Non-stationary level. The ratio drifts upward over decades because of index composition changes, divergent sector earnings growth, and the interest-rate cycle. Absolute levels are not comparable across eras, and a new high does not by itself establish a new sentiment extreme. Use the companion z-score for a comparable reading.
• Construction mismatch. The numerator is a modified cap-weighted index; the denominator is a price-weighted average of fifteen stocks. The two are not built on the same basis, which is part of why the level is not a clean sentiment measure.
• Symbol availability. The Dow Jones Utility Average symbol convention varies by data feed. If DJ:DJU returns na, substitute TVC:DJU. The Nasdaq-100 numerator requires history from 1985 for the full record.
• Real-time behavior. Confirmed historical values do not repaint. The current bar updates while it is open and settles on close. No lookahead is requested.
• Chart symbol. Output depends only on the two leg inputs. The chart's own symbol does not affect the calculation.
• Reference lines are descriptive context, not buy or sell signals.
Speculation/Caution Ratio (NDX/DJU, raw) plots the Nasdaq-100 divided by the Dow Jones Utility Average as an absolute level in a separate pane, with reference lines at documented historical milestones and a label showing the current ratio. It is the long-history companion to the detrended sector z-score. It deliberately preserves the non-stationary level so that the full record from 1985 to the present, including the 2000 peak, is visible on a single pane.
█ HISTORY / BACKGROUND
The ratio of the Nasdaq-100 to the Dow Jones Utility Average as a speculation-versus-caution gauge is associated with Robert Prechter and Elliott Wave International. The reasoning is that the Nasdaq-100 represents high-beta, long-duration growth, standing in for speculation, while the Dow Jones Utility Average, a price-weighted average of fifteen utilities, represents low-beta, yield-driven caution. Observed levels include approximate parity in the 1980s, roughly 15 to 1 at the March 2000 peak, a decline toward 3 to 1 across the post-2000 decade, and a higher reading in the 2020s. These are descriptive observations of where the ratio has traded, not signals.
█ HOW IT WORKS
• Both legs are requested with request.security at the chart resolution using closing values.
• The ratio is the numerator close divided by the denominator close, computed only when both legs are present and positive.
• An optional simple moving average smooths the ratio when the smoothing length is greater than 1. At the default of 1, the raw ratio is plotted.
• Horizontal reference lines are drawn at 1, 3, and 15, corresponding to the historical levels described above.
• On the last bar, a label prints the current ratio to one decimal place.
█ HOW TO USE
Read the line as the prevailing balance of offensive versus defensive leadership. A rising ratio indicates speculation outpacing caution; a falling ratio indicates the reverse. The reference lines provide historical context: proximity to the 15 line recalls the 2000 peak, the 1 line marks historical parity, and the 3 line marks the post-2000 trough.
Recommended timeframe is weekly or monthly for the secular view. Note that the level is not comparable across decades; see Notes. For a calibrated, cross-era reading, use the companion z-score script.
Visual elements: the ratio line is teal. The 1 and 3 references are gray, dashed and dotted respectively, and the 15 reference is orange dashed. The last-bar label shows the live value.
█ SETTINGS
• Speculation leg (numerator): default NASDAQ:NDX (Nasdaq-100).
• Caution leg (denominator): default DJ:DJU (Dow Jones Utility Average). If it does not load, try TVC:DJU.
• Smoothing (SMA, bars): 1 plots the raw ratio; higher values reduce visual noise. Default 1, minimum 1.
• Show historical reference levels: toggles the 1, 3, and 15 lines. Default on.
• Label current ratio: toggles the last-bar value label. Default on.
█ WHAT MAKES IT ORIGINAL
This is a faithful implementation of a known public construct rather than a new method, and it is published open. Its contribution is framing and disclosure. It pairs the raw ratio with documented historical reference levels and an explicit statement of the level's non-stationarity, and it is built as the deep-history half of a two-part pairing whose other half supplies the calibrated, detrended reading. The value it adds is the long, uninterrupted record that cap-weighted, sector-clean pairs cannot reach on this platform.
█ NOTES / LIMITATIONS
• Non-stationary level. The ratio drifts upward over decades because of index composition changes, divergent sector earnings growth, and the interest-rate cycle. Absolute levels are not comparable across eras, and a new high does not by itself establish a new sentiment extreme. Use the companion z-score for a comparable reading.
• Construction mismatch. The numerator is a modified cap-weighted index; the denominator is a price-weighted average of fifteen stocks. The two are not built on the same basis, which is part of why the level is not a clean sentiment measure.
• Symbol availability. The Dow Jones Utility Average symbol convention varies by data feed. If DJ:DJU returns na, substitute TVC:DJU. The Nasdaq-100 numerator requires history from 1985 for the full record.
• Real-time behavior. Confirmed historical values do not repaint. The current bar updates while it is open and settles on close. No lookahead is requested.
• Chart symbol. Output depends only on the two leg inputs. The chart's own symbol does not affect the calculation.
• Reference lines are descriptive context, not buy or sell signals.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.