Automated trading with stocks and 2 options

Discussion in 'Automated Trading' started by tommaso, Jul 27, 2009.

  1. heech

    heech

    If you have a robot that could actually figure out that "there is a price reversal" before it happens, you would already be very rich... you don't need to do ANYTHING except trade the price reversal.

    But unfortunately, such robots do not, can not exist. Maybe Goldman Sachs has spent a few billion dollars developing a high-frequency version that can take advantage of a price reversal that lasts a few seconds long.
     
    #31     Jul 28, 2009
  2. tommaso

    tommaso

    It does not need to "figure out" anything.

    Imagine the "long" side. Since it is averaging down (protected by the options) to the max number of shares, whenever there is a price reversal which causes to exceed a small profit (eg. 20 $), it closes. This way you have covered the expenses (related to shares) to go down to that price level.

    (This is possible because the size of the last orders is *much larger * compared to the size of the previous orders. This is the crucial point.)

    Do not know if it's clear what I mean.
     
    #32     Jul 28, 2009
  3. heech

    heech

    No offense, but it's clear to me you haven't gone very far with this strategy. I doubt you've actually paper-traded it, to this point. It simply will not work the way *you* think it does.

    Paper-trade it, and you'll see the dilemma. If your robot buys the underlying before break-even point (on the option premium), you might lose money if the price keeps going. If your robot is waiting for the break-even point, you might miss out on oscillations *and* still lose money on the option premium.
     
    #33     Jul 28, 2009
  4. tommaso

    tommaso


    Good PocketChange!

    I confess I am not able to check your proposal because I am not familiar with that kind instruments.

    I just "suspect" that using stocks there is more flexibility in creating the optimal order size and the step "Delta".
    But I may be wrong.

    As I said in the first post, I am coding right know a small "calculator" which would compute what I have been calling the "worst scenario profit, conditional on exercise" (hope this name makes sense).

    This profit does not include what the bot gains from oscillation, and the possibility of "slippage" which increases the distance from the strike.

    Actually I posted a screenshot of the calculator to make more understandable the general algorithm.
    The funny thing is that as soon as I saw it posted I spotted a bug and deleted, in big shame and embarrassment, the post!

    Now I will retry, but keep in mind I am coding it right now in VS. It's not debugged and may contain all sort of the most stupid and embarrassing errors. If you see errors please tell me so that I can correct it.


    => One thing. Before bothering Raymund, is anybody able to drop a code snippet for option exercise (IB API) ? I would like to prepare to make some tests to see what are the practical problems and dilemma as heech rightly suggests ...


    T
     
    #34     Jul 28, 2009
  5. I think your attachment is 1/2 the picture. What is the disposition of the counter trading bot?
     
    #35     Jul 28, 2009
  6. heech

    heech

    Your chart shows a final stock price of $28.03.

    If TWM moves 20% in the next 3 weeks, then absolutely, your long volatility position will be profitable.
     
    #36     Jul 28, 2009
  7. tommaso

    tommaso

    Here is what it spits out.
     
    #37     Jul 28, 2009
  8. tommaso

    tommaso

    HI Maverickz,

    I think i missed to reply to your interesting observations.

    If the price would oscillate in a narrow range it's a good thing for the bot which be realizing profits. Unfortunately what happens is just the opposite; especially twm specifically does not seem that calm. This is an ultrashort and it's not easy to keep it flat..

    It would be interesting to think also what are the most suitable candidates for this game. I have a good feeling about twm, but there may be pitfalls and better candidates. Any suggestion?

    I think we want something very liquid and volatile. Right?

    About the gamma scalping, I confess still have problem to understand the relevancy of the arguments. Probably I need to think more on that. I though that considering the intrinsic value only and subtracting the entire cost of the premium, in the "worst scenario", would exempt me from further considerations.
    I need some more explanations on this point to understand. (But perhaps will be more clear when testing.)

    About the exit strategy, I am not sure what you mean. I think we said we exercise one set of options and may even let in place the other one which is worthless (just in case!) Do you have something in mind?
     
    #38     Jul 28, 2009
  9. I think the exit issue is you are locked in the game until you have scaled up to 10000 shares either long or short before your options expire. Based on your trade plan approx 20 % movement up or down.

    If the market oscilates between say 32 and 38 you never scale up nor do you capture enough oscilation profits to cover the decay on your 40K of options.

    You are churning less than 5% of your net options position in shares capturing 10.0 in profits to offset decay.

    Do you let it ride a set amount of time, oscillation cycles, loss in options value before you just close out and exit.
     
    #39     Jul 28, 2009
  10. tommaso

    tommaso


    Hmm, perhaps making it more narrow may help (?) Here is another plan attempt.

    Yes, perhaps its a good idea to close it early in case it's passing too much time.

    Anyway sec like twm are quite wild and I think that most of the time we should pull it out... after all we cannot win each and every time (or someone would be soon chasing us! :))
     
    • put.gif
      File size:
      30.4 KB
      Views:
      83
    #40     Jul 28, 2009