#!/usr/bin/env python3 """Reproduce Linden Peak's intangible, goodwill, and impairment close. Run from the repository root with ``uv run python`` and this file's path. The script uses supplied useful lives, acquisition-date values, reporting unit, and fair values. It does not perform valuation or choose an accounting model. """ def money(amount: float) -> str: """Format a number as accounting-style US dollars.""" return f"${amount:,.2f}" def show_section(title: str) -> None: print(f"\n{title}") print("-" * len(title)) show_section("1. Finite-life amortization") license_cost = 240_000.00 license_life_months = 72 license_elapsed_months = 9 license_monthly_amortization = license_cost / license_life_months license_amortization = license_monthly_amortization * license_elapsed_months license_ending_carrying_amount = license_cost - license_amortization customer_relationship_cost = 600_000.00 customer_relationship_life_months = 120 customer_relationship_elapsed_months = 12 customer_relationship_monthly_amortization = ( customer_relationship_cost / customer_relationship_life_months ) customer_relationship_amortization = ( customer_relationship_monthly_amortization * customer_relationship_elapsed_months ) customer_relationship_ending_carrying_amount = ( customer_relationship_cost - customer_relationship_amortization ) print(f"{'License: $240,000 / 72 months x 9':<48} {money(license_amortization):>16}") print( f"{'Customer relationship: $600,000 / 120 x 12':<48} " f"{money(customer_relationship_amortization):>16}" ) total_period_amortization = license_amortization + customer_relationship_amortization print(f"{'Total period amortization':<48} {money(total_period_amortization):>16}") print(f"{'License ending carrying amount':<48} {money(license_ending_carrying_amount):>16}") print( f"{'Customer relationship ending carrying amount':<48} " f"{money(customer_relationship_ending_carrying_amount):>16}" ) show_section("2. Acquisition allocation and goodwill") consideration = 4_800_000.00 identifiable_assets = { "Cash": 250_000.00, "Receivables": 750_000.00, "Property, plant, and equipment": 1_800_000.00, "Customer relationship": 600_000.00, "Patented technology": 1_000_000.00, "Trade name": 950_000.00, "Acquired IPR&D": 300_000.00, } liabilities_assumed = 1_550_000.00 for label, amount in identifiable_assets.items(): print(f"{label:<48} {money(amount):>16}") total_identifiable_assets = sum(identifiable_assets.values()) identifiable_net_assets = total_identifiable_assets - liabilities_assumed goodwill = consideration - identifiable_net_assets if goodwill < 0: raise SystemExit("STOP: apparent bargain purchase requires reassessment") print(f"{'Identifiable assets':<48} {money(total_identifiable_assets):>16}") print(f"{'Liabilities assumed':<48} {money(liabilities_assumed):>16}") print(f"{'Identifiable net assets':<48} {money(identifiable_net_assets):>16}") print(f"{'Consideration':<48} {money(consideration):>16}") print(f"{'Residual goodwill':<48} {money(goodwill):>16}") show_section("3. Separate impairment lanes") trade_name_carrying_amount = 900_000.00 trade_name_fair_value = 760_000.00 trade_name_impairment = max(trade_name_carrying_amount - trade_name_fair_value, 0.00) reporting_unit_carrying_amount = 5_400_000.00 reporting_unit_fair_value = 5_050_000.00 goodwill_carrying_amount = 700_000.00 reporting_unit_excess = max(reporting_unit_carrying_amount - reporting_unit_fair_value, 0.00) goodwill_impairment = min(reporting_unit_excess, goodwill_carrying_amount) ending_goodwill = goodwill_carrying_amount - goodwill_impairment print(f"{'Trade-name impairment':<48} {money(trade_name_impairment):>16}") print(f"{'Reporting-unit excess':<48} {money(reporting_unit_excess):>16}") print(f"{'Goodwill impairment':<48} {money(goodwill_impairment):>16}") print(f"{'Ending goodwill':<48} {money(ending_goodwill):>16}") checks = { "period amortization": license_amortization + customer_relationship_amortization - 90_000, "identifiable assets": total_identifiable_assets - 5_650_000, "identifiable net assets": identifiable_net_assets - 4_100_000, "goodwill": goodwill - 700_000, "trade-name impairment": trade_name_impairment - 140_000, "goodwill impairment": goodwill_impairment - 350_000, } failed = [label for label, difference in checks.items() if abs(difference) > 0.005] if failed: raise SystemExit(f"FAIL: {', '.join(failed)}") print("\nPASS: amortization, allocation, goodwill, and impairment amounts reconcile.") print("Boundary: PASS does not approve useful lives, values, reporting units, or elections.")