| name | creating-financial-models |
| type | capability |
| description | Build financial models for investment decisions: complete DCF valuations (FCF projections, WACC via CAPM, terminal value via perpetuity growth or exit multiple, enterprise/equity value, per-share value), M&A merger models (accretion/dilution to acquirer EPS, stock-vs-cash consideration, financing drag, purchase-price-allocation intangible amortization, breakeven synergies), sensitivity analysis (one-way and two-way data tables, tornado charts, breakeven search), and probability-weighted best/base/worst scenario planning. Runs locally in Python (numpy + pandas) — no API key. Triggers: "build a DCF model for X", "what's the intrinsic / fair value of Y", "DCF / discounted cash flow valuation", "is this acquisition accretive or dilutive", "merger model / accretion-dilution for X buying Y", "pro forma EPS of this deal", "what synergies does this deal need to break even", "sensitivity analysis on growth rate and WACC", "tornado chart of value drivers", "breakeven WACC / growth for this valuation", "best/base/worst case scenarios for Z", "probability-weighted scenario analysis".
|
| requires | ["analyst-kit-core"] |
Preamble (run first)
PLAN MODE EXCEPTION — ALWAYS RUN: this block only reads state and writes to ~/.analyst-kit/.
_AK="$(cat ~/.analyst-kit/core-path 2>/dev/null)"
if [ ! -x "$_AK/bin/analyst-kit-preamble" ]; then
for d in ~/.claude/skills/analyst-kit-core .claude/skills/analyst-kit-core ~/.codex/skills/analyst-kit-core .codex/skills/analyst-kit-core; do
[ -x "$d/bin/analyst-kit-preamble" ] && _AK="$d" && break
done
[ -x "$_AK/bin/analyst-kit-preamble" ] || _AK="$(find ~/.claude/plugins -maxdepth 6 -type d -name analyst-kit-core 2>/dev/null | head -1)"
[ -n "$_AK" ] && { mkdir -p ~/.analyst-kit; printf '%s' "$_AK" > ~/.analyst-kit/core-path; } || true
fi
[ -x "$_AK/bin/analyst-kit-preamble" ] && "$_AK/bin/analyst-kit-preamble" --skill creating-financial-models 2>/dev/null || echo "AK_CORE: not found (continue without runtime)"
Read the echoed state and act. Skip ALL bullets below if DEDUP: yes or AK_CORE: not found:
DISABLED: yes → this skill is turned off because a required API key isn't
configured. Do not run it. Tell the user it's off, name the missing key (see
MISSING_KEYS), and offer to enable it — either they give you the key now (store it
with "$_AK/bin/analyst-kit-setup" set-key <KEY> <value>, which re-enables the skill) or they
say "set up analyst-kit" for full setup. Then stop; do not attempt the skill's work.
- First run —
ONBOARDED: no → orient the user once, then run
"$_AK/bin/analyst-kit-setup" finish (this covers the telemetry notice, so skip the
TEL_PROMPTED bullet this turn):
- Data home — tell the user Analyst Kit keeps config, API keys, local usage analytics, and
a learnings log together in one folder (default
~/.analyst-kit); offer to move it with
"$_AK/bin/analyst-kit-setup" home <dir>.
- Telemetry (a notice, not a question) — usage telemetry is on by default: only
skill name, duration, outcome, and version, tagged with a per-machine device id
derived from the hardware/OS, never repo names, paths, tickers, or content; opt
out anytime by asking to turn Analyst Kit telemetry off.
- Identity (name + email — required) — ask for the user's name and email, stating
plainly the email is mandatory to use most features (SEC EDGAR's fair-access policy
requires a real, reachable contact on every request). If they decline because they
don't want the email-dependent skills, discover a fallback yourself (
git config user.email, gh api user, …) and pass it with --fallback in step 5.
- Offer full setup — ask if they'd like to configure API keys for all skills now.
If yes, Read
"$_AK/references/intro.md" and follow it. If no, continue — you'll
ask for a key only when a skill needs one.
- Run
"$_AK/bin/analyst-kit-setup" finish --name "<name>" --email "<email>" (add
--fallback for a discovered email; run plain finish only if no email could be
found at all). If it echoes INVALID_EMAIL, re-ask and run it again.
- User asks to set up Analyst Kit at any time (e.g. "set up analyst-kit", "help me set up Analyst Kit", "configure all skills") → Read
"$_AK/references/intro.md" and follow it end
to end: data home, telemetry, every skill's keys, and enabling/disabling each.
TEL_PROMPTED: no (returning user) → give the telemetry notice once, then run
"$_AK/bin/analyst-kit-setup" ack-telemetry.
- If the user asks to turn telemetry off (now or anytime): before flipping it, make a
sincere case once — telemetry is what tells the maintainers which skills break, which
run slow, and where users get stuck, so keeping it on directly improves their
experience; it never includes their data. Offer
"$_AK/bin/analyst-kit-config" set telemetry anonymous (drops the device id) as a middle
ground. If they still want out, run "$_AK/bin/analyst-kit-config" set telemetry off
immediately and without further argument.
- Before running any script that needs an API key: source both the data home's
.env
and the current directory's .env into the shell so scripts can read stored keys:
set -a; [ -f "$AK_HOME/.env" ] && . "$AK_HOME/.env"; [ -f "./.env" ] && . "./.env"; set +a
(where $AK_HOME is the path printed on the AK_HOME: line above). Full lookup order —
always check these before concluding a key is missing or asking the user:
- current shell environment
$AK_HOME/.env (keys stored by analyst-kit-setup)
.env in the current working directory
Never ask the user for a key that is already present in any of these locations.
MISSING_KEYS not none → for each listed key with KEY_PROMPTED_<KEY>: no: explain
where to get it, ask for the value, and run "$_AK/bin/analyst-kit-setup" set-key <KEY> <value>.
If declined, run "$_AK/bin/analyst-kit-setup" skip-key <KEY> (this disables the skills that
need it) and continue — never block the skill.
UPGRADE: UPGRADE_AVAILABLE <old> <new> → say "Analyst Kit skills is available
(you have ) — update?". If yes: Read "$_AK/references/upgrade.md" and
follow it. If declined: run "$_AK/bin/analyst-kit-update-check" --snooze <new>.
LEARNINGS entries shown → these are past mistakes/preferences for this user;
respect them and do not repeat logged pitfalls.
Then proceed with the skill. At the very end, run the Completion block at the bottom
of this file.
Financial Modeling Suite
A financial modeling toolkit for investment analysis, valuation, and risk
assessment using industry-standard methodologies. Four capabilities are
implemented by the bundled scripts (DCF, M&A accretion/dilution, sensitivity,
scenario planning); anything beyond them (charts, Excel workbooks, Monte Carlo,
LBO) is something you assemble separately with other tools — never present it
as this skill's script output.
Core Capabilities
1. Discounted Cash Flow (DCF) Analysis — scripts/dcf_model.py
- Project free cash flows from revenue growth, EBITDA margin, capex, and NWC assumptions
- Calculate terminal values using perpetuity growth or exit multiple methods
- Determine weighted average cost of capital (WACC) via CAPM
- Generate enterprise value, equity value, and value per share
- Two-way sensitivity grid over WACC / terminal growth / margin
2. M&A Merger Model (Accretion/Dilution) — scripts/merger_model.py
- Pre-deal metrics for acquirer and target (market cap, EPS, P/E)
- Deal structure: equity purchase price, premium to market, stock-vs-cash
consideration split, new acquirer shares issued, pro forma share count
- Pro forma EPS and accretion/(dilution) to the acquirer's standalone EPS,
including after-tax synergies and the after-tax financing drag (interest on
new debt + foregone interest on balance-sheet cash used)
- Purchase-price-allocation (PPA) intangible amortization — the recurring,
often deal-flipping GAAP expense that paper models omit; supports both
tax-deductible (asset deal) and non-deductible (stock deal) treatment
- Breakeven synergies: the pre-tax annual synergy level that makes the deal
EPS-neutral (negative if the deal is accretive even with zero synergies)
- Composes with the sensitivity engine below (sweep synergies, premium, or
consideration mix; read accretion/dilution as the output)
3. Sensitivity Analysis — scripts/sensitivity_analysis.py
- One-way sensitivity: test a variable across a ± range, tabulate output impact
- Two-way data tables (Excel-style) for any pair of variables
- Tornado analysis ranking variables by impact magnitude
- Breakeven search: find the variable value that hits a target output
(direction-aware — works for inverse relationships like WACC → value)
4. Scenario Planning — scripts/sensitivity_analysis.py
- Build best/base/worst (or any named) scenarios as variable combinations
- Probability-weight scenarios and compute the expected value
- Pass
base_values so each scenario starts from the base case and the model
is restored afterwards
Input Requirements
For DCF Analysis
- Historical financial statements (3-5 years), if available
- Revenue growth assumptions per projection year
- EBITDA margin projections
- Capital expenditure and net working capital as % of revenue
- Terminal growth rate or exit multiple
- Discount rate components (risk-free rate, beta, market premium, cost of debt, D/E)
For the M&A Merger Model
- Acquirer and target financials: share price, shares outstanding, net income
- Offer price per target share and the stock/cash consideration split
- Tax rate and annual run-rate pre-tax synergies
- Financing: what fraction of the cash is debt-funded, the cost of that debt,
and the yield given up on balance-sheet cash used
- Optional purchase-price-allocation inputs: identifiable intangibles created,
their amortization life, and whether amortization is tax-deductible
For Sensitivity Analysis
- Base case model (any object with an output function)
- Variable ranges to test and update functions for each variable
For Scenario Planning
- Scenario definitions (variable values per scenario)
- Probability weights for scenarios (optional; defaults to equal weights)
- Base values for clean resets between scenarios (recommended)
Output
All outputs are Python objects: the DCF model returns dictionaries and a
formatted text summary (generate_summary()); the sensitivity tools return
pandas DataFrames. To deliver charts, Excel files, or formatted reports,
combine these outputs with other skills/tools (e.g. charting or reporting) —
the scripts themselves do not produce them.
Example Usage
"Build a DCF model for this technology company using the attached financials"
"Is this acquisition accretive or dilutive — Acme buying Beta at a 25% premium, 70/30 stock/cash?"
"What pre-tax synergies does this deal need to break even on EPS?"
"Create sensitivity analysis showing impact of growth rate and WACC on valuation"
"What terminal growth rate is needed to justify the current share price?"
"Develop three scenarios for this expansion project with probability weights"
Scripts Included
scripts/dcf_model.py: Complete DCF valuation engine (DCFModel class)
scripts/merger_model.py: M&A accretion/dilution engine (MergerModel
class) — pure standard library, no third-party dependencies
scripts/sensitivity_analysis.py: Sensitivity testing framework
(SensitivityAnalyzer class)
dcf_model.py requires numpy; sensitivity_analysis.py also requires
pandas (pip install numpy pandas or run with uv run --with numpy,pandas). merger_model.py needs neither. Import the classes into a
small driver script, or run them directly to see the built-in examples.
Behavior is pinned by tests/ (python3 -m pytest tests/ from the skill
root) — including a cross-check of the merger model against a known-good,
hand-verified deal scenario.
Modeling Guidance
- Use multiple valuation methods for triangulation (run both terminal value
methods and compare; validate against trading multiples)
- Document key assumptions clearly and separate inputs from calculations
- Stress test extreme cases and report ranges, not point estimates
- The perpetuity growth method requires terminal growth < WACC; the model
raises an error otherwise rather than returning a negative terminal value
Limitations and Disclaimers
- D&A is approximated as equal to capex in the FCF projection, so FCF
effectively equals NOPAT minus the change in NWC. For capital-intensive or
high-growth companies where growth capex substantially exceeds D&A, FCF —
and therefore the valuation — will be overstated. Adjust assumptions or
post-process the projections when this matters.
- The merger model is a run-rate, first-year accretion/dilution model: it
excludes one-time transaction costs, models synergies and PPA amortization at
steady-state annual levels, and uses the standard simplification that stock
is issued at the acquirer's current price (no exchange-ratio collar). It does
not perform a full purchase-price allocation — you supply the amortizable
intangibles directly.
- No Monte Carlo simulation and no LBO model are included; if either is needed,
say so explicitly and build it separately rather than implying this skill
produced it.
- Models are only as good as their assumptions; past performance doesn't
guarantee future results
- Professional judgment required for interpretation; not a substitute for
professional financial advice
Completion (run last)
Audit before you deliver. If this run produced a research deliverable carrying
quantitative or factual claims — a deep dive, thematic/value-chain map, technical
call, company wiki, or financial model — you MUST verify it before presenting it.
If a research-auditor subagent is available (the analyst-kit plugin ships one),
invoke it via the Task tool, handing it the draft and the data artifacts you used;
on a runtime without subagents, run the same checks yourself. Resolve every
CRITICAL finding and disclose any UNVERIFIED ones; never deliver on a FAIL
verdict without fixing it first. Skip this only for pure data-fetch/utility runs
with no analytical claims.
PLAN MODE EXCEPTION — ALWAYS RUN: writes only to ~/.analyst-kit/. Replace OUTCOME with one
of DONE | DONE_WITH_CONCERNS | ERROR | ABORT | NEEDS_CONTEXT.
_AK="$(cat ~/.analyst-kit/core-path 2>/dev/null)"
[ -x "$_AK/bin/analyst-kit-log" ] && "$_AK/bin/analyst-kit-log" end --skill creating-financial-models --outcome OUTCOME 2>/dev/null || true
If this session surfaced a durable pattern, pitfall, or user preference that would save
5+ minutes next time (not obvious, not a transient error), also log it:
"$_AK/bin/analyst-kit-learn" add '{"skill":"creating-financial-models","type":"pitfall|pattern|preference","ticker":"<optional>","insight":"<one line>","confidence":7,"ts":"<iso8601 utc>"}'