Uncertainty & Sensitivity
valuation_simulationUncertainty analysis: Monte Carlo valuation, Monte Carlo sensitivity ranking, decision-tree expected values, and one-at-a-time sensitivity analysis. Method selects the formula. Use to quantify and stress the uncertainty around a point valuation; monte_carlo simulates all listed inputs, monte_carlo_sensitivity ranks the drivers. For a single deterministic point value use the relevant valuation tool; sensitivity_analysis varies one parameter of a core function only. Per method: monte_carlo needs input_distributions + valuation_fn (optional: iterations, seed); monte_carlo_sensitivity needs base_params + distributions + valuation_fn (optional: iterations, seed); decision_tree needs tree; sensitivity_analysis needs function_name + parameter_name + parameter_range + fixed_parameters; monte_carlo_correlated needs valuation_fn + correlated_distributions + correlation_matrix (optional: iterations, seed); tornado needs function_name + base_params + parameter_ranges; scenario needs scenarios. monte_carlo_sensitivity requires iterations between 1000 and 100000. Only method is required; all other parameters are method-dependent — supply those the selected method names and omit the rest (defaults apply where defined). Rates and premiums are decimals (0.10 = 10%). Pure arithmetic: no I/O and no external calls; values carry the library's own precision (rates are decimals, so a royalty rate of 0.055 is not rounded); parameters belonging to other methods are accepted and ignored. An unknown method, or a missing method-required parameter, returns an error instead of a value.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"method": "<method>"
},
"name": "valuation_simulation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | Random seed (integer ≥ 0) for reproducible simulations. | |
| tree | No | Decision tree {"nodes": [...], "edges": [...]}; node types decision, chance, terminal. | |
| method | Yes | Formula to apply. Options: monte_carlo = Simulate every input in input_distributions through the named valuation function.; monte_carlo_sensitivity = Rank parameters by their impact on the valuation.; decision_tree = Backward induction over a decision tree.; sensitivity_analysis = One-at-a-time sensitivity of a core function.; monte_carlo_correlated = Monte Carlo with correlated input variables.; tornado = Tornado data for multi-parameter sensitivity analysis.; scenario = Probability-weighted expected value across scenarios. | |
| scenarios | No | Scenario objects. contingent_consideration takes {probability, payment, period?} with probabilities summing to 1.0; scenario_analysis takes {name, probability, params, function_name}. | |
| iterations | No | Simulation iterations; monte_carlo_sensitivity requires 1000-100000. | |
| base_params | No | Base values for all parameters, including those held fixed. | |
| valuation_fn | No | Name of the valuation function the simulation calls: present_value, future_value, annuity_pv, perpetuity_pv, growing_annuity_pv, terminal_value, build_up_discount_rate, capm_discount_rate or wacc. monte_carlo and monte_carlo_correlated sample every parameter of it, so all of its parameters must appear in their distributions; monte_carlo_sensitivity varies only the parameters named in its own distributions and keeps the rest at base_params. Required on all three: the surface has no default valuation, because summing the parameters is not a valuation and gives a sensitivity ranking with no meaning. | |
| distributions | No | Map of parameter name to {distribution, params} for the simulated inputs. | |
| function_name | No | Core function to vary, e.g. "present_value", "capm_discount_rate", "wacc". | |
| parameter_name | No | Name of the parameter to vary. | |
| parameter_range | No | Values to test for the varied parameter. | |
| fixed_parameters | No | Values for all other parameters, held constant. | |
| parameter_ranges | No | JSON object mapping each parameter name to the list of values to test. | |
| correlation_matrix | No | Correlation matrix as a JSON 2-D array of numbers, one row per variable, in the order of correlated_distributions. | |
| input_distributions | No | Inputs to simulate, each {name, distribution, params}; distribution is normal (mean, std), uniform (low, high) or triangular (low, high, mode). | |
| correlated_distributions | No | One object per sampled variable: `name`, `distribution` (normal, uniform or triangular) and `params`. Every parameter of the named `valuation_fn` must appear here, because the sampler supplies all of them. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Error message when the call fails. | |
| steps | No | Intermediate calculation steps for traceability (one string per step). | |
| value | Yes | Computed valuation, rate, or metric. | |
| method | No | Formula / method name that produced the result. | |
| assumptions | No | Modelling assumptions applied (list of strings or key/value object). | |
| defaults_applied | No | Optional parameters that were not supplied, so their documented defaults were used. | |
| formula_reference | No | Mathematical formula or reference applied. |