Using solver to determine options to buy/sell

Discussion in 'Options' started by Baozi, Mar 2, 2019.

  1. Baozi


    Hello everybody..

    I'm a new options trader.. I have been lurking around these forums for a while, however I never posted anything before.

    Funny fact, I am trading the chinese options market. I have been living in China for a while and I was wondering if the chances of success in a market that is not as efficient as usa/europe would be greater.

    The trading platform is simply awful, and recently I made a spreadsheet where I download day by day the various parameters of each option available (not so many, considering that here you can only trade the ETF which tracks the 50 big cap companies).

    After that, I setup the solver (I'm currently using a tool a bit more powerful than the default excel one) so that it will select a bunch of options according to my parameters.

    The parameters I set so far are:
    max-min delta/gamma/vega/theta
    max-min price and number of contracts

    I solve trying to maximize a simple "value" function (theoretical price minus current price), while setting boundaries for delta close to zero or slightly positive/negative if I have directional bias, absolute value of gamma as low as possible, vega positive or negative according to High/Low IV rank and theta as high as possible.

    Honestly tho, so far I haven't been able to pull the trigger to actually trade the options that my system spits out. Most of the time they make no sense, like buying at the same time a deep ITM call and a deep ITM put, or selling a bunch of ITM calls that are about to expire... And I end up trading butterflies and spreads like everyone else.

    So my question is.. What kind of new elements can I introduce to get better solutions? Any suggestions? - OR - is this kind of approach simply a waste of time?
    tommcginnis, Nobert and sle like this.
  2. Baozi


    Ah yes, before I forget... I have also another very important question:

    here there is no VIX (there was something similar but was shut down by the government during the 2015 boom/crash), so how can I create a proxy for a volatility index? I have the IV of the single options so I am actually weighting them by their volume to derive a general volatility number, however this method is a bit crude.. any suggestions also here?
    tommcginnis likes this.
  3. add better constraints to your solver to eliminate the deep ITM's You might have an edge BUT the bid/ask spread is going to eat up your edge. Add a open interest constraint for the same reason.
    dealmaker and tommcginnis like this.
  4. Baozi



    wow I'm happy my approach didn't get shot down immediately :)

    I will introduce a liquidity constraint, however this is the part that worries me the least. The bid/ask spread is very tight due to a combination of good volume and extremely limited number of tradable products..
  5. newwurldmn


    I tried the simple solver method as well. I got extreme results like you.

    In the end I figured that strike selection was lot less important than underlying selection and a general structure (do you want to be short upside, downside, or atm)
  6. tommcginnis


    I would graph out as much as you can, aiming towards a 3-dimensional surface of delta versus theta versus vol. If you just circle your constraints on those graphs, you'll notice that their areas are not coincident -- and so you end up with widely separated strikes for targets.

    So: join your constraints into a 3-dimensional surface, and see how your parameters match up against each other. "A waste of time?" Whoa, absolutely NOT. You're going to end up with an understanding of option/risk/market behavior that few can match. Truly truly.
  7. As a "VIX" replacement, you could implement the VIX computation, by implementing the equations, which are well documented in the CBOE VIX white paper. However, a slightly simpler process could be to merely use the ATM_IIV for a forward looking volatility of the underlying at each expiration. (Note: the VIX method is influenced by SKEW, but the ATM_IIV is not, so pick which one addresses your needs)
    tommcginnis likes this.
  8. Baozi


    Forgive my ignorance but.. why theta as the third dimension?
  9. tommcginnis


    I have no idea how you could entertain an option trade -- long or short, ATM-ITM-OTM -- without knowing theta, theta vis-a-vis delta, and theta vis-a-vis vol.
  10. Baozi


    Ok guys, so I am posting this as a conclusion to the solver experiment, and hopefully this will be useful also for other people who would like to follow my steps.

    First of all, my computer skill level is not that great, I'm slightly above average with excel and VBA but nothing more, so more skilled people will probably be able to do better.

    I found out that getting meaningful solutions from the solver is really difficult. You have a choice between linear and non-linear solvers, but non-linear solvers take ages to complete a calculation cycle, and if the results do not make sense you have to start again with different parameters. Could work if I had unlimited time, but I don't. Linear solvers on the other hand are faster, but all constraints must be linear (so you cannot have IF statements and such). There are ways to transform a non-linear constraint into linear, but it takes away a lot of flexibility. And Options do not like linearity.

    Even if this is not a great tool for picking options out of the blue, it is however a good tool for hedging. I made a secondary set of functions so that I can update my position greeks in the system, and it will find the most cost effective combination to bring delta/gamma/vega/theta to zero or to a predetermined level.

    Now I'm still trying to use some sort of automation to pick options, however I am narrowing my approach to specific strategies. I made a macro that calculates the breakeven/max profit/max loss for each butterfly in a given range, including skip strikes and very odd combinations such as 297 or 154. After that I can simply filter the list according to the criteria I want, such as minimum loss, capital requirements etc. No way to use the solver here, there are too many parameters that a human can consider very quickly but that would require months of programming (at my current skill level). Overall this seems the way to go, at least from a single retail point of view.
    #10     Mar 12, 2019