hedgehog-finance/hogagent/company-valuation

Claude Code and agent skill by hedgehog-finance/hogagent

Trust tier 3
  • community
Source check pending

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-valuation

SKILL.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):

CategoryScriptCountMethods
Relativescripts/relative.mjs12PE / PE-TTM / PB / PS / PS-TTM / EV-EBITDA / EV-Revenue / PEG / ARR / P-Active-User / P-GMV / EV-FCF
Absolutescripts/absolute.mjs8DCF(5) / DDM / rNPV / Black-Scholes
Strategicscripts/strategic.mjs3TAM-SAM-SOM / LTV-CAC / NRR

Invocation

Use the same CLI parameter rule on every Agent and operating system:

  1. When every business value is a non-empty, single-line string | finite number | boolean, pass it as a named argument (--key value or --key=value). Names are case-sensitive and are not normalized.
  2. 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.
  3. 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.
  4. 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:

bash
node '<skill_dir>/scripts/relative.mjs' pe --marketCap 1000000000 --netIncome 80000000

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.

MethodFormulaBest For
PEMktCap / NetIncomeMature, stable earnings (consumer goods)
PE-TTMMktCap / trailing-4Q net incomeMature profitable companies
PBMktCap / Parent EquityFinancials, capital-intensive
PSMktCap / RevenueLoss-making high-growth (internet/SaaS)
PS-TTMMktCap / trailing-4Q revenueHigh-growth, pre-profit companies
EV/EBITDAEV / EBITDAManufacturing, telecom, transport
EV/RevenueEV / RevenueLoss-making but fast-growing
PEGPE / earnings growth rateHigh-growth, measure if PE is justified
ARR MultiplesEV / ARRSaaS (benchmark: Snowflake etc.)
P/Active-UserMktCap / active usersSocial media, platform companies
P/GMVMktCap / GMVE-commerce platforms
EV/FCFEV / Free Cash FlowSemiconductor, high-cash-flow companies
Absolute Valuation

Forecast future earnings and discount to present value (intrinsic value).

MethodFormulaBest For
DCFDiscount future FCF + terminal valueMature companies with stable cash flows
DDMDiscount future dividendsMature, high-dividend blue chips
rNPVΣ(NPV × success probability)Biotech pipeline valuation
Black-ScholesOption pricing modelHigh-uncertainty frontier tech
Strategic Valuation

For disruptive tech companies or special scenarios.

MethodFormulaBest For
TAM/SAM/SOMSOM revenue × industry P/SPre-commercialization (autonomous driving, satellites)
LTV/CACUnit economics → FCF → DCFSubscription businesses
NRRProjected revenue × industry P/SAI 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 / *HighFactor params.

Usage Recommendations

Use two valuation models for cross-validation (e.g. 1 relative + 1 absolute):

Company StageRecommended Combo
Mature & profitablePE-TTM + DCF
Capital-intensivePB + EV/EBITDA
High-growth, no profitPS-TTM + EV/Revenue
SaaS / subscriptionARR + LTV/CAC
BiotechrNPV + DCF
Frontier techTAM/SAM/SOM + Black-Scholes
Platform / socialP/Active-User + P/GMV
Semiconductor / AI infraEV/FCF + PEG

Data Preparation

No API calls. Caller must query data via other skills and pass as params.

Field Reference
SourceFieldsUsed By
Daily basicstotal_mv, close, total_shareAll relative methods
Daily basicspe_ttm, pb, ps_ttmPE-TTM / PB / PS-TTM
Income stmtn_income_attr_p, total_revenue, ebit, ebitdaPE / PS / EV-EBITDA
Balance sheettotal_hldr_eqy_exc_min_int, st_borr, lt_borr, money_capPB / EV
Cash flow stmtfree_cashflow, n_cashflow_actEV/FCF / DCF
Industry dailype, pb (industry-level)Industry benchmarks
Financial indicatorsroe, netprofit_yoy, grossprofit_marginPremium/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:

  1. Direct: pass pre-computed ttmNetProfit or ttmRevenue
  2. Auto: pass reports[] (with end_date + financial field), script computes TTM automatically

TTM rules (all based on cumulative values, subtraction removes overlap):

  • end_date ends with 1231 → Annual: TTM = annual value
  • end_date ends with 0331 → Q1: TTM = Q1_cum + (lastYear_annual − lastYear_Q1_cum) → this year Q1 + last year Q2-Q4
  • end_date ends with 0630 → H1: TTM = H1_cum + (lastYear_annual − lastYear_H1_cum) → this year H1 + last year H2
  • end_date ends with 0930 → 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)
