# PERCENTAGE METRIC EXPLANATIONS
## What Each Metric Means (With Examples)

---

## 📊 **30.7% Threshold MAPE ($1M) - What It Means**

### Definition:
**"On average, when actual cash flow is > $1M, the forecast error is 30.7% of the actual value."**

### How It's Calculated:
1. **Filter:** Only include weeks where |actual| > $1M
2. **Calculate:** For each week: |Error| / |Actual| × 100%
3. **Average:** Take the mean of all percentages

### Example from Your Data:

**Weeks Included (|actual| > $1M):**
- Week 43: Actual = -$7.86M, Predicted = -$5.49M
  - Error = $2.37M
  - MAPE = ($2.37M / $7.86M) × 100% = **30.1%**
  
- Week 44: Actual = +$7.81M, Predicted = +$5.36M
  - Error = $2.45M
  - MAPE = ($2.45M / $7.81M) × 100% = **31.3%**

**Weeks Excluded (|actual| < $1M):**
- Week 40: Actual = -$0.17M (too small, excluded)
- Week 41: Actual = -$0.43M (too small, excluded)
- Week 42: Actual = +$0.37M (too small, excluded)

**Result:** Average of Week 43 & 44 = (30.1% + 31.3%) / 2 = **30.7%**

### Interpretation:
✅ **30.7% means:** When cash flow is significant (>$1M), forecasts are off by about **30% on average**.

**Business Meaning:**
- If actual cash flow is $10M, forecast is typically within ±$3M
- If actual cash flow is $5M, forecast is typically within ±$1.5M

---

## 📊 **32.3% Direction-Aware MAPE - What It Means**

### Definition:
**"On average, when actual and predicted have the same direction (both inflow OR both outflow), the forecast error is 32.3% of the actual value."**

### How It's Calculated:
1. **Filter:** Only include weeks where actual and predicted have same sign
2. **Calculate:** For each week: |Error| / |Actual| × 100%
3. **Average:** Take the mean

### Example from Your Data:

**Weeks Included (Same Direction):**
- Week 42: Actual = +$0.37M (IN), Predicted = +$0.24M (IN) ✅
  - Error = $0.13M
  - MAPE = ($0.13M / $0.37M) × 100% = **35.3%**
  
- Week 43: Actual = -$7.86M (OUT), Predicted = -$5.49M (OUT) ✅
  - Error = $2.37M
  - MAPE = ($2.37M / $7.86M) × 100% = **30.1%**
  
- Week 44: Actual = +$7.81M (IN), Predicted = +$5.36M (IN) ✅
  - Error = $2.45M
  - MAPE = ($2.45M / $7.81M) × 100% = **31.3%**

**Weeks Excluded (Opposite Direction):**
- Week 40: Actual = -$0.17M (OUT), Predicted = +$4.90M (IN) ❌
- Week 41: Actual = -$0.43M (OUT), Predicted = +$0.76M (IN) ❌

**Result:** Average of Week 42, 43, 44 = (35.3% + 30.1% + 31.3%) / 3 = **32.3%**

### Interpretation:
✅ **32.3% means:** When the model correctly predicts direction (inflow vs outflow), the forecast error is about **32% of the actual value**.

**Business Meaning:**
- When model says "inflow" and actual is "inflow", error is ~32%
- When model says "outflow" and actual is "outflow", error is ~32%
- This is the **most business-meaningful** percentage metric

---

## 📊 **67.4% Scaled MAPE - What It Means**

### Definition:
**"On average, the forecast error is 67.4% of the average magnitude of actual cash flows."**

### How It's Calculated:
1. **Calculate:** Average absolute value of all actuals = $3.92M (example)
2. **For each week:** |Error| / Average_Magnitude × 100%
3. **Average:** Take the mean

### Example from Your Data:

**Average Magnitude:** (|-$0.17M| + |-$0.43M| + |$0.37M| + |-$7.86M| + |$7.81M|) / 5 = **$3.33M**

**Per-Week Scaled MAPE:**
- Week 40: Error = $5.07M → $5.07M / $3.33M = **152%**
- Week 41: Error = $1.19M → $1.19M / $3.33M = **36%**
- Week 42: Error = $0.13M → $0.13M / $3.33M = **4%**
- Week 43: Error = $2.37M → $2.37M / $3.33M = **71%**
- Week 44: Error = $2.45M → $2.45M / $3.33M = **74%**

**Result:** Average = (152% + 36% + 4% + 71% + 74%) / 5 = **67.4%**

### Interpretation:
⚠️ **67.4% means:** Forecast errors are about **67% of the typical cash flow magnitude**.

