Advanced Analytics API¶
Monte Carlo simulation, decision trees, purchase price allocation, goodwill, litigation damages, and transfer pricing.
Monte Carlo Sensitivity¶
monte_carlo
¶
Monte Carlo simulation for valuation under uncertainty.
Re-exports monte_carlo_valuation from src.core.statistics and adds monte_carlo_sensitivity for sensitivity analysis on valuation functions.
Functions¶
monte_carlo_sensitivity(valuation_fn: Callable[[dict], float], base_params: dict, distributions: dict, iterations: int = 10000, seed: int | None = None) -> dict
¶
Run Monte Carlo sensitivity analysis on a valuation function.
Unlike monte_carlo_valuation which simulates all inputs, this function varies only the specified parameters (distributions) while keeping others at their base values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
valuation_fn
|
Callable[[dict], float]
|
Callable that takes a dict of parameter names to values. |
required |
base_params
|
dict
|
Base/default values for all parameters. |
required |
distributions
|
dict
|
Dict mapping parameter names to distribution specs. Each spec: {"distribution": str, "params": dict}. Supported: "normal", "uniform", "triangular", "lognormal". |
required |
iterations
|
int
|
Number of simulation iterations (1000-100000). |
10000
|
seed
|
int | None
|
Random seed for reproducibility. |
None
|
Returns:
| Type | Description |
|---|---|
dict
|
Dict with value (mean), method, formula_reference, steps, assumptions, |
dict
|
statistics, and sensitivity_ranking of parameters by impact. |
Source code in src/advanced/monte_carlo.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | |
Purchase Price Allocation¶
purchase_price_alloc
¶
Purchase Price Allocation (PPA) waterfall analysis.
Implements Section 10.2 and Appendix A.8: Full allocation of purchase price to tangible assets, identified intangibles, liabilities, and residual goodwill.
Classes¶
IdentifiedIntangible
¶
Bases: BaseModel
PPAInput
¶
Bases: BaseModel
Functions¶
purchase_price_allocation(purchase_price: float, tangible_assets_fv: float, identified_intangibles: list[dict], liabilities_fv: float = 0) -> ValuationResult
¶
Perform full purchase price allocation waterfall.
Allocates the purchase price across: 1. Tangible assets at fair value 2. Identified intangible assets at fair value 3. Assumed liabilities at fair value 4. Goodwill as the residual
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
purchase_price
|
float
|
Total acquisition consideration. |
required |
tangible_assets_fv
|
float
|
Fair value of all tangible assets acquired. |
required |
identified_intangibles
|
list[dict]
|
List of dicts with keys: name, value, method. |
required |
liabilities_fv
|
float
|
Fair value of liabilities assumed. |
0
|
Returns:
| Type | Description |
|---|---|
ValuationResult
|
ValuationResult with full allocation breakdown and percentages. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If inputs are invalid or result in negative goodwill. |
Example (Book Example): $100M purchase, $15M tangible, $60M identified intangibles, $0 liabilities Net identifiable = 15M + 60M - 0 = 75M Goodwill = 100M - 75M = 25M
Source code in src/advanced/purchase_price_alloc.py
Goodwill¶
goodwill
¶
Goodwill calculation as residual of purchase price over net identifiable assets.
Implements Section 10.1: Goodwill = Purchase Price - Fair Value of Net Identifiable Assets. Raises ValueError for bargain purchases (negative goodwill).
Classes¶
GoodwillInput
¶
Bases: BaseModel
Functions¶
goodwill(purchase_price: float, fair_value_net_identifiable_assets: float) -> ValuationResult
¶
Calculate goodwill as the residual of purchase price over fair value of net identifiable assets.
Goodwill represents the premium paid for unidentifiable intangible assets such as synergies, assembled workforce, and brand reputation that cannot be separately identified.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
purchase_price
|
float
|
Total acquisition consideration paid. |
required |
fair_value_net_identifiable_assets
|
float
|
Fair value of all identifiable assets minus liabilities. |
required |
Returns:
| Type | Description |
|---|---|
ValuationResult
|
ValuationResult with goodwill amount, calculation steps, and assumptions. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If purchase_price < fair_value_net_identifiable_assets (bargain purchase). |
ValueError
|
If purchase_price <= 0 or fair_value_net_identifiable_assets < 0. |
Example
result = goodwill(100_000_000, 75_000_000) result.value 25000000.0
Source code in src/advanced/goodwill.py
Litigation Damages¶
litigation
¶
Patent infringement damages calculation.
Implements Section 15.2: Calculates total damages including pre-judgment interest on lost profits or reasonable royalty over the infringement period.
Classes¶
PatentDamagesInput
¶
Bases: BaseModel
Functions¶
patent_infringement_damages(lost_profits_or_royalty: float, infringement_period: int, discount_rate: float, prejudgment_interest_rate: float) -> ValuationResult
¶
Calculate patent infringement damages with pre-judgment interest.
Total damages = Present value of lost profits/royalty over infringement period + Pre-judgment interest on the damages amount.
The present value of the lost profits or reasonable royalty is calculated as an annuity over the infringement period. Pre-judgment interest is then applied to compensate for the time value of money from the date of infringement to the date of judgment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lost_profits_or_royalty
|
float
|
Annual lost profits or reasonable royalty amount. |
required |
infringement_period
|
int
|
Number of years the infringement occurred. |
required |
discount_rate
|
float
|
Discount rate for present value calculation. |
required |
prejudgment_interest_rate
|
float
|
Pre-judgment interest rate. |
required |
Returns:
| Type | Description |
|---|---|
ValuationResult
|
ValuationResult with total damages, PV of lost profits, and interest amount. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If any input is invalid. |
Example
result = patent_infringement_damages(1_000_000, 5, 0.10, 0.05) result.value # total damages with interest
Source code in src/advanced/litigation.py
Royalty Benchmarking¶
royalty_benchmark
¶
Royalty rate benchmarking and adjustment.
Implements Section 6.1-6.3 and Appendix A.10: - Built-in benchmark database for common IP types and industries - 25% rule for royalty rate estimation - Adjustment factors for customizing base rates
Functions¶
royalty_rate_benchmark(ip_type: str, industry: str, comparable_database: list[dict] | None = None) -> ValuationResult
¶
Get benchmark royalty rate range by IP type and industry.
Uses built-in benchmark database compiled from RoyaltyStat, ktMINE, and industry surveys. Can be supplemented with user-provided comparables.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ip_type
|
str
|
One of "patent", "trademark", "copyright", "trade_secret", "technology". |
required |
industry
|
str
|
Industry sector name. |
required |
comparable_database
|
list[dict] | None
|
Optional list of {"rate": float, "source": str} for custom comparables. |
None
|
Returns:
| Type | Description |
|---|---|
ValuationResult
|
ValuationResult with recommended rate range, median, and source data. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If ip_type is invalid. |
Example
result = royalty_rate_benchmark("patent", "pharmaceutical") result.assumptions["recommended_range"] (0.05, 0.15)
Source code in src/advanced/royalty_benchmark.py
adjust_royalty_rate(base_rate: float, adjustment_factors: dict) -> ValuationResult
¶
Adjust base royalty rate for specific deal factors.
Each factor in adjustment_factors is a multiplier: - profit_margin: Higher margins support higher rates (typical range 0.8-1.3) - exclusivity: Exclusive licenses command premium (typical range 1.0-1.5) - market_conditions: Favorable markets support higher rates (typical range 0.8-1.2) - term: Longer terms may reduce per-period rate (typical range 0.8-1.2) - geographic_scope: Broader scope increases rate (typical range 0.8-1.4)
Adjusted Rate = Base Rate * product(all factors)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_rate
|
float
|
Base royalty rate from benchmark (0 < rate <= 1). |
required |
adjustment_factors
|
dict
|
Dict of factor name to multiplier value. |
required |
Returns:
| Type | Description |
|---|---|
ValuationResult
|
ValuationResult with adjusted rate and factor breakdown. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If base_rate is invalid. |
Example
adjust_royalty_rate(0.05, {"profit_margin": 1.2, "exclusivity": 1.3}) ValuationResult(value=0.078, ...)
Source code in src/advanced/royalty_benchmark.py
twenty_five_percent_rule(licensee_expected_profit: float, profit_attribution_to_ip: float = 1.0) -> ValuationResult
¶
Apply the 25% rule of thumb for royalty rate estimation.
The 25% rule suggests the licensor should receive 25% of the licensee's expected profit attributable to the licensed IP.
Royalty = Licensee Expected Profit * Profit Attribution to IP * 25%
Note: This rule has been criticized and rejected by some courts (e.g., Uniloc v. Microsoft), but remains a useful starting point for negotiations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
licensee_expected_profit
|
float
|
Expected profit from using the IP (> 0). |
required |
profit_attribution_to_ip
|
float
|
Fraction of profit attributable to IP (0-1). |
1.0
|
Returns:
| Type | Description |
|---|---|
ValuationResult
|
ValuationResult with royalty amount. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If inputs are invalid. |
Example
result = twenty_five_percent_rule(10_000_000, 0.8) result.value 2000000.0
Source code in src/advanced/royalty_benchmark.py
Impairment Testing¶
impairment_testing
¶
Goodwill and intangible asset impairment testing.
Implements Section 10.4 and Appendix A.9: - ASC 350: Goodwill impairment = Carrying Value - Fair Value (one-step test) - IAS 36: Uses recoverable amount (higher of FV less costs to sell and value in use)
Classes¶
CGUImpairmentInputs
¶
Bases: BaseModel
Inputs for CGU-level impairment allocation.
FVLCTSInputs
¶
Bases: BaseModel
Inputs for fair value less costs to sell.
ValueInUseInputs
¶
Bases: BaseModel
Inputs for IAS 36 value in use calculation.
Functions¶
cash_generating_unit_impairment(cgu_carrying_value: float, cgu_recoverable_amount: float, goodwill_allocated: float, other_assets: list[dict]) -> ValuationResult
¶
Allocate impairment loss at the CGU level per IAS 36.
When a CGU is impaired, the loss is allocated: 1. First to reduce goodwill allocated to the CGU 2. Then pro rata to other assets based on carrying amounts
No asset is reduced below the highest of: - Its fair value less costs to sell - Its value in use - Zero
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cgu_carrying_value
|
float
|
Total carrying value of the CGU (including goodwill). |
required |
cgu_recoverable_amount
|
float
|
Recoverable amount of the CGU. |
required |
goodwill_allocated
|
float
|
Amount of goodwill allocated to this CGU. |
required |
other_assets
|
list[dict]
|
List of dicts with 'name' and 'carrying_value' for each non-goodwill asset in the CGU. |
required |
Returns:
| Type | Description |
|---|---|
ValuationResult
|
ValuationResult with total impairment, allocation details, and post-impairment carrying values. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If inputs are invalid. |
Example
result = cash_generating_unit_impairment( ... cgu_carrying_value=100_000_000, ... cgu_recoverable_amount=80_000_000, ... goodwill_allocated=15_000_000, ... other_assets=[ ... {"name": "Patents", "carrying_value": 40_000_000}, ... {"name": "Equipment", "carrying_value": 45_000_000}, ... ], ... ) result.value # Total impairment 20000000.0
Reference
IAS 36.104-108: Impairment loss allocation to a CGU.
Source code in src/advanced/impairment_testing.py
466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 | |
fair_value_less_costs_to_sell(fair_value: float, disposal_costs: float) -> ValuationResult
¶
Calculate fair value less costs to sell per IAS 36.
Fair value less costs to sell (FVLCTS) is the amount obtainable from the sale of an asset in an arm's length transaction, less costs of disposal.
Formula
FVLCTS = Fair Value - Costs to Sell
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fair_value
|
float
|
Fair value of the asset in an arm's length transaction. |
required |
disposal_costs
|
float
|
Incremental costs directly attributable to disposal (legal costs, stamp duty, transaction taxes, removal costs). |
required |
Returns:
| Type | Description |
|---|---|
ValuationResult
|
ValuationResult with FVLCTS amount, steps, and assumptions. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If inputs are invalid. |
Example
result = fair_value_less_costs_to_sell(10_000_000, 500_000) result.value 9500000.0
Reference
IAS 36.6-7: Definition of fair value less costs of disposal. IFRS 13: Fair Value Measurement.
Source code in src/advanced/impairment_testing.py
goodwill_impairment_test(carrying_value: float, fair_value: float, reporting_unit: str = '', standard: str = 'ASC350') -> ValuationResult
¶
Test goodwill for impairment per ASC 350 or IAS 36.
ASC 350 (US GAAP): Impairment = Carrying Value - Fair Value (if FV < CV, else 0) Single-step quantitative test.
IAS 36 (IFRS): Impairment = Carrying Value - Recoverable Amount Recoverable amount = higher of (FV less costs to sell, value in use) For goodwill, the reporting unit is the cash-generating unit (CGU).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
carrying_value
|
float
|
Carrying value of the reporting unit (including goodwill). |
required |
fair_value
|
float
|
Fair value of the reporting unit. |
required |
reporting_unit
|
str
|
Name of the reporting unit being tested. |
''
|
standard
|
str
|
"ASC350" for US GAAP, "IAS36" for IFRS. |
'ASC350'
|
Returns:
| Type | Description |
|---|---|
ValuationResult
|
ValuationResult with impairment amount (0 if no impairment). |
Raises:
| Type | Description |
|---|---|
ValueError
|
If inputs are invalid. |
Example
result = goodwill_impairment_test(50_000_000, 40_000_000, "Tech Division") result.value 10000000.0
Source code in src/advanced/impairment_testing.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | |
intangible_impairment_test(carrying_value: float, fair_value: float | None = None, recoverable_amount: float | None = None, standard: str = 'ASC350') -> ValuationResult
¶
Test intangible asset for impairment per ASC 350 or IAS 36.
ASC 350 (US GAAP): For indefinite-lived intangibles: Compare carrying value to fair value. Impairment = CV - FV (if FV < CV).
IAS 36 (IFRS): Compare carrying value to recoverable amount. Recoverable amount = higher of (FV less costs to sell, value in use). Impairment = CV - Recoverable Amount (if RA < CV).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
carrying_value
|
float
|
Carrying value of the intangible asset. |
required |
fair_value
|
float | None
|
Fair value of the asset (required for ASC350). |
None
|
recoverable_amount
|
float | None
|
Recoverable amount (required for IAS36). |
None
|
standard
|
str
|
"ASC350" for US GAAP, "IAS36" for IFRS. |
'ASC350'
|
Returns:
| Type | Description |
|---|---|
ValuationResult
|
ValuationResult with impairment amount (0 if no impairment). |
Raises:
| Type | Description |
|---|---|
ValueError
|
If required parameters are missing for the chosen standard. |
Example
result = intangible_impairment_test(20_000_000, fair_value=15_000_000) result.value 5000000.0
Source code in src/advanced/impairment_testing.py
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 | |
value_in_use(cash_flow_projections: list[float], terminal_growth_rate: float, discount_rate: float) -> ValuationResult
¶
Calculate value in use per IAS 36 using discounted cash flows.
Value in use is the present value of future cash flows expected to be derived from an asset or cash-generating unit, including a terminal value.
Formula
VIU = sum(CF_t / (1+r)^t) + Terminal Value / (1+r)^n Terminal Value = CF_n x (1+g) / (r - g)
Where
CF_t = cash flow in period t r = pre-tax discount rate g = terminal growth rate n = number of explicit projection periods
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cash_flow_projections
|
list[float]
|
Projected future cash flows (must be non-negative). |
required |
terminal_growth_rate
|
float
|
Perpetual growth rate for terminal value (decimal). |
required |
discount_rate
|
float
|
Pre-tax discount rate reflecting current market assessment. |
required |
Returns:
| Type | Description |
|---|---|
ValuationResult
|
ValuationResult with value in use, calculation steps, and assumptions. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If inputs are invalid (e.g., discount_rate <= terminal_growth_rate). |
Example
result = value_in_use( ... cash_flow_projections=[5_000_000, 5_500_000, 6_000_000], ... terminal_growth_rate=0.02, ... discount_rate=0.10, ... ) result.value > 0 True
Reference
IAS 36.57-59: Value in use calculation requirements.
Source code in src/advanced/impairment_testing.py
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 | |
Transfer Pricing¶
transfer_pricing
¶
Transfer pricing calculations.
Implements Section 16.1 and 16.3: - Currency-adjusted discount rate (re-exports from core.discount_rates) - CUP (Comparable Uncontrolled Price) transfer price analysis
Classes¶
Functions¶
cup_transfer_price(controlled_price: float, uncontrolled_prices: list[float]) -> ValuationResult
¶
Calculate arm's length range using the Comparable Uncontrolled Price (CUP) method.
The CUP method compares the price charged in a controlled transaction to the price charged in comparable uncontrolled transactions. Returns the interquartile range (IQR) of uncontrolled prices as the arm's length range, per OECD Transfer Pricing Guidelines.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
controlled_price
|
float
|
Price charged in the controlled (related-party) transaction. |
required |
uncontrolled_prices
|
list[float]
|
List of prices from comparable uncontrolled transactions. |
required |
Returns:
| Type | Description |
|---|---|
ValuationResult
|
ValuationResult with arm's length range, controlled price assessment, |
ValuationResult
|
and statistical analysis of comparables. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If controlled_price <= 0 or fewer than 3 uncontrolled prices. |
Example
result = cup_transfer_price(100, [90, 95, 100, 105, 110]) result.assumptions["arms_length_range"] (95.0, 105.0)
Source code in src/advanced/transfer_pricing.py
Utility Functions¶
formulas
¶
Utility functions for valuation formulas, sensitivity analysis, and contributory asset charges.
Implements useful life estimation, sensitivity analysis, and contributory asset charge calculations from Appendix A and Chapter 5 of the Ascent Partners textbook.
All functions return structured dicts with
- value: The computed result
- method: The calculation method used
- formula_reference: Reference to the methodology
- steps: Step-by-step calculation breakdown
- assumptions: List of assumptions made during calculation
Functions¶
estimate_useful_life(asset_type: str, legal_life: float | None = None, economic_factors: dict[str, float] | None = None, obsolescence_rate: float = 0.05) -> ValuationResult
¶
Estimate the useful life of an intangible asset.
The useful life is the shorter of: 1. Legal life (if applicable) 2. Economic life (based on obsolescence and market factors)
Economic life is estimated using
Economic Life = -ln(threshold) / obsolescence_rate where threshold = 0.10 (value drops below 10% of original)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
asset_type
|
str
|
Type of intangible asset (e.g., "patent", "trademark", "software") |
required |
legal_life
|
float | None
|
Legal protection period in years (overrides default for asset type) |
None
|
economic_factors
|
dict[str, float] | None
|
Optional dict of economic adjustment factors - "market_growth": Market growth rate adjustment - "competition": Competitive pressure factor (0-1) - "tech_change": Rate of technological change |
None
|
obsolescence_rate
|
float
|
Annual obsolescence rate (default 0.05) |
0.05
|
Returns:
| Type | Description |
|---|---|
ValuationResult
|
ValuationResult with estimated useful life in years |
Raises:
| Type | Description |
|---|---|
ValueError
|
If asset_type is unknown or parameters are invalid |
Book Reference
Appendix A, Section A.2 — Useful Life Estimation Chapter 5, Multi-Period Excess Earnings Method — Projection Period
Source code in src/utils/formulas.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 | |
sensitivity_analysis(function_name: str, parameter_name: str, parameter_range: list[float], fixed_parameters: dict[str, Any]) -> dict[str, Any]
¶
Perform sensitivity analysis on a valuation function.
Evaluates the function across a range of values for one parameter while holding all others constant.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
function_name
|
str
|
Name of the function to analyze. Supported: - "present_value" - "future_value" - "annuity_pv" - "perpetuity_pv" - "growing_annuity_pv" - "terminal_value" - "build_up_discount_rate" - "capm_discount_rate" - "wacc" |
required |
parameter_name
|
str
|
The parameter to vary |
required |
parameter_range
|
list[float]
|
List of values to test for the parameter |
required |
fixed_parameters
|
dict[str, Any]
|
Dict of fixed parameter values for all other parameters |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Dict with keys: - function_name: Name of the analyzed function - parameter_name: Name of the varied parameter - results: List of {"parameter_value": float, "result": float} - min_result: Minimum result value - max_result: Maximum result value - sensitivity_range: max_result - min_result - method: "Sensitivity Analysis" - formula_reference: Reference description - steps: Description of the analysis - assumptions: List of assumptions |
Raises:
| Type | Description |
|---|---|
ValueError
|
If function_name is not supported or parameter_range is empty |
Book Reference
Appendix A, Section A.3 — Sensitivity Analysis Used to assess how valuation changes with key input assumptions
Source code in src/utils/formulas.py
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 | |
contributory_asset_charges(assets: list[dict[str, Any]]) -> dict[str, Any]
¶
Calculate contributory asset charges (CAC) for a set of supporting assets.
Contributory asset charges represent the return required on supporting assets (working capital, fixed assets, assembled workforce, etc.) that contribute to the earnings of the subject intangible asset.
Formula
CAC_i = Asset_Value_i * Return_Rate_i Total CAC = sum(CAC_i)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
assets
|
list[dict[str, Any]]
|
List of dicts with keys: - type: Asset type (e.g., "working_capital", "fixed_assets", "assembled_workforce") - value: Asset value - return_rate: Required return rate for that asset type |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Dict with keys: - total_cac: Sum of all contributory asset charges - asset_charges: List of {"type": str, "value": float, "return_rate": float, "charge": float} - method: "Contributory Asset Charge" - formula_reference: Reference description - steps: Step-by-step calculation - assumptions: List of assumptions |
Raises:
| Type | Description |
|---|---|
ValueError
|
If assets list is empty or values are invalid |
Book Reference
Chapter 5, Section 5.3 — Contributory Asset Charges Used in Multi-Period Excess Earnings Method (MPEEM) to isolate cash flows attributable to the subject intangible asset