ParamTypeDefaultDescription
totalSharenumber—Total shares outstanding (for price range calc)
currentPricenumber—Current stock price (for rating)
*LowFactornumber0.8Discount factor
*HighFactornumber1.1 or 1.2Premium factor (1.2 for arr/p-active-user/p-gmv/ev-fcf)
1. pe — Static P/E
json
{"marketCap":300000,"netIncome":20000,"industryPE":18,"totalShare":50000}
ParamTypeReqDesc
marketCapnumbereitherTotal market cap
netIncomenumbereitherNet income
pricenumbereitherStock price (with eps)
epsnumbereitherEarnings per share
penumberoptDirect PE value
industryPEnumberoptIndustry PE multiple
2. pe-ttm — Trailing P/E (TTM)
jsonc
// Direct mode
{"marketCap":300000,"ttmNetProfit":30000,"totalShare":50000,"industryPE":15}
// Auto mode (reports array)
{"marketCap":300000,"reports":[{"end_date":"20250331","n_income_attr_p":8000},{"end_date":"20241231","n_income_attr_p":25000},{"end_date":"20240331","n_income_attr_p":7000}],"totalShare":50000,"industryPE":15}
ParamTypeReqDefaultDesc
marketCapnumberyes—Total market cap
ttmNetProfitnumbereither—Pre-computed TTM net profit
reportsarrayeither—Reports array (end_date + n_income_attr_p)
reportFieldstringoptn_income_attr_pField name in reports
industryPEnumberopt—Industry PE multiple
3. pb — Price/Book
json
{"marketCap":300000,"equityToParent":200000,"totalShare":50000,"industryPB":1.5}
ParamTypeReqDesc
marketCapnumberyesTotal market cap
equityToParentnumberyesEquity attributable to parent
industryPBnumberoptIndustry PB multiple
4. ps — Static P/S
json
{"marketCap":300000,"revenue":50000,"industryPS":8,"totalShare":50000}
ParamTypeReqDesc
marketCapnumberyesTotal market cap
revenuenumberyesRevenue
industryPSnumberoptIndustry PS multiple
5. ps-ttm — Trailing P/S (TTM)
json
{"marketCap":300000,"ttmRevenue":120000,"totalShare":50000,"peerPS":2.5}
ParamTypeReqDefaultDesc
marketCapnumberyes—Total market cap
ttmRevenuenumbereither—Pre-computed TTM revenue
reportsarrayeither—Reports array (end_date + total_revenue)
reportFieldstringopttotal_revenueField name in reports
peerPSnumberopt—Peer avg PS-TTM
industryPSnumberopt—Industry PS
6. ev-ebitda
json
{"marketCap":300000,"totalDebt":50000,"cash":30000,"ebitda":40000}
ParamTypeReqDesc
marketCapnumberyesMarket cap
totalDebtnumberyesTotal debt
cashnumberyesCash
ebitdanumberyesEBITDA
7. ev-revenue
json
{"marketCap":300000,"totalDebt":50000,"cash":30000,"revenue":100000}

Same as ev-ebitda but with revenue instead of ebitda.

8. peg — PEG Ratio
json
{"pe":20,"earningsGrowthRate":0.25,"targetPEG":1.0,"netIncome":20000,"totalShare":50000}
ParamTypeReqDefaultDesc
penumbereither—PE value
marketCap + netIncomenumbereither—Or derive PE from these
earningsGrowthRatenumberyes—Growth rate (decimal, e.g. 0.25 = 25%)
targetPEGnumberopt1.0Target PEG
netIncomenumberopt—For valuation calc
9. arr — ARR Multiples
json
{"marketCap":500000,"totalDebt":50000,"cash":30000,"arr":60000,"industryARRMultiple":12}
ParamTypeReqDefaultDesc
marketCapnumberyes—Market cap
totalDebtnumberopt0Total debt
cashnumberopt0Cash
arrnumberyes—Annual recurring revenue
industryARRMultiplenumberopt—Industry avg ARR multiple (8-20x)
10. p-active-user — Per-User Value (MAU/DAU)
json
{"marketCap":500000,"activeUsers":80000000,"userType":"MAU","industryValuePerUser":0.01}

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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/hedgehog-finance/hogagent/company-valuation/badge)](https://verified-skill.com/skills/hedgehog-finance/hogagent/company-valuation)

Something wrong with this skill or its page? Tell us.