Hi all, I am about to write a bit of code to close a position on the underlying, in case I write an option and get assigned. Let's say I write an option and at expiration time is ITM, then I get assigned a position on the underlying. Is there any configuration I could change on my account to let IBKR close that position immediately? My initial idea was to write a watcher on the account, and at the expiration time check if there is anything on the underlying and close it. Am I overcomplicating it?
Make sure you know the difference between American & European Options assignments before you model anything. -kPwn
You can use conditional orders on IKBR (trade station) based on the price of the underlying. So set it to close if the price tags the short leg. That won't protect you after close or pre market, and assignment can happen early as well. I would just trade cash settled options like indexes.
That is a good answer sir. I haven't used conditional orders for anything, but they make sense for this. Thank you.
Note for developers: Just in case you are trading through the API once the option position is filled you can run the method exerciseOption. https://interactivebrokers.github.i...Client.html#aad70a7b82ad3b5e7ae3e9f0b98dc2a5b While the name of the method is excerciseOption it has a parameter to set the option to lapse. That will override any default configuration on TWS.
The only solution is to check your portfolio every [time interval] for a position in stock/ future xyz and if position is > x --> create a market order. Other then that you have no trigger you can work with as the event "getting assigned" is not something the API supports, besides a time delayed notification you could read. But due to the delay you would be liquidated before you can react.