monte-carlo-valuation
БесплатноЗапускает вложенные скриптыНе проверенTurns a point-estimate valuation into a distribution — samples the drivers you are least sure about from normal, lognormal, triangular, uniform or…
от lyndonkl★ 208 звёзд на GitHubОб этом скилле
Monte Carlo valuation
A point estimate hides how much you do not know. This skill takes a finished DCF, replaces two or three of its drivers with probability distributions, and runs the same model thousands of times. What comes back is a distribution of value.
That distribution answers questions a single number cannot. How wide is the plausible range? Where does today's price sit inside it? How often does this company end up worth nothing?
The model is not reimplemented here. Every trial calls the engine in
dcf-valuation-engine, so the simulation and the base case are the same code with
different inputs.
The script
resources/simulate.py — pure standard library, no installation needed. JSON on stdin
(or --in FILE), JSON out.
python3 resources/simulate.py simulate --example # show the input shape
python3 resources/simulate.py simulate --in run.json
python3 resources/simulate.py selftest # verify the engine
| Subcommand | Turns this | Into this |
|---|---|---|
simulate |
a base-case DCF payload plus driver distributions | the full value distribution, percentiles, price odds, refusal counts |
sample |
one or more distributions on their own | the moments and percentiles of the draws, and their realized correlations |
scenarios |
named stories with probabilities | value per story and the probability-weighted expected value |
percentiles |
a list of values, or a published percentile table | percentiles, moments, and where a price sits inside them |
A seed is a required input, not an option. A valuation you cannot re-run to the same number cannot be audited. Record the seed next to the result, and the whole run is reproducible by anyone who has the payload.
When a simulation is the right tool
Simulation answers "how much", not "which story". Match the tool to the doubt:
| The doubt | The tool |
|---|---|
| A narrative shift — the same business, better or worse: market size, share, margin | simulate with distributions |
| A narrative break — a binary event ends the story you modelled | a probability and a consequence, not a distribution. Use failure in the DCF engine, or scenarios |
| A narrative expansion — a new market that may not exist yet | a real option on top of the DCF. Use option-valuation-toolkit |
| Genuine doubt about which of a few named stories is true | scenarios |
A binary risk does not belong in a continuous distribution. Widening a growth rate cannot represent a company that either gets a licence or does not.
The workflow
Simulation progress:
- [ ] 1. Finish the base-case DCF and make it defensible on its own
- [ ] 2. Pick the two to four drivers that both matter and are genuinely uncertain
- [ ] 3. Choose a shape for each, and write down why
- [ ] 4. Set the correlations, getting the signs right
- [ ] 5. Run enough trials, with a recorded seed
- [ ] 6. Read the percentiles, the refusal share and the price position
1. Start from a finished valuation
The simulation varies the inputs of an existing model. It does not replace the model, and it does not rescue one you do not believe. If the base case is wrong about how the business works, every trial is wrong in the same way.
Run the base case through dcf-valuation-engine first and check it with
valuation-consistency-checks. The script refuses to simulate a base case the engine
itself rejects.
2. Pick the drivers
Two to four. The candidates are almost always revenue growth, the target operating margin, the sales-to-capital ratio, and the cost of capital. For a commodity firm the list starts with the commodity price.
Distributing everything is the standard mistake. It manufactures a wide range that carries
no information, because most inputs barely move value. Run a sensitivity grid first
(dcf-valuation-engine sensitivity) and distribute only the drivers that show up in it.
The opposite mistake is worse: distributing three minor inputs while holding the real driver fixed. The output then looks precise and is not.
3. Choose a shape
Each driver points at a leaf of the base-case payload with a dotted path, exactly as the sensitivity grid does.
{"name": "target margin", "path": "operating_margin.end",
"distribution": {"type": "triangular", "min": 0.08, "likeliest": 0.14, "max": 0.20}}
| Shape | Use it when | Parameters |
|---|---|---|
uniform |
you know the range and have no view inside it | min, max |
triangular |
you can state a worst, a likeliest and a best case | min, likeliest, max |
normal |
you have a central estimate and a symmetric error around it | mean, sd |
lognormal |
the variable cannot go below a floor but can run far above it | mean, sd (arithmetic), or median and log_sd; optional shift |
discrete |
the variable takes a few named values | outcomes: a list of value and probability |
Triangular is the workhorse, because a minimum, a likeliest and a maximum
Установить monte-carlo-valuation в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл monte-carlo-valuation?
Turns a point-estimate valuation into a distribution — samples the drivers you are least sure about from normal, lognormal, triangular, uniform or discrete-scenario distributions, re-runs the DCF engine on every draw, and reports percentiles, mean, standard deviation, the probability the value exceeds the market price, and the share of draws the engine refused as infeasible. Correlates drivers through a shared common factor. Use when running a Monte Carlo simulation or a probabilistic valuation, putting a range or confidence band around a value per share, asking how likely it is that a stock is under- or overvalued, valuing a commodity or cyclical company where one macro variable such as the oil price dominates, or turning a scenario grid into a probability-weighted expected value.
Как установить скилл monte-carlo-valuation?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл monte-carlo-valuation запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic