# /// script # requires-python = ">=3.12" # dependencies = [] # exclude-newer = "2026-08-08T00:00:00Z" # /// """Readable PBO, plan-asset, and funded-status reconciliation for Cedar Trail.""" from __future__ import annotations def money(amount: float) -> str: """Display financial amounts with commas, parentheses, and two decimals.""" return f"({abs(amount):,.2f})" if amount < 0 else f"{amount:,.2f}" def show(title: str, rows: list[tuple[str, float]]) -> None: """Print a compact financial schedule.""" print(f"\n{title}\n{'-' * len(title)}") width = max(len(label) for label, _ in rows) for label, value in rows: print(f"{label:<{width}} {money(value):>18}") # Signed actuarial report: supplied measurements, not values created by Python. opening_pbo = 18_000_000.00 service_cost = 1_200_000.00 interest_cost = 900_000.00 prior_service_cost = 600_000.00 obligation_loss = 400_000.00 benefits_paid = 1_100_000.00 ending_pbo = ( opening_pbo + service_cost + interest_cost + prior_service_cost + obligation_loss - benefits_paid ) show( "Projected benefit obligation", [ ("Opening PBO", opening_pbo), ("Service cost", service_cost), ("Interest cost", interest_cost), ("Prior-service cost", prior_service_cost), ("Actuarial loss", obligation_loss), ("Benefits paid", -benefits_paid), ("Ending PBO", ending_pbo), ], ) # Trustee rail. Contributions are cash flows; actual return is the residual return. opening_assets = 15_000_000.00 actual_return = 1_050_000.00 employer_contribution = 1_200_000.00 ending_assets = opening_assets + actual_return + employer_contribution - benefits_paid show( "Plan assets at fair value", [ ("Opening plan assets", opening_assets), ("Actual return", actual_return), ("Employer contribution", employer_contribution), ("Benefits paid", -benefits_paid), ("Ending plan assets", ending_assets), ], ) opening_funded_status = opening_assets - opening_pbo ending_funded_status = ending_assets - ending_pbo liability_increase = -(ending_funded_status - opening_funded_status) show( "Funded status", [ ("Opening funded status", opening_funded_status), ("Ending plan assets", ending_assets), ("Ending PBO", -ending_pbo), ("Ending funded status", ending_funded_status), ("Liability increase", liability_increase), ], ) # Join the cost, OCI, cash, and liability rails only after they reconcile. expected_return = 900_000.00 prior_service_amortization = 120_000.00 loss_amortization = 80_000.00 pension_cost = ( service_cost + interest_cost - expected_return + prior_service_amortization + loss_amortization ) current_oci_loss = ( prior_service_cost + obligation_loss - (actual_return - expected_return) - prior_service_amortization - loss_amortization ) entry_difference = ( pension_cost + current_oci_loss - employer_contribution - liability_increase ) show( "Employer-entry control", [ ("Pension cost", pension_cost), ("Current OCI loss", current_oci_loss), ("Cash contribution", -employer_contribution), ("Liability increase", -liability_increase), ("Difference", entry_difference), ], ) assert abs(ending_pbo - 20_000_000.00) < 0.01 assert abs(ending_assets - 16_150_000.00) < 0.01 assert abs(ending_funded_status + 3_850_000.00) < 0.01 assert abs(entry_difference) < 0.01 print("\nBoundary: this script reperforms supplied accounting measurements.") print("It does not value benefits, select assumptions, or assess legal funding or solvency.")