reprice_with
Apply request-field edits or basis-point bumps to user-supplied market data, then price again to compare base and changed results and test hypotheses.
Instructions
Test a hypothesis: change one or more request fields and reprice.
Args:
result_or_request: a previous pricing tool result (its endpoint and echoed
request are used; its response is the base unless
reprice_base), or an explicit {"endpoint": "/price-swaption", "body": {...}}.
market_data_source: where the market numbers in the request come from. A previous
tool result carries its own declaration and it is reused (the argument may be
omitted or must agree); for an explicit {endpoint, body} or a result without
one it is required: user_pasted (the user pasted or typed the numbers in
this conversation), user_file (the user attached a file/screenshot the
numbers were read from), engine_example (an engine example's pricing block,
only when the user explicitly asked to run an example), session (a market
previously stored in this session, which itself came from one of the above).
There is no value for estimated, recalled or placeholder data. If you would have
to invent numbers, do not call this tool: ask the user for the data.
changes: [{path, value}] or [{path, bump_bp}]; path is dotted /
indexed into the request body (swaptions[0].swaption.settlement_method,
pricing.rates.curves[0].points[2].point.rate, pricing.as_of_date,
pricing.rates.curves[0].interpolator). bump_bp adds
bump_bp / 10000 to a numeric field.
reprice_base: also reprice the unchanged request now (default: reuse the
given result's response).
validate: check the changed body against the vendored schema before sending.
Returns changes_applied (before / after per change), request_diff (every
leaf that differs between the two requests), base and changed (complete
uniform results, each replayable from its request) and differences: the
numeric top-level fields of the first priced item with difference = changed - base. Nothing else is computed. The engine's error, if any, is verbatim.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| changes | Yes | ||
| validate | No | ||
| request_id | No | ||
| reprice_base | No | ||
| result_or_request | Yes | ||
| market_data_source | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||