Add the SP500 ttm Earnings Yield Spreads vs the 3 Month and 10 Year Treasury Rates. Short Spread = SP500 E/P ttm - 3 Month Treasury Rate Long Spread = SP500 E/P ttm - 10 Year Treasury Rate
Symbol "SP500_EARNINGS_YIELD_MONTH" as the SP500 Earnings Yield Symbol "US03MY" as the 3 Month Treasury Rate Symbol "US10Y" as the 10 Year Treasury Rate
Based on research suggesting Earnings Yield and Interest Rates may have predictive power of future returns: - Market-Timing Strategies That Worked? - Pu Shen [2002] - Valuation Ratios and the Long-Run Stock Market Outlook - Campbell and Shiller [1998]
Inputs: Short Term Spread - Line for Short Term Spread Long Term Spread - Line for Long Term Spread Zero Line - Horizontal line at 0 Color Lines Based on Spread - Color the spreads green/red if spread is positive/negative Short 10th PCT - Line for Short Term Spread 10th percentile of historical values Long 10th PCT - Line for Long Term Spread 10th percentile of historical values Shade Below 10 PCT: Spread Must be Negative - Requirement the spread is negative to shade background Shade Background Below Short 10th Percentile - Shade the background if the Short Term Spread is below its 10th percentile. (and spread is negative if input above chosen) Shade Background Below Long 10th Percentile - Shade the background if the Long Term Spread is below its 10th percentile. (and spread is negative if input above chosen)
진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.