TradingView
WhaleCrew
9 mag 2022 21:31

Buffett Indicator: Wilshire 5000 to GDP Ratio [WhaleCrew] 

S&P 500SP

Descrizione

Our Implementation of the famous Buffett Indicator a long-term valuation indicator for stocks.

Calculation: Wilshire 5000 Index divided by US GDP (Gross Domestic Product)

Note di rilascio

Changed title

Note di rilascio

Fixed calculation (TradingView made changes to the FRED:GDP symbol)
Commenti
Rise_of_Skywalker
added the +/- 2 standard deviation into the ta.sma(ratio, i_maLength) function. However, it seems that some areas are contracting. I am not sure how to draw a linear line so that the standard deviation becomes an offset with equal distance with the ta.sma(ratio, i_maLength)
Rise_of_Skywalker
SMA_ratio = ta.sma(ratio, i_maLength)
std_dev = ta.stdev(SMA_ratio, i_maLength)

// Plots
plot(SMA_ratio, color=color.blue, linewidth=2, title='SMA')
plot(SMA_ratio + 2 * std_dev, color=color.red, linewidth=1, title='SMA + 2 STD')
plot(SMA_ratio - 2 * std_dev, color=color.green, linewidth=1, title='SMA - 2 STD')
tjfopp
Thanks for this!
WhaleCrew
@tjfopp, Thanks for your comment :)
deltaccm
are there any changes in tradingview unit calculation? the number is 0 right now
WhaleCrew
@deltaccm, Thank's for your comment, I just fixed the calculation (TradingView made changes to the FRED:GDP symbol).
masala
Well done - thanks for sharing!
WhaleCrew
@masala, You're welcome :)
chasekempf13
Question for you: How do I get the historical trend line to lay on the Buffett indicator likes yours?
WhaleCrew
@chasekempf13, Make sure to enable the checkbox in the indicator's settings
Altro