ROI
roiReturn on investment: total percent gain, plus the annualized rate when a holding period in years is given.
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": {
"initial": "<initial>",
"finalValue": "<finalValue>"
},
"name": "roi"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| years | No | Optional. Holding period in years, for the annualized rate. | |
| initial | Yes | Amount invested. | |
| finalValue | Yes | Ending value. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| roiPct | No | Total return, percent. | |
| annualizedPct | No | Annualized return, percent (null if no years). |