OPEN-SOURCE SCRIPT

US Recession Indicator

Cập nhật
The US Recession Indicator is designed to identify recessions as they happen, using two reputable indicators that have accurately foreseen all past recessions since 1969. Unlike the National Bureau of Economic Research (NBER) which determines recession dates after the fact, this indicator seeks to spot recessions in real-time. When both of these distinct metrics meet certain criteria, the chart's background becomes shaded, signifying a strong likelihood that the economy is in a recession. Furthermore, a built-in alert system keeps users updated without constant monitoring.

The first metric is the Smoothed Recession Probabilities developed by Marcelle Chauvet. It is based on a dynamic-factor markov-switching model that assesses four monthly coincident variables: non-farm payroll employment, the index of industrial production, real personal income excluding transfer payments and real manufacturing and trade sales. It offers a mathematical analysis of how recessions deviate from expansions. In essence, this index mirrors the probability of the prevailing true economic situation being a recession, grounded on the current GDP data.

The second metric is the Sahm Rule Recession Indicator developed by Claudia Sahm. It operates on the principle that changes in the unemployment rate can be used to identify the onset of a recession. According to this rule, if the three-month moving average of the unemployment rate rises by 0.5 percentage points or more above its lowest point from the preceding year, it flags a potential recession.

For this combined indicator, the thresholds are intentionally set lower than when each metric is used individually. Both metrics must simultaneously suggest a potential recession in order to send a signal. This stems from the realisation that neither metric is infallible and has, on occasion, sent false signals in the past. By requiring both to align, the likelihood of a false positive is reduced. However, it's crucial to understand that past performance does not guarantee future results, leaving the door open for potential false alerts which may not be confirmed by the NBER.
Phát hành các Ghi chú

  • Fixed a bug with the shadow that made the entire background green.
  • Added the option to display the US Composite Leading Indicator (CLI) and the US Unemployment rate to better assess the likelihood of a recession.
  • Added the option to display the spread between the 3-month and 10-year US government yield to identify yield curve inversions, which are historical indicators of potential recessions.
CycleseducationalforecastingmacroMacroeconomicsrecessionStocksunemploymentunemploymentrateUSAyieldcurveyieldcurveinversion

Mã nguồn mở

Theo tinh thần TradingView thực sự, tác giả của tập lệnh này đã xuất bản dưới dạng nguồn mở để các nhà giao dịch có thể hiểu và xác minh. Chúc mừng tác giả! Bạn có thể sử dụng miễn phí. Tuy nhiên, bạn cần sử dụng lại mã này theo Quy tắc nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?

Thông báo miễn trừ trách nhiệm