Troubleshooting Returns Discrepancies
Guide for debugging returns mismatches between BTIG and Sable calculations.
Overview
Sable computes returns using Modified Dietz methodology to match BTIG's time-weighted returns. Discrepancies indicate issues in NAV calculations, cash flow timing, or entity mapping.
Key API Endpoints
| Endpoint | Description |
|---|---|
GET /api/returns/comparison | Compare BTIG vs Sable returns |
GET /api/returns/dietz-daily | Daily Modified Dietz returns |
GET /api/returns/cash-transactions | Cash flow transactions |
Base URL: https://sable-data.jettaintelligence.com
Diagnostic Workflow
Step 1: Identify Discrepancies
curl "https://sable-data.jettaintelligence.com/api/returns/comparison?account_code=AV7K&limit=50" \
-H "x-api-key: $SABLE_API_KEY"
Response includes:
status: match (10 bps or less), review (10-50 bps), investigate (over 50 bps), missingdiff_dietz_bps: Difference in basis pointssable_dietz_pctvsbtig_return_pct: Raw return percentages
Step 2: Analyze Daily Returns
For months with discrepancies, drill into daily returns:
curl "https://sable-data.jettaintelligence.com/api/returns/dietz-daily?entity_name=EntityName&start_date=2024-01-01&end_date=2024-01-31" \
-H "x-api-key: $SABLE_API_KEY"
Check:
- Are there days with unusual
daily_return_pct? - Are
begin_navandend_navconsistent day-over-day? - Is
return_factoralways positive?
Step 3: Check Cash Flows
curl "https://sable-data.jettaintelligence.com/api/returns/cash-transactions?entity_name=EntityName&limit=100" \
-H "x-api-key: $SABLE_API_KEY"
Verify:
- Do cash flows match BTIG records?
- Are deposits positive and withdrawals negative?
- Is timing (transaction_date) correct?
Common Issues
Missing Data
Symptom: status: "missing" or sable_dietz_pct: null
Causes:
- Entity not mapped to BTIG account
- Missing NAV data in
gold.v_nav_daily - Missing capital data in
gold.v_capital_daily
Fix:
- Check
sable.entitytable forbtig_account_codecolumn - Verify NAV exists for the entity/date range
- Verify capital exists for month start
Large Discrepancy (>50 bps)
Symptom: status: "investigate"
Common Causes:
- Cash flow timing mismatch: BTIG uses different transaction dates
- NAV calculation error: Check P&L rollup in
gold.v_pnl_daily - Missing days: Calendar gaps causing incorrect linking
Fix:
- Compare
btig_cashflowvssable_cashflowin comparison data - If mismatch: Update cash transactions
- Re-run dbt models:
dbt run --select v_dietz_daily v_returns_comparison
Small Discrepancy (10-50 bps)
Symptom: status: "review"
Common Causes:
- Rounding differences
- Slight timing differences in cash flows
- Holiday/weekend date handling
Fix:
- Usually acceptable - document and monitor
- If persistent: Check cash flow weighting calculation
dbt Model Hierarchy
gold.v_returns_comparison
├── tmp_btig.v_performance_monthly_by_account (BTIG source)
├── gold.v_nav_daily (Sable NAV)
├── gold.v_capital_daily (Sable capital)
└── gold.v_dietz_daily (Daily Modified Dietz)
└── gold.v_cash_transactions (Cash flows)
Refresh After Fixes
cd sable-data/dbt
dbt run --select v_dietz_daily v_returns_comparison
Success Criteria
match_rate> 95% in comparison summary- No
investigatestatus records diff_dietz_bpswithin +/- 10 bps for all months