# /// script # requires-python = ">=3.12" # dependencies = [] # [tool.uv] # exclude-newer = "2026-08-07T00:00:00Z" # /// """Reperform three fictional lessor accounting lanes. Run from any directory with: uv run /absolute/path/to/linden-peak-lessor-three-lanes.py No third-party packages are required. Classification, collectibility, rates, residuals, fair value, and direct-cost conclusions are supplied assumptions. """ from __future__ import annotations def money(amount: float) -> str: """Format signed US dollars with commas and parentheses.""" return f"(${abs(amount):,.2f})" if amount < 0 else f"${amount:,.2f}" def percent(rate: float) -> str: return f"{rate:.6%}" def present_value(amount: float, rate: float, periods: int) -> float: return amount * (1 + rate) ** -periods def annuity_present_value(payment: float, rate: float, periods: int) -> float: return payment * (1 - (1 + rate) ** -periods) / rate def net_investment_rows( opening_balance: float, payment: float, yield_rate: float, periods: int ) -> list[dict[str, float]]: rows: list[dict[str, float]] = [] balance = opening_balance for period in range(1, periods + 1): interest = balance * yield_rate ending = balance + interest - payment rows.append( { "period": float(period), "opening": balance, "interest": interest, "cash": payment, "ending": ending, } ) balance = ending return rows def print_schedule(title: str, rows: list[dict[str, float]]) -> None: print(title) print(" Year Opening Interest Cash Ending") print("----- ------------ ------------ ------------ ------------") for row in rows: print( f"{int(row['period']):>5} {money(row['opening']):>12} " f"{money(row['interest']):>12} {money(-row['cash']):>12} " f"{money(row['ending']):>12}" ) print() print("LINDEN PEAK — LESSOR THREE-LANE ANALYSIS") print("All entities, judgments, rates, residuals, and amounts are fictional.\n") # Lane 1: supplied sales-type classification. sales_payment = 20_000.0 sales_rate = 0.07 sales_periods = 5 sales_carrying_amount = 75_000.0 sales_fair_value = 82_003.94871895191 sales_initial_direct_costs = 1_000.0 sales_receivable = annuity_present_value(sales_payment, sales_rate, sales_periods) sales_profit = sales_receivable - sales_carrying_amount sales_rows = net_investment_rows(sales_receivable, sales_payment, sales_rate, sales_periods) print("1. SUPPLIED SALES-TYPE CLASSIFICATION") print(f"Lease receivable / initial net investment: {money(sales_receivable)}") print( f"Selling profit: {money(sales_receivable)} − {money(sales_carrying_amount)} " f"= {money(sales_profit)}" ) print(f"Initial direct-cost expense under supplied facts: {money(sales_initial_direct_costs)}") print(f"Supplied fair value: {money(sales_fair_value)}\n") print_schedule("Sales-type net-investment schedule", sales_rows) # Lane 2: supplied direct-financing classification and two residual rights. direct_payment = 9_500.0 direct_measurement_rate = 0.046458369707536584 direct_net_yield = 0.08257987131214095 direct_periods = 6 direct_guaranteed_residual = 13_000.0 direct_unguaranteed_residual = 7_000.0 direct_carrying_amount = 54_000.0 direct_fair_value = 62_000.0 direct_initial_direct_costs = 2_000.0 fixed_payment_pv = annuity_present_value(direct_payment, direct_measurement_rate, direct_periods) guaranteed_residual_pv = present_value( direct_guaranteed_residual, direct_measurement_rate, direct_periods ) unguaranteed_residual_pv = present_value( direct_unguaranteed_residual, direct_measurement_rate, direct_periods ) direct_receivable = fixed_payment_pv + guaranteed_residual_pv gross_net_investment = direct_receivable + unguaranteed_residual_pv deferred_profit = ( direct_receivable - (direct_carrying_amount - unguaranteed_residual_pv) - direct_initial_direct_costs ) direct_initial_net_investment = gross_net_investment - deferred_profit direct_rows = net_investment_rows( direct_initial_net_investment, direct_payment, direct_net_yield, direct_periods ) print("2. SUPPLIED DIRECT-FINANCING CLASSIFICATION") print(f"Measurement rate: {percent(direct_measurement_rate)}") print(f"PV of fixed payments: {money(fixed_payment_pv)}") print(f"PV of guaranteed residual: {money(guaranteed_residual_pv)}") print(f"Lease receivable: {money(direct_receivable)}") print(f"PV of unguaranteed residual right: {money(unguaranteed_residual_pv)}") print(f"Gross net investment: {money(gross_net_investment)}") print(f"Deferred selling profit: {money(deferred_profit)}") print(f"Initial net investment: {money(direct_initial_net_investment)}") print(f"Supplied fair value: {money(direct_fair_value)}") print(f"Net-investment yield: {percent(direct_net_yield)}\n") print_schedule("Direct-financing net-investment schedule", direct_rows) # Lane 3: supplied operating classification retains the underlying asset. operating_payment = 12_000.0 operating_periods = 4 operating_carrying_amount = 100_000.0 operating_initial_direct_costs = 2_000.0 operating_direct_cost_expense = operating_initial_direct_costs / operating_periods operating_net_lease_income = operating_payment - operating_direct_cost_expense print("3. SUPPLIED OPERATING CLASSIFICATION") print(f"Underlying asset retained in PP&E: {money(operating_carrying_amount)}") print("Initial net investment: $0.00") print(f"Periodic lease income: {money(operating_payment)}") print(f"Periodic initial-direct-cost expense: {money(operating_direct_cost_expense)}") print(f"Net lease income before depreciation: {money(operating_net_lease_income)}") print("Depreciation and impairment remain in the underlying-asset workpaper.\n") # Numeric controls use full precision even though the display is rounded. expected_residual = direct_guaranteed_residual + direct_unguaranteed_residual assert abs(sales_rows[-1]["ending"]) < 1e-8 assert abs(direct_rows[-1]["ending"] - expected_residual) < 1e-8 assert abs(gross_net_investment - 64_000.0) < 1e-8 assert operating_carrying_amount == 100_000.0 print("CONTROLS") print("Sales-type net investment settles to zero: PASS") print(f"Direct-financing ending residual: {money(direct_rows[-1]['ending'])} — PASS") print("Operating underlying asset remains recorded: PASS\n") print("BOUNDARY") print("This script does not classify a lease, establish collectibility, approve a") print("rate, value a residual, test the ASU 2021-05 exception, determine tax or") print("impairment, approve entries, or release disclosures.")