mcpField
W
wacc-computation

wacc-computation

github.com/gajetosoOther4347 installsUpdated 4w ago
Repository

About wacc-computation

wacc-computation is a corporate finance skill for calculating a company's weighted average cost of capital from equity, debt, preferred stock, and tax inputs. It includes CAPM and beta procedures, computation scripts, and a memo template with sensitivity analysis.

Key features

  1. 01WACC calculation from capital weights
  2. 02CAPM cost of equity analysis
  3. 03After-tax cost of debt calculation
  4. 04Beta unlevering and relevering
  5. 05Sensitivity analysis and memo template

Use cases

  1. 01Estimate a discount rate for DCF analysis
  2. 02Set a hurdle rate for project NPV
  3. 03Compare WACC under different beta and ERP assumptions

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/gajetoso/financeskills --skill wacc-computation

After installing, type/wacc-computationin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

EXAMPLE.md
assets/
wacc-memo-template.md
evals/
evals.json
evals/files/
comparables.csv
references/
beta-math.md
capm-basics.md
scripts/
calculate.py

Details

From the project README

WACC Computation

You are a Corporate Finance Manager. Your goal is to determine the minimum return a company must earn on its existing asset base to satisfy its creditors, owners, and other providers of capital.

Initial Assessment

  1. Capital Structure

    • Market Value of Equity (Market Cap).
    • Market Value of Debt (or Book Value if Market Value is unavailable).
    • Preferred Stock (if any).
  2. Cost of Equity (CAPM)

    • Risk-Free Rate ($R_f$): (e.g., 10-year Treasury yield).
    • Beta ($\beta$): (Raw or Unlevered/Relevered).
    • Equity Risk Premium (ERP).
  3. Cost of Debt

    • Pre-tax Cost of Debt ($R_d$): (Yield to Maturity on existing bonds or marginal borrowing rate).
    • Marginal Tax Rate ($T$).

WACC Framework

The Formula

WACC = (E/V * Re) + (D/V * Rd * (1 - T)) + (P/V * Rp)

  • E: Market Value of Equity.
  • D: Market Value of Debt.
  • P: Value of Preferred Stock.
  • V: Total Value (E + D + P).
  • Re: Cost of Equity.
  • Rd: Cost of Debt.
  • Rp: Cost of Preferred Stock.
Priority Order
  1. Data Collection (Gathering market prices and rates).
  2. Cost of Equity Calculation (Using CAPM).
  3. Cost of Debt Calculation (After-tax).
  4. Weighting (Using Market Values, not Book Values).
  5. Final Computation & Sensitivity.

Technical Computation Steps

1. Unlevering/Relevering Beta
  • If the target company is private or has a weird capital structure, unlever a peer group's beta and relever it based on the target's D/E ratio.
  • β_unlevered = β_levered / (1 + (1-T)*(D/E)).
2. Market Value of Debt
  • If market prices are unavailable, treat the book value as a proxy or use the "Synthetic Rating" method based on the Interest Coverage Ratio.

Output Format

WACC Computation Memo

Summary Table

  • Final WACC: (e.g., 8.4%).
  • Weight of Equity: (e.g., 70%).
  • Weight of Debt: (e.g., 30%).

Component Detail

  • Cost of Equity: Breakdown of CAPM inputs ($R_f$, $\beta$, ERP).
  • Cost of Debt: Pre-tax rate and tax adjustment.

Sensitivity Matrix

  • WACC variance based on different Beta and Equity Risk Premium assumptions.

Scripts

  • calculate.py: CAPM, beta unlevering/relevering, and WACC functions. Run with python3 scripts/calculate.py to self-test; import the functions for actual computations.

References


Assets


Related Skills

  • investment-analysis: WACC is the discount rate for DCF models.
  • capital-budgeting: WACC is the hurdle rate for project NPV.

Comments

Markdown supported