Preview changes to an account
preview_simulationMeasure an account as it is and after changes, without saving anything.
Answers which way the client's position would move, and by how much. The account
is measured twice through the Risk tab's own pane. ``save_simulation`` takes the
same changes and saves them for the dashboard to compare.
One form per call. ``strategy_id`` + ``amount`` buys a strategy. ``changes`` are
several signed changes at once (a switch is a negative amount on an account plus
an equal positive one; an account cannot be reduced below what it holds). A
change with ``asset_id`` is one instrument: "sell 20,000 of Volvo in the ISK and
buy Investor" is ``{id: ISK, asset_id: Volvo, amount: -20000}`` plus
``{asset_id: Investor, amount: 20000}`` with ``account_id: ISK``; for a switch
between instruments that names one account, that account is the default.
``weights`` with ``account_id`` reweights one account at its current value: each
weight is an instrument's share of it, and held instruments left out are sold.
Weights adding up to 1 stay fully invested; less holds the rest as cash; more,
up to 2, borrows the excess as cash. Instrument weights from
``solve_equity_weights`` or ``solve_allocation_weights`` fit as they are.
Otherwise ``account_id`` defaults to everything the client holds, or everything
one client holds with ``person_id``. An empty account is valid for the first two
forms: the before side is empty.
Nothing is written. There is no track record for a simulation and the returns
tab is unavailable for it. The result is a measurement, not a suitability
judgement; the client's own limits are not read.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "preview_simulation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | No | ||
| changes | No | ||
| weights | No | ||
| person_id | No | The id of one person, family or entity this login holds. Omit for everything this login holds. | |
| account_id | No | ||
| strategy_id | No |