I need algorithm for quantifying max Risk for complex multilegged option position

Discussion in 'Options' started by stepandfetchit, Oct 5, 2016.

  1. 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.
     
  2. Zzzz1

    Zzzz1

    you are making your life incredibly hard. Simply derive the portfolio greeks for all your options in aggregate. Also include higher order greeks. That is what most traders use to assess risk. You can then further make it more understandable to risk managers and product control by shifting some of the underlying variables up and down, the effect of the shifts on, let's say, the price of the options and hence pnl, can be easily gleaned from the greeks you computed earlier. You have to be careful, though, as options are non linear products, for instance, a day less till expiration also changes delta and a number other greeks, so, especially when computing the effect of some of the underlying variables on pnl you need to take multiple changes into account. Things get more complicated when you deal with exotics.

    By how much you sensibly shift the underlying variables is left to your logic or the one dictated by risk management/product control/compliance.

     
    FreakofNature likes this.
  3. Amend question to be "I need algorithm for quantifying max Risk for DEFINED RISK complex multilegged option position"

    Note: Infinite is considered undefined! Think of trades possible in an IRA account.

    No Greeks involved in question or answer.
    Ie, for a simple vertical, the RISK is the spread * the position size (offset by any credit received).
     
    Last edited: Oct 6, 2016
  4. Robert Morse

    Robert Morse Sponsor

    You basically need a Reg-T margin calculator .That would cover it.

    Bob
     
  5. Thnx Bob. Got one in your pocket? -- I need the equations.
     
  6. Zzzz1

    Zzzz1

    a margin calculator to assess options risk? Confused...


     
  7. Robert Morse

    Robert Morse Sponsor

    What you need is called a reg-t option optimizer. The optimizer takes your random positions and pairs them off in spreads, to minimum margin. You can try calling the CBOE and ask them where you can get one. They might be able to help. You can also try these guys. I found them from a search, but I know nothing about them.
    http://option-margin-optimizer.software.informer.com/
     
    stepandfetchit likes this.
  8. Robert Morse

    Robert Morse Sponsor

    Reg-T margin is basically using max risk, unless you are naked short calls. This is what he said he is looking for.
     
  9. Bob:
    Thnx again. You seem to read and comprehend my questions. I really appreciate your contributions here.
     
  10. Zzzz1

    Zzzz1

    Could you please explain where margins come into place when someone buys an options contract? And what about selling OTC options? OP states "complex multi-legged" options position. I am confused where your reg-t margin tangents this area at all other than when selling exchange traded options. And even then the margin is by no means the max risk exposure.


     
    Last edited: Oct 6, 2016
    #10     Oct 6, 2016