Company ValuationSAFE
A collection of skills for AI financial analysis.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
Estimate the intrinsic value of a public company via DCF, relative (peer multiple), and sum-of-parts (SOTP) methods, and blend into a triangulated implied share price with sensitivity tables.
What it does
- Pulls 5 years of financials + analyst estimates via yfinance
- Builds a 5-year DCF with explicit revenue / margin / WACC / terminal-value assumptions
- Applies peer median P/E, EV/Revenue, EV/EBITDA multiples across 4-6 peers
- Runs SOTP when the company has 2+ distinct reporting segments
- Presents a blended implied price with method weights, WACC × g sensitivity matrix, and Bull/Base/Bear scenarios
- Handles banks/REITs/pre-revenue/cyclical edge cases with appropriate fallbacks
Triggers
what is AAPL worth, valuation of NVDA, fair value of TSLA, DCF for MSFT, build a DCF, intrinsic value, implied share price, is X overvalued/undervalued, relative valuation, EV/EBITDA target, SOTP, sum of the parts, price target from fundamentals, value this company
Prerequisites
- Python 3.8+
yfinance,numpy,pandas(auto-installed if missing)
Platform
CLI-based agents (Claude Code). Requires shell + pip.
Setup
No authentication required. First run will auto-install dependencies.
Reference Files
references/dcf.md— DCF methodology, industry-specific guidance (software, retail, financials, healthcare, energy, manufacturing, CPG, telecom, REITs, streaming), common pitfallsreferences/relative_valuation.md— Peer selection heuristics, multiple adjustment rules, Rule of 40 for SaaS, default peer sets by themereferences/sotp.md— Sum-of-parts methodology, conglomerate discount detection, catalyst framework, position sizingreferences/wacc_erp_rates.md— Risk-free rates (live + default), equity risk premiums, sector WACC bands, sector-default betas, terminal growth ceilings
Output
Structured briefing with: headline verdict, snapshot, three-method summary, DCF build, peer compar
317cbce031f1OBSERVED · 2026-10-08Host compatibility
What the documentation claims. We have not run a compatibility test.
| Host | Status | Notes |
|---|---|---|
| claude-code | mentioned |
What it tells the agent
The instruction file, verbatim from the audited commit — this is the text the model reads, and the surface the audit's instruction layer examines. Quoted here so you can judge it without cloning anything.
---
name: company-valuation
description: >
Estimate a public company's intrinsic value with DCF, relative (peer multiple), and
sum-of-the-parts (SOTP) methods, then blend them into an implied share price with
upside/downside vs the market price, a WACC and terminal-growth sensitivity grid,
and bull/base/bear scenarios. Use this skill whenever the user asks what a company
or ticker is worth: fair value, intrinsic value, implied share price, a price target
from fundamentals, whether it is overvalued or undervalued, building a DCF (WACC,
terminal value, discounted cash flow), EV/EBITDA or P/E based targets, peer
comparison valuation, or SOTP and conglomerate discounts. Run the model rather than
answering valuation questions from memory.
---
# Company Valuation
Triangulates intrinsic value via three methods, then blends them to an implied share price:
1. **DCF** — 5-year FCFF projection, discount at WACC, terminal value.
2. **Relative** — apply peer median P/E, EV/Revenue, EV/EBITDA.
3. **SOTP** — when 2+ distinct reporting segments exist, value each at pure-play peer multiples.
Always present a WACC × terminal-growth sensitivity table and Bull/Base/Bear scenarios.
**Disclaimer**: Research/educational output. Not financial advice.
---
## Step 1: Detection Flow
Detect data source and runtime deps. The skill supports 2 method paths — pick the richest one available.
**Environment status:**
```
!`python3 -c "exec('try:\n import yfinance, numpy, pandas\n print(\'YFIN_OK\')\nexcept Exception:\n print(\'YFIN_MISSING\')')"`
```
```
!`python3 -c "exec('try:\n import yfinance as yf\n t=yf.Ticker(\'^TNX\')\n p=t.fast_info.last_price\n print(f\'RF_10Y={p/100:.4f}\')\nexcept Exception:\n print(\'RF_FETCH_FAIL\')')"`
```
**Decision tree:**
| Condition | Method path |
|---|---|
| `YFIN_OK` | **Path A** (primary): yfinance for financials + peer multiples |
| `YFIN_MISSING` | **Path B**: pip-install yfinance, then Path A. `python3 -m pip install -q yfinance numpy pandas` |
| `RF_FETCH_FAIL` | Use default `rf = 0.045` and note stale risk-free rate in output |
If `RF_10Y=` printed, use that value as `rf` in Step 4d instead of the hardcoded 4.5%.
---
## Step 2: Choose Methods & Set Defaults
### Method applicability
| Company type | DCF | Relative | SOTP | Fallback |
|---|---|---|---|---|
| Mature cash-flow (CPG, telecom, utilities) | ✅ primary | ✅ | ❌ | — |
| High-growth SaaS / software | ✅ with care | ✅ primary | ❌ | Use EV/Revenue + Rule of 40 |
| Multi-segment conglomerate | ✅ | ✅ | ✅ primary | See `references/sotp.md` |
| Banks / insurance | ❌ | ✅ (P/B, P/TBV) | ❌ | DDM or excess return; note in output |
| Pre-revenue | ❌ | EV/Revenue only | ❌ | Flag low confidence |
| REITs | ❌ | ✅ (P/FFO, P/AFFO) | ❌ | NAV-based |
| Cyclicals (energy, semis, industrials) | ✅ on mid-cycle | ✅ | sometimes | Normalize through-cycle |
### Defaults table
Settle every parameter before pulling data — these defaults apply unless the user overrides them.
| Parameter | Default | Rationale |
|---|---|---|
| Projection horizon | 5 years | Standard explicit forecast window |
| Terminal growth `g` | 2.5% | ~ long-run US GDP |
| Risk-free rate `rf` | Live 10Y UST from Step 1, else 4.5% | Current cost of capital anchor |
| Equity risk premium `erp` | 5.5% | Damodaran mid-range |
| Beta | `info['beta']` from yfinance | Market-observed levered beta |
| Cost of debt `kd` | `interest_expense / total_debt`, else 5.5% | Effective rate; fallback to IG spread |
| Tax rate | 3-yr median effective rate, floored 15%, capped 30% | Strips out one-offs |
| Margin assumptions | 3-yr median of each ratio | Smooths cyclical noise |
| SBC treatment | Cash for software/SaaS; non-cash for industrials/CPG | Industry convention |
| Peer count | 4-6 | Balances signal vs noise |
| Peer multiple | Median (not mean) | Robust to outliers |
| Method weights (no SOTP) | DCF 50% / Relative 50% | Equal triangulation |
| Method weights (with SOTP) | DCF 40% / Relative 30% / SOTP 30% | SOTP gets weight when applicable |
| Sensitivity grid | WACC ±1% in 0.5% steps × g from 1.5-3.5% in 0.5% | 5×5 matrix |
See `references/wacc_erp_rates.md` for current risk-free rates, ERP tables, and sector WACC benchmarks.
---
## Step 3: Pull Data
```python
import yfinance as yf
import numpy as np
import pandas as pd
TICKER = "AAPL" # replace
t = yf.Ticker(TICKER)
info = t.info
income_a = t.income_stmt
cashflow_a = t.cashflow
balance_a = t.balance_sheet
income_q = t.quarterly_income_stmt
cashflow_q = t.quarterly_cashflow
earnings_est = t.earnings_estimate
revenue_est = t.revenue_estimate
price = info.get("currentPrice") or info.get("regularMarketPrice")
market_cap = info.get("marketCap")
shares_out = info.get("sharesOutstanding")
total_debt = info.get("totalDebt") or 0
cash = info.get("totalCash") or 0
beta = info.get("beta") or 1.0
sector = info.get("sector")
industry = info.get("industry")
```
Key financial statement rows (yfinance labels):
| Need | Row |
|---|---|
| Revenue | `Total Revenue` |
| EBIT | `Operating Income` |
| Net income | `Net Income` |
| D&A | `Depreciation And Amortization` (in cashflow) |
| CapEx | `Capital Expenditure` (negative) |
| ΔNWC | `Change In Working Capital` (cashflow) |
| SBC | `Stock Based Compensation` (cashflow) |
---
## Step 4: DCF Build
Full methodology + industry-specific tweaks in `references/dcf.md`. Quick skeleton:
```python
# 4a. Revenue growth path — fade from Y1 (consensus or hist CAGR) to terminal g
rev = income_a.loc["Total Revenue"].dropna().iloc[::-1].values # yfinance columns are newest-first; reverse to oldest -> newest
hist_cagr = (rev[-1] / rev[0]) ** (1 / (len(rev)-1)) - 1
y1 = float(revenue_est.loc["+1y", "growth"]) if "+1y" in revenue_est.index else hist_cagr
g_terminal = 0.025
growth_path = np.linspace(y1, g_terminal + 0.01, 5)
# 4b. Margins — 3y median
ebit_margin = float((income_a.loc["Operating Income"] / income_a.loc["Total RevenTrust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | NA |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- pinned
- Secrets in source
- none-found
Findings (0)
No findings outside the package's declared scope.
Gates applied: no_behavioural_pass.
317cbce031f1full audit observations/trust-audit/skill/himself65__company-valuation.json · Report an issue / request a re-scanAudit history
Every audit this skill has had.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-08 | 317cbce031f1 | SAFE | B | 89 | first audit |
Questions
What does the Company Valuation skill do?
A collection of skills for AI financial analysis.
Is Company Valuation safe to install?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean skill reads B.
What can Company Valuation access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
Which assistants does Company Valuation work with?
Its documentation mentions claude-code. That is what the text claims, not a compatibility test we ran.
How current is this page?
The grade is for one exact copy of the source (317cbce031f1), read on 2026-10-08. The repository is watched, and a new audit runs when it changes — this is the first audit.