CAPM & Cost of Equity
valuation_capmEstimate the cost of capital: standard CAPM, startup-adjusted CAPM with size and illiquidity premiums, portfolio beta from weighted asset betas, and WACC blending after-tax cost of equity and debt. Method selects the formula. Use to derive the discount rate that feeds valuation_time_value and DCF models; for cross-border rates add valuation_international. Parameters apply per method: capm needs risk_free_rate + beta + market_return; startup_capm adds size_premium and liquidity_premium; portfolio_beta needs weights + betas, which must be equal length; wacc needs equity_value + debt_value + cost_of_equity + cost_of_debt + tax_rate. Only method is required; all other parameters are method-dependent, so supply those the selected method names and omit the rest (defaults apply where defined). Rate and decimal inputs are fractions (0.10 = 10%); probability and weight lists are in [0,1] and sum to 1. Returns value, method, inputs, assumptions, chapter, formula_number and calculation steps; pure arithmetic — no I/O and no external calls — rounded to 2 decimals, with no auth or rate limits. An unknown method, or a missing method-required parameter, returns an error instead of a value.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| beta | No | Systematic risk beta (market = 1.0). | |
| betas | No | Asset betas aligned with weights. | |
| method | Yes | Formula to apply. Options: capm = E(R) = Rf + β·(E(Rm) - Rf).; startup_capm = r = Rf + β·MRP + size premium + illiquidity premium.; portfolio_beta = βp = Σ wᵢ·βᵢ.; wacc = WACC = (E/V)·Re + (D/V)·Rd·(1 − T). | |
| weights | No | Portfolio or factor weights, each in [0,1] and summing to 1 (same order as the paired value list). | |
| tax_rate | No | Effective tax rate as a decimal. | |
| debt_value | No | Market value of debt, in currency units. | |
| cost_of_debt | No | Pre-tax cost of debt Rd as a decimal. | |
| equity_value | No | Value of equity offered, currency units. | |
| size_premium | No | Small-cap / size premium as a decimal. | |
| market_return | No | Expected market return as a decimal (e.g. 0.10 for 10%). | |
| cost_of_equity | No | After-tax cost of equity Re as a decimal. | |
| risk_free_rate | No | Risk-free rate as a decimal (e.g. 0.04 for 4%). | |
| liquidity_premium | No | Illiquidity premium as a decimal. | |
| market_risk_premium | No | Market risk premium as a decimal (e.g. 0.06). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Error message when the call fails. | |
| steps | No | Intermediate steps for traceability. | |
| value | Yes | Computed valuation or metric. | |
| inputs | No | Echo of the normalised inputs used. | |
| method | No | Formula / method name that produced the result. | |
| chapter | No | Source textbook chapter. | |
| assumptions | No | Modelling assumptions applied. | |
| formula_number | No | Source textbook formula number (e.g. '3.1'). |