The Sahm Recession Indicator devised by Economist Claudia Sahm is a rather insightful tool that captures the onset of recessions by utilizing unemployment data, which can provide more real-time insights compared to quarterly GDP reports. If the three-month simple moving average (SMA) of the unemployment rate exceeds the minimum unemployment rate of the previous 12 months by 0.5 percentage points, it indicates a high likelihood of a recession.
This script allows you to visualize this indicator and set up alerts for when this criterion indicates that a recession could be coming.