Iron Condor - Risk Management

77 views
Skip to first unread message

Brody

unread,
Jan 17, 2023, 11:51:11 PM1/17/23
to OptionStack
Hi,

Is there a way to backtest where I can control the QTY and Max Risk of a single position? I am trying to setup Iron Condors where the width between the long and short strikes is as far as possible as long as the leg width - credit <= a defined max risk value. I also only want to trade one contract, not multiple contracts. I haven't been able to find a way to do this yet. Thanks for any help!

Best,
-Brody

OptionStack

unread,
Jan 17, 2023, 11:58:48 PM1/17/23
to OptionStack
You can create a custom position sizing method that can account for multiple factors (risk, quantity, credit, etc) when sizing a trade.

1) Create a custom position sizing function.  This function should return the number of contracts to trade, based on various trade attributes such as max risk, max quantity, etc.

// create your custom position sizing function based on max risk / quantity
 def mySizingFunction (trade:LegCriteriaT):Double = { }

2) Set the custom position sizing function when constructing your trade:

// set the custom sizing function
strategy1.sell("PutVertical", "Enter").sizeBy.customSizingFunction(mySizingFunction)


Please see the following for more information:  Custom Position Sizing


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