hedgehog-finance/hogagent/company-valuation
Claude Code and agent skill by hedgehog-finance/hogagent
- community
Checking that the SKILL.md file is still in the repository.
Valuation engine: relative (PE/PE-TTM/PB/PS/PS-TTM/EV-EBITDA/EV-Revenue/PEG/ARR/P-Active-User/P-GMV/EV-FCF), absolute (DCF/DDM/rNPV/Black-Scholes), strategic (TAM-SAM-SOM/LTV-CAC/NRR). Triggers: valuation, intrinsic value, PE, PB, PS, DCF, DDM, PEG, EV/EBITDA, ARR, TAM, LTV/CAC, NRR, rNPV. Blocks: technical analysis, candlestick patterns, non-valuation financial calculations.
Install
npx vskill@latest install hedgehog-finance/hogagent/company-valuationSKILL.md
Company Valuation Engine
Overview
Pure calculation engine — no external API calls. Financial data is queried by the caller (agent) via skills like hedgehog-company-index-data and passed as JSON params.
23 valuation methods (DCF includes 5 sub-methods):
| Category | Script | Count | Methods | |
|---|---|---|---|---|
| Relative | scripts/relative.mjs | 12 | PE / PE-TTM / PB / PS / PS-TTM / EV-EBITDA / EV-Revenue / PEG / ARR / P-Active-User / P-GMV / EV-FCF | |
| Absolute | scripts/absolute.mjs | 8 | DCF(5) / DDM / rNPV / Black-Scholes | |
| Strategic | scripts/strategic.mjs | 3 | TAM-SAM-SOM / LTV-CAC / NRR |
Invocation
Use the same CLI parameter rule on every Agent and operating system:
- When every business value is a non-empty, single-line
string | finite number | boolean, pass it as a named argument (--key valueor--key=value). Names are case-sensitive and are not normalized. - When any value is an object, array,
null, multiline text, a numeric/boolean-looking string that must remain a string, or contains difficult quoting, write the complete parameter object as UTF-8 JSON and pass--params-file. - Agent-created parameter files must have a unique basename matching
tmp-<skill-name>-<unique-id>.json, must not use the reserved.hedgehog/directory, and must be removed after the call when no longer needed. UTF-8 BOM is accepted. - Do not inline nested JSON or combine flat arguments with a JSON/file payload. Create JSON with the Agent's file-writing capability, not
echo, a shell heredoc, or PowerShell string assembly.
POSIX/Git Bash form: node '<script>' <method> --key 'single-line value' or node '<script>' <method> --params-file '<workspace>/tmp-<skill-name>-<id>.json'.
PowerShell form: node "<script>" <method> --key "single-line value" or node "<script>" <method> --params-file "<workspace>\\tmp-<skill-name>-<id>.json".
On Windows, use PowerShell or a verified Git for Windows Bash; cmd.exe is unsupported. Keep each command on one physical line. HogAgent marks its Windows shell as UNSANDBOXED; other Agents apply their own native permissions and sandbox.
List methods with node '<skill_dir>/scripts/<script>.mjs' --help. For example, a flat call can use:
When a method needs an array or object, write its payload to a unique file such as <workspace>/tmp-company-valuation-<id>.json, call it with --params-file, then delete the file. The payload blocks below describe that file's contents. Legacy positional JSON and --params remain compatibility-only.
Method Classification
Relative Valuation
Compare with industry peers to determine value.
| Method | Formula | Best For | |
|---|---|---|---|
| PE | MktCap / NetIncome | Mature, stable earnings (consumer goods) | |
| PE-TTM | MktCap / trailing-4Q net income | Mature profitable companies | |
| PB | MktCap / Parent Equity | Financials, capital-intensive | |
| PS | MktCap / Revenue | Loss-making high-growth (internet/SaaS) | |
| PS-TTM | MktCap / trailing-4Q revenue | High-growth, pre-profit companies | |
| EV/EBITDA | EV / EBITDA | Manufacturing, telecom, transport | |
| EV/Revenue | EV / Revenue | Loss-making but fast-growing | |
| PEG | PE / earnings growth rate | High-growth, measure if PE is justified | |
| ARR Multiples | EV / ARR | SaaS (benchmark: Snowflake etc.) | |
| P/Active-User | MktCap / active users | Social media, platform companies | |
| P/GMV | MktCap / GMV | E-commerce platforms | |
| EV/FCF | EV / Free Cash Flow | Semiconductor, high-cash-flow companies |
Absolute Valuation
Forecast future earnings and discount to present value (intrinsic value).
| Method | Formula | Best For | |
|---|---|---|---|
| DCF | Discount future FCF + terminal value | Mature companies with stable cash flows | |
| DDM | Discount future dividends | Mature, high-dividend blue chips | |
| rNPV | Σ(NPV × success probability) | Biotech pipeline valuation | |
| Black-Scholes | Option pricing model | High-uncertainty frontier tech |
Strategic Valuation
For disruptive tech companies or special scenarios.
| Method | Formula | Best For | |
|---|---|---|---|
| TAM/SAM/SOM | SOM revenue × industry P/S | Pre-commercialization (autonomous driving, satellites) | |
| LTV/CAC | Unit economics → FCF → DCF | Subscription businesses | |
| NRR | Projected revenue × industry P/S | AI SaaS / AI Agent (customer expansion revenue) |
Premium/Discount Factors
Adjust industry multiples based on company traits:
Premium factors (raise multiples):
- Market leadership / brand moat
- Core patents / high tech barriers
- High switching costs / strong stickiness
- Blue-chip customer endorsements
Discount factors (lower multiples):
- Single-customer revenue concentration
- Low R&D investment vs. peers
- Regulatory / policy risk
Defaults: low factor 0.8 (−20%); high factor 1.1 (+10%) for pe/pe-ttm/pb/ps/ps-ttm, 1.2 (+20%) for arr/p-active-user/p-gmv/ev-fcf. Customizable via*LowFactor/*HighFactorparams.
Usage Recommendations
Use two valuation models for cross-validation (e.g. 1 relative + 1 absolute):
| Company Stage | Recommended Combo | |
|---|---|---|
| Mature & profitable | PE-TTM + DCF | |
| Capital-intensive | PB + EV/EBITDA | |
| High-growth, no profit | PS-TTM + EV/Revenue | |
| SaaS / subscription | ARR + LTV/CAC | |
| Biotech | rNPV + DCF | |
| Frontier tech | TAM/SAM/SOM + Black-Scholes | |
| Platform / social | P/Active-User + P/GMV | |
| Semiconductor / AI infra | EV/FCF + PEG |
Data Preparation
No API calls. Caller must query data via other skills and pass as params.
Field Reference
| Source | Fields | Used By | |
|---|---|---|---|
| Daily basics | total_mv, close, total_share | All relative methods | |
| Daily basics | pe_ttm, pb, ps_ttm | PE-TTM / PB / PS-TTM | |
| Income stmt | n_income_attr_p, total_revenue, ebit, ebitda | PE / PS / EV-EBITDA | |
| Balance sheet | total_hldr_eqy_exc_min_int, st_borr, lt_borr, money_cap | PB / EV | |
| Cash flow stmt | free_cashflow, n_cashflow_act | EV/FCF / DCF | |
| Industry daily | pe, pb (industry-level) | Industry benchmarks | |
| Financial indicators | roe, netprofit_yoy, grossprofit_margin | Premium/discount judgment |
TTM Calculation (PE-TTM / PS-TTM)
Important: Quarterly/semi-annual/9-month/annual financial reports contain year-to-date cumulative values (not single-quarter). TTM calculation accounts for this.
Two modes:
- Direct: pass pre-computed
ttmNetProfitorttmRevenue - Auto: pass
reports[](withend_date+ financial field), script computes TTM automatically
TTM rules (all based on cumulative values, subtraction removes overlap):
end_dateends with1231→ Annual: TTM = annual valueend_dateends with0331→ Q1: TTM = Q1_cum + (lastYear_annual − lastYear_Q1_cum) → this year Q1 + last year Q2-Q4end_dateends with0630→ H1: TTM = H1_cum + (lastYear_annual − lastYear_H1_cum) → this year H1 + last year H2end_dateends with0930→ Q3: TTM = Q3_cum + (lastYear_annual − lastYear_Q3_cum) → this year Q1-Q3 + last year Q4
API Reference
Relative Valuation (relative.mjs)
Common Optional Params (shared across methods)
| Param | Type | Default | Description | |
|---|---|---|---|---|
| totalShare | number | — | Total shares outstanding (for price range calc) | |
| currentPrice | number | — | Current stock price (for rating) | |
| *LowFactor | number | 0.8 | Discount factor | |
| *HighFactor | number | 1.1 or 1.2 | Premium factor (1.2 for arr/p-active-user/p-gmv/ev-fcf) |
1. pe — Static P/E
| Param | Type | Req | Desc | |
|---|---|---|---|---|
| marketCap | number | either | Total market cap | |
| netIncome | number | either | Net income | |
| price | number | either | Stock price (with eps) | |
| eps | number | either | Earnings per share | |
| pe | number | opt | Direct PE value | |
| industryPE | number | opt | Industry PE multiple |
2. pe-ttm — Trailing P/E (TTM)
| Param | Type | Req | Default | Desc | |
|---|---|---|---|---|---|
| marketCap | number | yes | — | Total market cap | |
| ttmNetProfit | number | either | — | Pre-computed TTM net profit | |
| reports | array | either | — | Reports array (end_date + n_income_attr_p) | |
| reportField | string | opt | n_income_attr_p | Field name in reports | |
| industryPE | number | opt | — | Industry PE multiple |
3. pb — Price/Book
| Param | Type | Req | Desc | |
|---|---|---|---|---|
| marketCap | number | yes | Total market cap | |
| equityToParent | number | yes | Equity attributable to parent | |
| industryPB | number | opt | Industry PB multiple |
4. ps — Static P/S
| Param | Type | Req | Desc | |
|---|---|---|---|---|
| marketCap | number | yes | Total market cap | |
| revenue | number | yes | Revenue | |
| industryPS | number | opt | Industry PS multiple |
5. ps-ttm — Trailing P/S (TTM)
| Param | Type | Req | Default | Desc | |
|---|---|---|---|---|---|
| marketCap | number | yes | — | Total market cap | |
| ttmRevenue | number | either | — | Pre-computed TTM revenue | |
| reports | array | either | — | Reports array (end_date + total_revenue) | |
| reportField | string | opt | total_revenue | Field name in reports | |
| peerPS | number | opt | — | Peer avg PS-TTM | |
| industryPS | number | opt | — | Industry PS |
6. ev-ebitda
| Param | Type | Req | Desc | |
|---|---|---|---|---|
| marketCap | number | yes | Market cap | |
| totalDebt | number | yes | Total debt | |
| cash | number | yes | Cash | |
| ebitda | number | yes | EBITDA |
7. ev-revenue
Same as ev-ebitda but with revenue instead of ebitda.
8. peg — PEG Ratio
| Param | Type | Req | Default | Desc | |
|---|---|---|---|---|---|
| pe | number | either | — | PE value | |
| marketCap + netIncome | number | either | — | Or derive PE from these | |
| earningsGrowthRate | number | yes | — | Growth rate (decimal, e.g. 0.25 = 25%) | |
| targetPEG | number | opt | 1.0 | Target PEG | |
| netIncome | number | opt | — | For valuation calc |
9. arr — ARR Multiples
| Param | Type | Req | Default | Desc | |
|---|---|---|---|---|---|
| marketCap | number | yes | — | Market cap | |
| totalDebt | number | opt | 0 | Total debt | |
| cash | number | opt | 0 | Cash | |
| arr | number | yes | — | Annual recurring revenue | |
| industryARRMultiple | number | opt | — | Industry avg ARR multiple (8-20x) |
10. p-active-user — Per-User Value (MAU/DAU)
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/company-valuation/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/hedgehog-finance/hogagent/company-valuation)