# /// script # requires-python = ">=3.12" # dependencies = [] # exclude-newer = "2026-08-08T00:00:00Z" # /// """Readable two-class basic EPS and ordered diluted EPS for Linden Peak.""" from __future__ import annotations def money(amount: float) -> str: return f"({abs(amount):,.2f})" if amount < 0 else f"{amount:,.2f}" def number(amount: float) -> str: return f"{amount:,.2f}" days_in_year = 365 split_factor = 2.0 intervals = [ ("January–March", 960_000.0, 90), ("April–August", 1_160_000.0, 153), ("September–October", 1_100_000.0, 61), ("November–December", 1_120_000.0, 61), ] print("Weighted-average common shares") print("------------------------------") print(f"{'Interval':<22} {'Adjusted shares':>18} {'Days':>8} {'Weighted shares':>18}") weighted_common = 0.0 for label, pre_split_shares, days in intervals: adjusted = pre_split_shares * split_factor weighted = adjusted * days / days_in_year weighted_common += weighted print(f"{label:<22} {number(adjusted):>18} {days:>8} {number(weighted):>18}") print(f"{'Weighted average':<22} {'':>18} {'':>8} {number(weighted_common):>18}") # Two-class numerator allocation. income = 8_400_000.00 preferred_dividend = 120_000.00 common_distributions = 360_000.00 participant_distributions = 6_000.00 weighted_participants = 15_000.0 * split_factor available = income - preferred_dividend undistributed = available - common_distributions - participant_distributions participant_allocation = participant_distributions + undistributed * weighted_participants / ( weighted_common + weighted_participants ) common_numerator = available - participant_allocation basic_eps = common_numerator / weighted_common print("\nBasic EPS numerator") print("-------------------") for label, amount in [ ("Income", income), ("Current preferred dividend", -preferred_dividend), ("Participating-security allocation", -participant_allocation), ("Common numerator", common_numerator), ]: print(f"{label:<38} {money(amount):>17}") print(f"{'Basic EPS':<38} {money(basic_eps):>17}") # Candidate calculations are prepared independently, then ordered. post_split_options = 150_000.0 * split_factor post_split_exercise_price = 8.00 / split_factor post_split_average_price = 16.00 / split_factor other_assumed_proceeds = 366_000.00 option_proceeds = post_split_options * post_split_exercise_price + other_assumed_proceeds option_increment = post_split_options - option_proceeds / post_split_average_price candidates = [ ("Contingent shares", 0.00, 20_000.0 * split_factor), ("Employee options", 0.00, option_increment), ("Convertible debt", 180_000.00, 80_000.0 * split_factor), ("Convertible preferred", 200_000.00, 25_000.0 * split_factor), ] candidates.sort(key=lambda item: item[1] / item[2]) print("\nDilution ordering") print("-----------------") print( f"{'Instrument':<24} {'Numerator':>15} {'Shares':>15} " f"{'Incremental EPS':>18} {'Decision':>12}" ) diluted_numerator = common_numerator diluted_denominator = weighted_common included: list[str] = [] for label, numerator_increment, share_increment in candidates: incremental_eps = numerator_increment / share_increment running_eps = diluted_numerator / diluted_denominator candidate_eps = (diluted_numerator + numerator_increment) / ( diluted_denominator + share_increment ) decision = "include" if candidate_eps <= running_eps else "exclude" if decision == "include": diluted_numerator += numerator_increment diluted_denominator += share_increment included.append(label) print( f"{label:<24} {money(numerator_increment):>15} {number(share_increment):>15} " f"{money(incremental_eps):>18} {decision:>12}" ) diluted_eps = diluted_numerator / diluted_denominator print(f"\nDiluted numerator: {money(diluted_numerator)}") print(f"Diluted denominator: {number(diluted_denominator)}") print(f"Diluted EPS: {money(diluted_eps)}") assert sum(days for _, _, days in intervals) == days_in_year assert abs(weighted_common - 2_187_945.2054794524) < 0.01 assert abs(participant_allocation - 113_045.0250138966) < 0.01 assert abs(option_increment - 104_250.00) < 0.01 assert included == ["Contingent shares", "Employee options", "Convertible debt"] assert abs(diluted_denominator - 2_492_195.2054794524) < 0.01 assert abs(basic_eps - 3.732705441860665) < 0.000001 assert abs(diluted_eps - 3.349238035862565) < 0.000001 print("\nArithmetic controls: PASS")