> ## Documentation Index
> Fetch the complete documentation index at: https://docs.debtstack.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Compare Covenants

> Compare covenants across multiple companies

## Overview

Compare covenants across multiple companies or instruments. Useful for relative value analysis, identifying covenant-lite issuers, and understanding credit agreement differences.

## Request

<ParamField query="ticker" type="string" required>
  Comma-separated list of company tickers to compare.

  Example: `CHTR,DAL,AMC`
</ParamField>

<ParamField query="covenant_type" type="string">
  Filter by covenant type: `financial`, `negative`, `incurrence`, `protective`
</ParamField>

<ParamField query="test_metric" type="string">
  Filter by specific metric: `leverage_ratio`, `interest_coverage`, etc.
</ParamField>

## Examples

### Compare Leverage Covenants

<CodeGroup>
  ```bash curl theme={null}
  curl "https://api.debtstack.ai/v1/covenants/compare?ticker=CHTR,DAL,AMC&test_metric=leverage_ratio" \
    -H "X-API-Key: ds_xxxxx"
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.debtstack.ai/v1/covenants/compare",
      params={
          "ticker": "CHTR,DAL,AMC",
          "test_metric": "leverage_ratio"
      },
      headers={"X-API-Key": "ds_xxxxx"}
  )

  # Check which companies have leverage covenants
  for ticker, data in response.json()["companies"].items():
      if data["covenant_count"] == 0:
          print(f"{ticker}: No leverage covenant (covenant-lite)")
      else:
          for cov in data["covenants"]:
              print(f"{ticker}: {cov['threshold_type']} {cov['threshold_value']}x")
  ```
</CodeGroup>

### Response

```json theme={null}
{
  "tickers": ["CHTR", "DAL", "AMC"],
  "companies": {
    "CHTR": {
      "name": "Charter Communications, Inc.",
      "covenant_count": 1,
      "covenants": [
        {
          "covenant_type": "incurrence",
          "covenant_name": "Leverage Ratio Incurrence Test",
          "test_metric": "leverage_ratio",
          "threshold_value": 6.0,
          "threshold_type": "maximum",
          "test_frequency": "incurrence",
          "has_step_down": false
        }
      ]
    },
    "DAL": {
      "name": "Delta Air Lines, Inc.",
      "covenant_count": 1,
      "covenants": [
        {
          "covenant_type": "incurrence",
          "covenant_name": "Junior Lien Debt incurrence test",
          "test_metric": "leverage_ratio",
          "threshold_value": 1.6,
          "threshold_type": "maximum",
          "test_frequency": "incurrence",
          "has_step_down": false
        }
      ]
    },
    "AMC": {
      "name": "AMC Entertainment Holdings, Inc.",
      "covenant_count": 0,
      "covenants": []
    }
  },
  "comparison_matrix": [
    {
      "metric": "leverage_ratio",
      "CHTR": {
        "threshold_value": 6.0,
        "threshold_type": "maximum",
        "test_frequency": "incurrence"
      },
      "DAL": {
        "threshold_value": 1.6,
        "threshold_type": "maximum",
        "test_frequency": "incurrence"
      },
      "AMC": null
    }
  ],
  "presence_matrix": [
    {
      "covenant_name": "Leverage Ratio Incurrence Test",
      "CHTR": true,
      "DAL": false,
      "AMC": false
    },
    {
      "covenant_name": "Junior Lien Debt incurrence test",
      "CHTR": false,
      "DAL": true,
      "AMC": false
    }
  ],
  "meta": {
    "tickers_compared": 3,
    "total_covenants": 2,
    "filter_test_metric": "leverage_ratio"
  }
}
```

## Response Fields

### companies

Object keyed by ticker containing:

* `name`: Company name
* `covenant_count`: Number of matching covenants
* `covenants`: Array of covenant details

### comparison\_matrix

Side-by-side comparison of the same metric across companies. Useful for comparing threshold values directly.

### presence\_matrix

Shows which companies have each covenant type. Useful for identifying covenant-lite issuers.

## Use Cases

### Screen for Covenant-Lite Issuers

```python theme={null}
response = requests.get(
    "https://api.debtstack.ai/v1/covenants/compare",
    params={"ticker": "CHTR,ATUS,LUMN", "covenant_type": "financial"},
    headers={"X-API-Key": "ds_xxxxx"}
)

for ticker, data in response.json()["companies"].items():
    if data["covenant_count"] == 0:
        print(f"{ticker}: Covenant-lite (no financial maintenance covenants)")
```

### Compare Protective Covenants

```bash theme={null}
curl "https://api.debtstack.ai/v1/covenants/compare?ticker=RIG,VAL,DO&covenant_type=protective" \
  -H "X-API-Key: ds_xxxxx"
```

### Sector-Wide Covenant Analysis

```python theme={null}
# Compare covenants across telecom sector
tickers = "CHTR,ATUS,LUMN,FYBR,T,VZ,TMUS"
response = requests.get(
    "https://api.debtstack.ai/v1/covenants/compare",
    params={"ticker": tickers, "test_metric": "leverage_ratio"},
    headers={"X-API-Key": "ds_xxxxx"}
)

matrix = response.json()["comparison_matrix"]
for row in matrix:
    if row["metric"] == "leverage_ratio":
        for ticker in tickers.split(","):
            cov = row.get(ticker)
            if cov:
                print(f"{ticker}: Max {cov['threshold_value']}x leverage")
            else:
                print(f"{ticker}: No leverage covenant")
```
