Yen Carry Trade Calculator
calculate_yen_carryWhat a carry trade earns or pays in swap over a holding period, its yearly carry yield, how far the price can move against it before the swap is used up, and what a sharp unwind like 2024 would cost. Same calculation as the Yen Carry Trade Calculator page at https://forexdemo.com/yen-carry-trade-calculator.html. Every input is optional unless marked required; left-out inputs use the page's defaults, which are listed in the reply.
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": {
"price": "<price>",
"long": "<long>",
"short": "<short>"
},
"name": "calculate_yen_carry"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| long | Yes | Swap long (for buys), exactly as the platform shows it, in swapUnit. A charge has a minus sign, such as -9.17. | |
| pair | No | Currency pair. The yen pairs are the classic carry trades; the other pairs work too. | USD/JPY |
| rate | No | Only needed when the account currency is not in the pair: the price of the market pair that converts it (for example the GBP/USD price for EUR/GBP in a USD account). Required when the account currency is not in the pair. | |
| side | No | buy (long) or sell (short). | buy |
| size | No | Trade size, counted in sizeUnit. | |
| price | Yes | Pair price now. | |
| short | Yes | Swap short (for sells), exactly as the platform shows it, in swapUnit. | |
| balance | No | Optional account balance. | |
| holding | No | Holding period, in holdingUnit. | |
| openDay | No | Day the trade is opened. | Monday |
| currency | No | The currency the trading account is held in. | USD |
| sizeUnit | No | lots (100,000 units each) or units. | lots |
| swapUnit | No | The unit the platform shows the swap in: points (MetaTrader), pips, percent a year, or money per standard lot per night. | points |
| precision | No | Only for points: fractional when prices have 5 decimals (3 for yen pairs), whole when they have 4 (2 for yen pairs). | fractional |
| tripleDay | No | The night that counts three days of interest. | Wednesday |
| yearBasis | No | Only for percent: the number of days in the broker's interest year. | 365 |
| holdingUnit | No | Unit of the holding period. | months |
| amountCurrency | No | Only for money: the currency the swap amounts are in. | quote |