This question is not for Traders, but for the very limited subset of folks coding Option backtests or complex option positions.
I am looking for an algorithm which works with any arbitrary set of Option strikes, put and/or call mix for the same underlying. Need for single expiration, and prefer it to work with multiple expirations.
I have been dancing around this issue for a bit, but now need to dig in and solve if. If someone has already done it, it can save me a bit of time and work.
My current process, which is not optimal, is to evaluate the PnL of the position thru a very large price range of the underlying, and all the way to expiration, and pick off the minimum PnL over the entire range. This is fine for most cases, as sweeping the underlying price from .2X to 2X, with all options being evaluated will generally encounter the Max Risk point, but is sloppy and cumbersome.
I am looking for an algorithm which works with any arbitrary set of Option strikes, put and/or call mix for the same underlying. Need for single expiration, and prefer it to work with multiple expirations.
I have been dancing around this issue for a bit, but now need to dig in and solve if. If someone has already done it, it can save me a bit of time and work.
My current process, which is not optimal, is to evaluate the PnL of the position thru a very large price range of the underlying, and all the way to expiration, and pick off the minimum PnL over the entire range. This is fine for most cases, as sweeping the underlying price from .2X to 2X, with all options being evaluated will generally encounter the Max Risk point, but is sloppy and cumbersome.