open a short put vertical and long put vertical with different quantity as combo on the same day

40 views
Skip to first unread message

Matthias Kurz

unread,
Aug 27, 2022, 10:23:20 AM8/27/22
to OptionStack
Hello, 

I try to combine a short Put Vertical quantity 10 with a long Put Vertical quatity 4 per roll, but the roll always happens on another day. Is  it possible to open the combo on the same day?


stt.PNG

OptionStack

unread,
Aug 27, 2022, 10:30:38 AM8/27/22
to OptionStack
If you want to create non-standard / custom option spreads, you can create custom option spreads with different numbers of legs / ratio's / etc.. using the CustomSpread object.

Here is some more information on creating your own custom option spreads:


The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory or other services by OptionStack. In addition, the content of the website offers no opinion with respect to the suitability of any security or any specific investment.  There are no guarantees as to accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. Past performance is no indication or guarantee of future results. All investments involve risk – including loss of principal. You should consult with an investment professional before making any investment decisions.

Matthias Kurz

unread,
Aug 29, 2022, 2:03:03 PM8/29/22
to OptionStack
Ok, thank you! I was able to code a running example, but in most of the times when I click on run backtest the test stops somewhere and doesn't go any further. And the testruns are slow. Sometimes when I change something like 
customSpread.setMaxOpenPositions(n=3);
the test runs until the end, most times not.

OptionStack

unread,
Aug 29, 2022, 2:15:26 PM8/29/22
to OptionStack
Your custom "Space Ship Trade" strategy has a compilation error in the code.

SpaceShipTrade.png

The daysToExpiration method takes 2 arguments, instead of one argument.  You can change line #30 to:

customSpread.selectLegBy(legID="BuyPVShortLeg").daysToExpiration(40, 80);

Your code appears to run fine after fixing this line of code.  

shapeShipTrade.png

By the way, your "SpaceShipTrade" looks similar to a Short Unbalanced Iron Condor.  

UnbalancedIronCondor.png


The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory or other services by OptionStack. In addition, the content of the website offers no opinion with respect to the suitability of any security or any specific investment.  There are no guarantees as to accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. Past performance is no indication or guarantee of future results. All investments involve risk – including loss of principal. You should consult with an investment professional before making any investment decisions.

Reply all
Reply to author
Forward
0 new messages