USD Index Signal

A reproducible specification using FRED DTWEXBGS (Broad U.S. Dollar Index) to derive a macro‑directional risk signal, applicable across asset classes. This specification is USD‑centric and the labels reflect U.S. dollar direction.

Abstract

This document formalises a rules‑based signal from the Broad U.S. Dollar Index (DTWEXBGS). The method computes a 12‑month moving average and a 6‑month percentage change on a monthly series, then classifies regimes as Bullish, Neutral, or Bearish.. The framework is broadly applicable to global macro analysis, FX strategies, and commodity risk interpretation, The labels refer strictly to U.S. dollar direction and are not asset‑specific.

1. Data

The series is fetched from FRED with optional title metadata, coerced to numeric, and normalised to a monthly calendar prior to indicator construction.

2. Alignment & Transformations

  1. Monthly alignment: resample to MS (month‑start) and take the last value in each month.
  2. Indicators: compute a 12‑month moving average and a 6‑month percentage change:
    USD_{12M\,MA,t} = MA_{12}(USD_t)
    USD_{6M\,chg,t} = 100 \times \frac{USD_t - USD_{t-6}}{USD_{t-6}}

3. Signal Classification

Interpretation is USD-centric: a weakening U.S. dollar reflects potential easing in financial conditions, while a strengthening U.S. dollar indicates tightening. Signal labels refer strictly to U.S. dollar direction and are not asset-specific.

  • Bearish (USD): USD_{6M\,chg} < −5% or USD_t < USD_{12M\,MA,t}.
  • Bullish (USD): USD_{6M\,chg} > +5% or USD_t > USD_{12M\,MA,t}.
  • Neutral: otherwise or when inputs are missing.

Thresholds (±5%) are heuristic and may be tuned to volatility regimes or target applications.

4. Implementation Notes (Python)

def fetch_fred_series_df(series_id):
    try:
        s = fred.get_series(series_id)
        if s is None or s.empty:
            return pd.DataFrame(columns=['Series_ID','title','Date','Value'])
        df = s.reset_index(); df.columns = ['Date','Value']
        df['Series_ID'] = series_id
        try:
            meta = fred.get_series_info(series_id)
            df['title'] = getattr(meta, 'title', None)
        except Exception:
            df['title'] = None
        df['Date'] = pd.to_datetime(df['Date'])
        df['Value'] = pd.to_numeric(df['Value'], errors='coerce')
        return df[['Series_ID','title','Date','Value']]
    except Exception as e:
        print(f"✗ Error fetching {series_id}: {e}")
        return pd.DataFrame(columns=['Series_ID','title','Date','Value'])

# Fetch
usd_df = fetch_fred_series_df('DTWEXBGS')

# Monthly indicators
monthly = usd_df.set_index('Date')['Value'].resample('MS').last().to_frame()
monthly.columns = ['Value_Monthly']
monthly['USD_12Month_MA']    = monthly['Value_Monthly'].rolling(12).mean()
monthly['USD_6Month_Change'] = monthly['Value_Monthly'].pct_change(6) * 100

def generate_usd_signal(row):
    usd_6month_change = row['USD_6Month_Change']
    usd_value = row['Value_Monthly']
    usd_12month_ma = row['USD_12Month_MA']

    if pd.isna(usd_6month_change) or pd.isna(usd_value) or pd.isna(usd_12month_ma):
        return 'Neutral'

    # Bearish USD (weakening)
    if (usd_6month_change < -5) or (usd_value < usd_12month_ma):
        return 'Bearish'

    # Bullish USD (strengthening)
    if (usd_6month_change > 5) or (usd_value > usd_12month_ma):
        return 'Bullish'

    return 'Neutral'

monthly['USD_Signal'] = monthly.apply(generate_usd_signal, axis=1)

5. Assumptions & Limitations

6. Reproducibility

7. Applications

The USD Index Signal serves as a broad macro indicator of currency strength, risk sentiment, and financial conditions. It can be applied to FX positioning, cross-asset risk analysis, equity rotation strategies, and multi‑factor macro regime models alongside liquidity, rates, and inflation metrics.