calculate_lot_gain
Calculate actual or hypothetical capital gains for an investment lot, using current state or custom share and sale price inputs.
Instructions
Calculate potential or actual capital gain for a lot.
If shares and sale_price provided, calculates hypothetical gain. Otherwise uses lot's current state and latest price.
Args: lot_guid: Lot GUID (or 8+ char prefix). shares: Optional number of shares to calculate for. Defaults to all remaining shares. sale_price: Optional sale price per share. Defaults to latest price for the commodity.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| shares | No | ||
| lot_guid | Yes | Lot GUID (32-char hex or 8+ char prefix) | |
| sale_price | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |