Skip to main content

Superset Dashboards from Desktop App Reports

Date: 2026-04-15 Scope: Extract Desktop App report SQL, design interactive dashboards, document deployment to PSX Superset

What Was Done

1. Extracted SQL from 6 Desktop App Report Definitions

Translated PBSELECT format to standard T-SQL for all 6 reports in the reports/ directory:

ReportQuery FileSource Format
Position Recon Summary01_pos_recon_summary.sqlPBSELECT (13 COMPUTE/SUM aggregates)
Position Recon Detail02_pos_recon_detail.sqlPBSELECT (19 columns, no aggregation)
Cross Ratios03_cross_ratios.sqlNative SQL (complex self-join with DPCs)
Cost of Hedging04_cost_of_hedging.sqlPBSELECT with JOIN
SEC 105 Value Change05_sec105_value_change.sqlPBSELECT with computed columns
SEC 109 Value Change06_sec109_value_change.sqlPBSELECT with BUBD/MSR price composition

2. Validated Data Availability in PS_DemoData

TableRowsStatus
rmcat_risk_pos_recon11,206Ready
rmcat_risk_pos_recon_arc4,997,091Ready (historical trend)
rmcat_bestex_analysis1,826Ready (354 loans, 6 investors)
rmcat_closing_ratios1,309Ready
rmrep_position_detail32,835Ready
rmrep_trades_prep807Ready
rmcat_sec1050Empty
rmcat_sec1090Empty

3. Designed BestEx Scorecard Dashboard (5 Charts)

The value discovery centerpiece. Key findings from PS_DemoData:

  • 354 loans evaluated against 6 investors (GNMA, FNMA, FHLMC, FHLB Cash, FNMA Cash, FHLMC Cash)
  • GNMA dominates: 236 rank-1 wins out of 354 loans
  • Total portfolio profit: -$7.6M (DemoData is from a rising-rate environment where all investors are underwater)
  • Spread analysis: top 10 loans show $3K-$7.6K spread between best and second-best investor

Charts: Investor Summary, Product Breakdown, Loan Detail, Spread Analysis, Rate Analysis.

4. Designed Position Recon Dashboard (4 Charts)

Replaces the daily desk report with interactive drill-down plus a historical trend chart the Desktop App cannot produce.

  • 4 segments: Agency, HFA, Portfolio, Private Investor
  • Historical archive: 5M rows enabling time-series analysis back to June 2022
  • Superset-exclusive: trend chart showing position evolution over time

Charts: Net Position by Segment, By Position Group, Loan/Trade Detail, Historical Trend.

5. Wrote Setup Guide

Connection configuration, dataset creation instructions, and credential management for the PSX infrastructure team to deploy dashboards to bi.staging.powerseller.com.

Files Created

  • infra/superset/queries/01_pos_recon_summary.sql through 06_sec109_value_change.sql (6 report translations)
  • infra/superset/queries/07_bestex_scorecard_summary.sql through 11_bestex_scorecard_rate_analysis.sql (5 BestEx charts)
  • infra/superset/queries/12_posrecon_net_position.sql through 15_posrecon_historical_trend.sql (4 Position Recon charts)
  • docs-site/docs/superset/dashboard-designs.md — layout specs, cross-filter behavior, KPIs
  • docs-site/docs/superset/setup-guide.md — connection config, dataset creation, credential notes

Key Decisions

  • No Superset in PSSaaS Docker Compose — use PSX's existing instance at bi.staging.powerseller.com
  • PS_DemoData as data source — complete dataset, read/write access, no production risk
  • SEC 105/109 queries written but empty — need a client that has run the reserve calculation
  • mkt_investor is NULL in DemoData — optimal vs. actual comparison not available; used rank spread analysis instead

What's Next

  • PSX infrastructure team deploys dashboards to Superset staging
  • Phase 2 dashboards: Pipeline Health, Trading Summary, Cost of Hedging, Cross Ratios
  • Validate with Greg (Position Recon) and Jay (BestEx) for accuracy