-
Notifications
You must be signed in to change notification settings - Fork 11
Description
When an option is assigned or exercised and results in a stock trade, the IBKR report adjusts the T. Price and Basis on the ClosedLot row for the stock trade so that it includes the premium paid or received from the related option. In this situation, the options Realized P/L is is set to 0.
However, this script is outputting a P/L for both, which is probably incorrect. The script should do one of either:
- Continue to emit rows for both the option and the stock, but do not use the ClosedLot basis for the stock. It would have to use the option strike price instead. The net would then work out to the correct figure.
- Use the ClosedLot basis for the stock and not emit a row for the related options position. The net would then also work out to the correct figure.
Option (2) is easier to reconcile with tax forms if you are issued any from IBKR because the tax forms themselves do not include gain or loss from options positions which resulted in exercise or assignment, instead adjusting the basis of the resulting stock transaction. That's why the IBKR report works this way too. This is also the way the Finnish tax instructions say to do it as far as I can tell.