**Business Meaning:**
- If typical cash flow is ±$3M, errors are typically ±$2M
- More stable than standard MAPE (doesn't explode near zero)
- But less intuitive than Threshold MAPE

---

## 📊 **60.6% Sign-Aware SMAPE - What It Means**

### Definition:
**"A modified SMAPE that handles opposite signs (inflow vs outflow) more gracefully."**

### How It's Calculated:
1. **Same Sign Weeks:** Use standard SMAPE formula
2. **Opposite Sign Weeks:** Use absolute error / average magnitude
3. **Weighted Average:** Combine both

### Example from Your Data:

**Same Sign Weeks (42, 43, 44):**
- Standard SMAPE calculation
- Average: ~38%

**Opposite Sign Weeks (40, 41):**
- Error / Average Magnitude
- Average: ~200% (but weighted less)

**Result:** Weighted average = **60.6%**

### Interpretation:
⚠️ **60.6% means:** A hybrid metric that's more stable than standard SMAPE but still affected by opposite signs.

**Business Meaning:**
- Better than standard SMAPE (103%) but not as good as Direction-Aware MAPE (32.3%)
- Use when you want a single metric that handles all weeks

---

## 📊 **67.4% Weighted MAPE - What It Means**

### Definition:
**"MAPE weighted by absolute value - larger cash flows have more influence on the metric."**

### How It's Calculated:
1. **Weight each week** by |actual| / sum(|actual|)
2. **Calculate:** Weighted average of individual MAPEs
3. **Larger weeks count more**

### Example from Your Data:

**Weights:**
- Week 40: |-$0.17M| / Total = 0.2% weight
- Week 41: |-$0.43M| / Total = 1.0% weight
- Week 42: |$0.37M| / Total = 0.9% weight
- Week 43: |-$7.86M| / Total = 47.2% weight (heavily weighted!)
- Week 44: |$7.81M| / Total = 46.9% weight (heavily weighted!)

**Result:** **67.4%** (dominated by large weeks 43 & 44)

### Interpretation:
⚠️ **67.4% means:** When weighted by cash flow size, average error is 67% (large weeks dominate).

**Business Meaning:**
- Large cash flow weeks (like Week 43, 44) have more impact
- Small weeks (like Week 40, 41) have less impact
- Useful when large transactions are more important

---

## 📊 **103.1% Standard SMAPE - What It Means (Unreliable)**

### Definition:
**"Standard Symmetric MAPE - average of absolute error divided by average of actual and predicted."**

### How It's Calculated:
For each week: |Error| / ((|Actual| + |Predicted|) / 2) × 100%

### Example from Your Data:

**Week 40:** 
- Error = $5.07M
- Average = (|-$0.17M| + |$4.90M|) / 2 = $2.54M
- SMAPE = ($5.07M / $2.54M) × 100% = **200%** (capped at 200%)

**Week 41:**
- Error = $1.19M
- Average = (|-$0.43M| + |$0.76M|) / 2 = $0.60M
- SMAPE = ($1.19M / $0.60M) × 100% = **200%** (capped at 200%)

**Week 42-44:** Standard SMAPE calculation

**Result:** Average = **103.1%**

### Interpretation:
❌ **103.1% means:** Standard SMAPE is unreliable because it hits the 200% cap when signs differ.

**Why Unreliable:**
- When actual = -$0.17M and predicted = +$4.90M, SMAPE = 200% (capped)
- This doesn't reflect true accuracy

---

## 📊 **663.6% Standard MAPE - What It Means (Unreliable)**

### Definition:
**"Standard Mean Absolute Percentage Error - average of |Error| / |Actual| × 100%"**

### How It's Calculated:
For each week: |Error| / |Actual| × 100%, then average

### Example from Your Data:

**Week 40:**
- Error = $5.07M
- Actual = -$0.17M
- MAPE = ($5.07M / $0.17M) × 100% = **2,944%** ❌

**Week 41:**
- Error = $1.19M
- Actual = -$0.43M
- MAPE = ($1.19M / $0.43M) × 100% = **277%** ❌

**Week 42-44:** Standard MAPE calculation

**Result:** Average = **663.6%**

### Interpretation:
❌ **663.6% means:** Standard MAPE is completely unreliable - it explodes when actual values are near zero or opposite signs.

**Why Unreliable:**
- Division by small numbers (like $0.17M) causes explosion
- Opposite signs (inflow vs outflow) cause huge errors
- **DO NOT USE** for cash flow data

---

## 🎯 **SUMMARY: Which Metric to Use?**

| Metric | Value | Meaning | Use When |
|--------|-------|---------|----------|
| **Threshold MAPE ($1M)** | **30.7%** | Error is 30.7% when |actual| > $1M | ✅ **Best for reporting** - excludes small values |
| **Direction-Aware MAPE** | **32.3%** | Error is 32.3% when same direction | ✅ **Most business-meaningful** - only same-sign weeks |
| Scaled MAPE | 67.4% | Error is 67% of average magnitude | ⚠️ Acceptable - more stable |
| Sign-Aware SMAPE | 60.6% | Hybrid metric handling all weeks | ⚠️ Acceptable - single metric |
| Weighted MAPE | 67.4% | Weighted by cash flow size | ⚠️ Acceptable - large weeks count more |
| Standard SMAPE | 103.1% | Standard formula (capped at 200%) | ❌ Unreliable |
| Standard MAPE | 663.6% | Standard formula | ❌ Unreliable |

---

## 💡 **RECOMMENDATION**

**For Business Reporting:**
- Use **Threshold MAPE ($1M) = 30.7%** 
  - Meaning: "When cash flow is significant (>$1M), forecasts are accurate within 30.7%"

**For Technical Documentation:**
- Use **Direction-Aware MAPE = 32.3%**
  - Meaning: "When model correctly predicts direction, error is 32.3%"

**For Primary Metric:**
- Always use **MAE = $1.84M** (most reliable, not affected by zero-crossing)

---

## 📝 **QUICK REFERENCE**

**30.7% Threshold MAPE:**
- "When actual cash flow > $1M, forecast error is typically 30.7%"
- Example: If actual = $10M, forecast is usually within ±$3M

**32.3% Direction-Aware MAPE:**
- "When model correctly predicts inflow/outflow, error is 32.3%"
- Example: If model says "inflow $5M" and actual is "inflow", error is typically ±$1.6M

**67.4% Scaled MAPE:**
- "Forecast error is 67% of typical cash flow magnitude"
- Less intuitive but more stable

