sirnfs/OptionSuite

error in put vertical buying power calculation

Closed this issue · 5 comments

I believe the buying power (margin) requirement for a short vertical in putVertical.py, shown as:
buyingPower = ((self.__putToSell.strikePrice - self.__putToBuy.strikePrice) - ( currentPutToSellPrice - currentPutToBuyPrice)) * self.__numContracts * 100

is not correct. It should be just the width of the spread * 100 * number of contracts as that is the max value it could achieve if the short spread is fully in the money. So:
buyingPower = (self.__putToSell.strikePrice - self.__putToBuy.strikePrice) * self.__numContracts * 100

UPDATE: OK I guess they allow the credit received to count against the margin requirement. That could be specific to Tastytrade. Then it's correct.
https://support.tastytrade.com/support/s/solutions/articles/43000435260

Yes it is correct as mentioned in my update. But when you do iron condors (vertical put & call spread) then it's not so simple as now the margin requirement of a put vertical depends on matching call verticals in the portfolio.
Have you done code for an iron condor (i.e. matching put + call short verticals) strategy?

Going to go ahead and close this issue. Thanks for reviewing the code.