value / commands /compare-projects.md
bonita2026's picture
Upload 16 files
58821bd verified
|
Raw History Blame Contribute Delete
18.2 kB

A newer version of the Gradio SDK is available: 6.32.0

Upgrade

Command: compare-projects

Version: 6.0

Trigger phrases: "compare projects", "QCA", "qualitative comparative analysis",

"truth table", "Boolean analysis", "cross-case analysis", "compare deals",

"reference class", "Flyvbjerg", "optimism bias correction",

"which project is better", "rank projects", "portfolio comparison",

"project selection", "project prioritisation", "compare infrastructure",

"best project", "rank investments", "comparar proyectos",

"selección de proyectos", "cuál proyecto elegir", "benchmark projects",

"project scoring", "scorecard comparison", "structured comparison"

Dependencies:

- references/apec/quality-framework.md (QCA parameters 7.1–7.6)

- scripts/validate_jurisdiction.py (for each project's jurisdiction)

- scripts/validate_dscr.py (bankability parameter)

- scripts/validate_ltv.py (leverage parameter)

Output: QCA truth table + Boolean minimisation + reference class benchmarks +

ranked scorecard + recommendation on project selection


COMMAND: compare-projects

PURPOSE

Apply Qualitative Comparative Analysis (QCA) to systematically compare 2–15 infrastructure or real estate projects and identify which combination of conditions produces successful outcomes.

This command answers:

  1. Which project(s) meet the sufficient conditions for success?
  2. What combination of conditions differentiates better projects from worse ones?
  3. Which single project should be prioritised, and why?
  4. What conditions are NECESSARY (present in all successful cases)?
  5. How do Reference Class Forecasting benchmarks compare to project-specific estimates?

QCA is not a points system. It uses Boolean logic to identify causal combinations — the configurations that are jointly sufficient to produce the outcome.


STEP 0 — CONFIRM FRAMEWORK AND CASES

QCA SESSION BRIEF
═══════════════════════════════════════════════════════════
Comparative framework: APEC Quality Infrastructure + Project Finance QCA
Number of cases:       [N] — [QCA is most powerful for 5–50 cases]
Outcome of interest:   [Project success / Bankable / Viable / Worth prioritising]
Jurisdictions:         [List countries — load each jurisdiction's reference file]
Analysis date:         [DATE]
═══════════════════════════════════════════════════════════

Scope guidance:

  • 2–4 cases: use structured scorecard + narrative comparison (QCA less useful at this scale)
  • 5–15 cases: QCA truth table + Boolean minimisation — optimal range
  • 16–50 cases: fsQCA (fuzzy-set) — more complex calibration required
  • 50 cases: quantitative methods preferred — flag this to user


STEP 1 — THE 6 QCA CONDITIONS (from quality-framework.md)

For each project, calibrate each condition on the fuzzy-set (fs) scale 0–1:

CALIBRATION SCALE:
  1.00 = Fully in the set (condition fully present)
  0.75 = More in than out
  0.50 = Crossover point (ambiguous — avoid if possible)
  0.25 = More out than in
  0.00 = Fully out of the set (condition fully absent)

Condition 7.1 — Government Readiness

Condition 7.1: GOVERNMENT READINESS
Sub-conditions:
  □ Legal/regulatory framework in place for this sector
  □ Land acquisition completed or legally secured
  □ Government champion at ministerial level
  □ Contracting authority has PPP/procurement experience
  □ Budget allocation confirmed for contingent obligations
  □ Political stability: current government can see project to completion

Calibration anchors:
  1.00 = All sub-conditions met; project signed off at cabinet level
  0.75 = 4–5 sub-conditions met; one gap being resolved
  0.50 = Mixed — framework exists but land/funding not secured
  0.25 = Framework in early stage; key gaps outstanding
  0.00 = No legal framework; no champion; no budget

Condition 7.2 — Private Sector Appetite

Condition 7.2: PRIVATE SECTOR APPETITE
Sub-conditions:
  □ Bankable returns (equity IRR ≥ hurdle: WACC + 3–5pp)
  □ Debt available at viable terms (DSCR ≥ 1.25x for project finance)
  □ Adequate contractual protections (change-in-law, force majeure, termination)
  □ Market depth: ≥ 3 qualified bidders at pre-qualification stage
  □ Comparable precedent transactions in similar markets

Calibration anchors:
  1.00 = Strong bidder appetite; multiple Tier-1 sponsors expressed interest
  0.75 = 2–3 qualified sponsors; returns adequate; minor structural concerns
  0.50 = One sponsor committed; others uncertain; returns borderline
  0.25 = Sponsor interest conditional on significant viability gap funding
  0.00 = No sponsor interest; project not bankable as structured

Condition 7.3 — Demand Certainty

Condition 7.3: DEMAND CERTAINTY
Sub-conditions:
  □ Independent demand study conducted and validated
  □ Reference class benchmarks show consistent demand in comparable projects
  □ Government offtake or minimum revenue guarantee in place
  □ Demand elasticity modelled (including tariff sensitivity)
  □ Downside demand scenario (−30%) still produces DSCR > stress minimum

Calibration anchors:
  1.00 = Government availability payment — zero demand risk; independent study confirms
  0.75 = Strong traffic/demand history; independent study; −20% stress case viable
  0.50 = Demand study conducted but methodology disputed; no government guarantee
  0.25 = Demand projections based on internal estimates only; no independent validation
  0.00 = No demand study; full merchant risk; −20% scenario = DSCR breach

Condition 7.4 — Institutional Capacity

Condition 7.4: INSTITUTIONAL CAPACITY
Sub-conditions:
  □ Contracting authority has managed a PPP of comparable complexity
  □ Dedicated PPP unit or transaction advisor engaged
  □ Legal counsel with sector expertise
  □ Financial model auditor engaged
  □ E&S monitoring framework operational
  □ Regulatory body has capacity to enforce concession terms

Calibration anchors:
  1.00 = Experienced authority; full team; world-class advisors; regulator strong
  0.75 = Prior PPP experience; most advisor positions filled; minor gaps
  0.50 = Limited experience; transaction advisor plugging capacity gaps
  0.25 = First PPP; heavy reliance on MDB/donor TA; institutional gaps
  0.00 = No PPP experience; no advisor; regulatory body non-functional

Condition 7.5 — Risk Allocation Quality

Condition 7.5: RISK ALLOCATION QUALITY
Sub-conditions:
  □ Construction risk: fixed-price EPC → private party
  □ Demand risk: government guarantee or availability payment where private cannot manage
  □ Force majeure/political: government compensation event
  □ Currency risk: mitigated (natural hedge / swap / indexed tariff)
  □ Change-in-law: government compensates change in law post-financial close
  □ Interface risk (land, utilities): government bears — obligations pre-financial close

Calibration anchors:
  1.00 = All risks allocated to party best placed to manage; no uninsurable risk on private
  0.75 = Most risks correctly allocated; 1–2 minor misallocations being resolved
  0.50 = Some structural risks on private party that it cannot absorb (e.g. FX unhedged)
  0.25 = Significant misallocation — e.g. full demand risk on private + no government support
  0.00 = All risk on private party including uninsurable risks; no government support

Condition 7.6 — Reference Class Forecasting (Flyvbjerg Correction)

Condition 7.6: REFERENCE CLASS FORECASTING
Sub-conditions:
  □ Reference class selected (comparable sector + geography + procurement method)
  □ Cost overrun distribution obtained for reference class
  □ Schedule delay distribution obtained for reference class
  □ Optimism bias correction applied to project-specific estimate
  □ P50, P80, P90 scenarios reported
  □ Project estimates fall within reasonable range vs. reference class

Global benchmarks (Flyvbjerg — all project types):
  Average cost overrun:    +39% above budget
  Average schedule delay:  +27% beyond planned completion
  Benefit shortfall:       −23% below forecast

Calibration anchors:
  1.00 = Full RCF applied; P80 estimate used as base; contingency funded accordingly
  0.75 = RCF applied; P70 used; contingency reasonable
  0.50 = RCF applied but inside-view dominates; contingency insufficient for P80
  0.25 = Partial RCF; reference class not well-matched; optimism bias not corrected
  0.00 = No RCF; single-point estimate only; no contingency for reference class risk

STEP 2 — TRUTH TABLE CONSTRUCTION

For each project, score all 6 conditions. Then determine outcome (1/0):

QCA TRUTH TABLE — [COMPARISON NAME]
[Analysis under APEC Quality Framework — {date}]
═══════════════════════════════════════════════════════════════════════════════════════
PROJECT          GOV   PRIV  DEMAND  INST  RISK  RCF   OUTCOME
                [7.1] [7.2] [7.3]  [7.4] [7.5] [7.6]  (1=success)
─────────────────────────────────────────────────────────────────────────────────────
[Project A]      1.00  0.75  1.00   0.75  1.00  0.75    1
[Project B]      0.75  1.00  0.75   0.50  0.75  1.00    1
[Project C]      0.25  0.50  0.25   0.25  0.50  0.50    0
[Project D]      1.00  0.25  1.00   0.75  1.00  0.25    0
[Project E]      0.75  0.75  0.75   1.00  0.75  0.75    1
[Project F]      0.50  0.25  0.75   0.25  0.25  0.50    0
[...add all projects]
─────────────────────────────────────────────────────────────────────────────────────
Condition:       [X]   [X]   [X]    [X]   [X]   [X]
Consistency:     [X]   [X]   [X]    [X]   [X]   [X]
Coverage:        [X]   [X]   [X]    [X]   [X]   [X]
═══════════════════════════════════════════════════════════════════════════════════════

CALIBRATION NOTE: Scores ≥ 0.50 treated as IN the set (1); < 0.50 treated as OUT (0)
for Boolean minimisation. Fuzzy scores retained for coverage/consistency analysis.

STEP 3 — NECESSARY CONDITIONS ANALYSIS

A condition is NECESSARY if it is present in ALL successful cases.

NECESSARY CONDITIONS ANALYSIS
═══════════════════════════════════════════════════════════
[For each condition:]
Condition [7.X]:
  Present in all outcome=1 cases: [YES — NECESSARY / NO — not necessary]
  Consistency (Coverage of necessity): [X.XX — threshold: ≥0.90]
  Comment: [What this means in plain terms]

NECESSARY CONDITIONS IDENTIFIED:
  □ [Condition name]: present in [N] of [N] successful cases
  [or: No single condition is necessary — success requires combinations]
═══════════════════════════════════════════════════════════

STEP 4 — BOOLEAN MINIMISATION (Sufficient Conditions)

Apply Quine-McCluskey minimisation to the truth table:

BOOLEAN MINIMISATION — SUFFICIENT CONDITIONS
═══════════════════════════════════════════════════════════
COMPLEX SOLUTION (no assumptions):
  [Equation — e.g.: (GOV * DEMAND) + (PRIV * RISK * RCF) → OUTCOME]

PARSIMONIOUS SOLUTION (logical remainders as simplifying assumptions):
  [Simplified equation]

INTERMEDIATE SOLUTION (theory-informed assumptions):
  [Preferred solution — explain assumptions used]

INTERPRETATION:
  Solution 1: [GOV * DEMAND → OUTCOME]
    "Government readiness combined with demand certainty is sufficient for success,
    regardless of private sector appetite or RCF status."

  Solution 2: [PRIV * RISK * RCF → OUTCOME]
    "Private sector appetite with correct risk allocation and reference class
    forecasting is sufficient, even with moderate government readiness."

COVERAGE: [X.XX] — [X]% of successful cases explained by the solution
CONSISTENCY: [X.XX] — [X]% consistency (how perfectly the solution predicts)
═══════════════════════════════════════════════════════════

STEP 5 — REFERENCE CLASS BENCHMARK COMPARISON

For each project, compare stated estimates to reference class benchmarks:

REFERENCE CLASS BENCHMARKS — [PROJECT NAME]
═══════════════════════════════════════════════════════════
Reference class: [Road PPPs in [region] / Hospital PFIs / Port concessions / etc]
Source: [Flyvbjerg 2022 / ADB / World Bank project database / other]

                         PROJECT ESTIMATE  RCF P50  RCF P80  RCF P90
CAPEX:                   [CURRENCY X]      [+39%]   [+55%]   [+70%]
  RCF-adjusted CAPEX:    [CURRENCY Y]      [CURRENCY Y×1.39] [Y×1.55]
Schedule (months):       [N]              [+27%]   [+40%]   [+55%]
  RCF-adjusted schedule: [N] months        [N×1.27] [N×1.40]
Demand (traffic units):  [X/yr]           [−23%]   [−30%]   [−40%]
  RCF-adjusted demand:   [X×0.77/yr]      [×0.70]  [×0.60]

OPTIMISM BIAS CORRECTIONS APPLIED:
  □ CAPEX contingency funded to P80: [YES — CURRENCY AMOUNT / NO — UNDER-FUNDED ⚠]
  □ Programme float added to P80: [YES — [N] months / NO ⚠]
  □ Demand base case = P50: [YES / NO — too optimistic ⚠]

DSCR AT P80 COST / P50 DEMAND (stress scenario):
  DSCR: [X.XX]x — [GREEN / YELLOW / RED at stress threshold]
═══════════════════════════════════════════════════════════

STEP 6 — PROJECT RANKING SCORECARD

For direct comparison, produce a ranked scorecard:

PROJECT RANKING SCORECARD
═══════════════════════════════════════════════════════════
                     PROJ A  PROJ B  PROJ C  PROJ D  PROJ E
─────────────────────────────────────────────────────────────
QCA SCORE (0–6):
  7.1 Gov Readiness:  [X.XX]  [X.XX]  [X.XX]  [X.XX]  [X.XX]
  7.2 Private App.:   [X.XX]  [X.XX]  [X.XX]  [X.XX]  [X.XX]
  7.3 Demand:         [X.XX]  [X.XX]  [X.XX]  [X.XX]  [X.XX]
  7.4 Inst. Cap.:     [X.XX]  [X.XX]  [X.XX]  [X.XX]  [X.XX]
  7.5 Risk Alloc.:    [X.XX]  [X.XX]  [X.XX]  [X.XX]  [X.XX]
  7.6 RCF:            [X.XX]  [X.XX]  [X.XX]  [X.XX]  [X.XX]
QCA TOTAL:            [X.XX]  [X.XX]  [X.XX]  [X.XX]  [X.XX]

APEC QUALITY SCORE (if full 15-parameter run):
  Aggregate (0–10):   [X.X]   [X.X]   [X.X]   [X.X]   [X.X]

FINANCIAL METRICS:
  DSCR (base):        [X.XX]x [X.XX]x [X.XX]x [X.XX]x [X.XX]x
  Equity IRR:         [X]%    [X]%    [X]%    [X]%    [X]%
  ERR:                [X]%    [X]%    [X]%    [X]%    [X]%
  RCF-adj. CAPEX:     [+X%]   [+X%]   [+X%]   [+X%]   [+X%]

OVERALL STATUS:       [GREEN] [GREEN] [RED]   [YELLOW][GREEN]
RANK:                 [1]     [2]     [5]     [4]     [3]
─────────────────────────────────────────────────────────────
RECOMMENDED:   [PROJECT A — see rationale below]
═══════════════════════════════════════════════════════════

STEP 7 — RECOMMENDATION AND RATIONALE

RECOMMENDATION
═══════════════════════════════════════════════════════════
RECOMMENDED PROJECT: [NAME]
QCA result: [Explanation of which Boolean pathway it falls on]

Why this project:
  [3–5 sentences — not just "highest score" but which conditions it fulfils
   that the QCA analysis identifies as sufficient for success]

Why NOT [Project X]:
  [Specific condition gap — e.g. "Condition 7.3 (demand) calibrated at 0.25 —
   no government guarantee and no independent demand study — falls outside
   both sufficient solution paths identified in the truth table"]

Conditions for recommended project to proceed:
  □ [Any YELLOW or unresolved condition — and what would resolve it]

Compound risks to monitor (Move 7):
  □ [Compound risk 1: which two conditions could deteriorate together]
  □ [Compound risk 2]
═══════════════════════════════════════════════════════════

[Analysis under APEC Quality Framework — as of {date}]
Source: references/apec/quality-framework.md (v6.0)
QCA methodology based on: Ragin (2008) Redesigning Social Inquiry;
Flyvbjerg (2022) Reference Class Forecasting.
This comparison is a structured analytical framework.
It does not constitute investment advice.