Automated trading with stocks and 2 options

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

  1. tommaso

    tommaso

    I first reply to this part that is easier.

    You are right about the reduction of the option cost (although it seems to influence the profit only in a small part).

    Here is the example with these strikes.
    I tried to leave the other things unchanged, for comparison.

    (There are some new things going on in the trade "planner" I will explain in the next post).

    T
     
    #51     Aug 2, 2009
  2. tommaso

    tommaso

    As I have presented this technique here, I think that most of the people
    have been thinking that the main strategy here is about "averaging down"
    with an appropriate choice of order sizes.

    Actually even me was so concerned with the creation of a profitable
    "worst scenario" that I almost forgot what was the original aim and idea.

    Let's roll back for a moment.


    The main strategy here was about robot SCALPING (and not about profiting
    from options).


    The options have been introduced only as a "protective device" in case
    the price oscillates too much, which if one uses ultra(short) ETFs
    happens quite frequently.

    To give you an idea of how wild they can be, I have here a little record of
    some daily ranges (some may be inaccurate, but it gives the idea).

    So the original problem was: given the SCALPING strategy, how can I protect
    myself against too large price variations?

    And not viceversa. Here we are perfecting so much the worst scenario
    that it seems to be the main strategy!!

    In other words the main profit in the original idea should come from scalping
    and the option device is there only as a protection (of course if it turns out
    to be a "profitable" protection, that would be ideal).

    So now back to the original idea, it is necessary to have a tight and fine grid
    where we can buy and sell on small oscillations so that we can profit from each small
    price movement.

    If the scalp grid is too large, we lose the original "Scalping" idea and we get a strategy,
    which could even be applied discretionarily.

    In fact, I guess that any trader could take the plan I have posted here and trade it
    discretionarily.

    But running a robot should be about scalping, with precision and speed and beyond
    the human capabilities.

    So going back to the original idea I have introduced a new constraint. The minimum number
    of steps.
    This way I reduce the profit of the worst scenario, but enable the robot to do it's work.
    And I believe it can really be effective in that kind of scalping.


    So let me enclose a new computation where I fix a minimum number of steps for scalping.

    This way every time the price goes back and a profit is seen the position is not closed completely,
    but only the shares that exceed the number of shares expected for that level.

    This way we should be able to pocket all the small oscillation up and down, several times
    and for each oscillation we get a good profit. There can be hundred of such oscillations
    before option expiration.

    I enclose a picture to explain the scenario (sorry for the size I had to paste it into word
    to fit the long text).

    I do not know if I am making myself clear.





    PS


    TWM daily ranges (some)

    2008-10-28 27.36 22.85%
    2008-10-29 14.60 13.53%
    2008-10-30 9.21 8.78%
    2008-10-31 14.57 15.45%
    2008-11-03 4.24 4.58%
    2008-11-04 5.97 6.57%
    2008-11-05 10.08 10.76%
    2008-11-06 8.48 8.29%
    2008-11-07 7.73 7.42%
    2008-11-10 12.36 12.26%
    2008-11-11 8.53 7.83%
    2008-11-12 12.07 10.21%
    2008-11-13 35.94 33.75%
    2008-11-14 14.76 13.48%
    2008-11-17 9.21 7.76%
    2008-11-18 16.27 13.38%
    2008-11-19 22.17 17.54%
    2008-11-20 24.89 17.32%
    2008-11-21 32.38 21.84%
    2008-11-24 24.22 19.39%
    2008-11-25 10.38 8.44%
    2008-11-26 21.13 19.42%
    2008-11-28 7.35 6.97%
    2008-12-01 21.59 19.28%
    2008-12-02 15.10 13.00%
    2008-12-03 14.96 13.84%
    2008-12-04 15.53 14.71%
    2008-12-05 20.97 19.92%
    2008-12-08 7.35 7.75%
    2008-12-10 7.37 7.78%
    2008-12-11 12.78 13.17%
    2008-12-12 8.92 8.96%
    2008-12-15 11.95 12.23%
    2008-12-16 11.12 12.09%
    2008-12-17 7.30 8.30%
    2008-12-18 6.10 6.77%
    2008-12-19 6.98 8.13%
    2008-12-23 4.73 6.98%
    2008-12-24 2.88 4.11%
    2008-12-26 2.47 3.59%
    2008-12-29 4.82 7.01%
    2008-12-30 4.41 6.61%
    2008-12-31 5.89 9.67%
    2009-01-02 3.59 5.96%
    2009-01-05 3.35 5.59%
    2009-01-06 3.29 5.75%
    2009-01-07 3.36 5.56%
    2009-01-08 2.45 4.01%
    2009-01-09 5.44 8.91%
    2009-01-12 4.48 6.79%
    2009-01-13 3.60 5.35%
    2009-01-14 4.48 6.40%
    2009-01-15 8.96 12.82%
    2009-01-16 6.28 9.17%
    2009-01-20 8.72 12.30%
    2009-01-21 9.78 13.81%
    2009-01-22 6.12 8.50%
    2009-01-27 3.57 5.09%
    2009-01-28 4.17 6.42%
    2009-01-29 3.96 5.88%
    2009-01-30 5.58 8.06%
    2009-02-02 5.10 7.14%
    2009-02-03 3.54 5.05%
    2009-02-04 4.92 7.19%
    2009-02-05 5.91 8.62%
    2009-02-06 6.06 9.30%
    2009-02-09 2.55 3.91%
    2009-02-10 7.50 11.48%
    2009-02-11 3.64 5.17%
    2009-02-12 5.54 7.86%
    2009-02-13 3.45 5.01%
    2009-02-17 2.62 3.47%
    2009-02-18 4.34 5.70%
    2009-02-19 4.56 5.86%
    2009-02-20 5.76 6.99%
    2009-02-23 8.08 9.73%
    2009-02-24 8.25 10.02%
    2009-02-25 6.48 7.76%
    2009-02-26 6.67 7.87%
    2009-02-27 5.74 6.50%
    2009-03-02 7.63 8.02%
    2009-03-03 8.02 8.09%
    2009-03-04 8.39 8.59%
    2009-03-05 9.58 9.29%
    2009-03-06 9.98 9.36%
    2009-03-09 8.73 8.07%
    2009-03-10 11.51 11.54%
    2009-03-11 7.89 8.37%
    2009-03-12 16.94 19.53%
    2009-03-13 4.00 4.72%
    2009-03-16 7.20 8.75%
    2009-03-17 9.11 11.24%
    2009-03-18 9.11 12.33%
    2009-03-19 4.86 6.68%
    2009-03-20 7.19 9.59%
    2009-03-23 10.13 14.89%
    2009-03-24 4.96 7.24%
    2009-03-25 8.66 12.86%
    2009-03-26 5.08 7.97%
    2009-03-27 3.00 4.62%
    2009-03-30 3.31 4.63%
    2009-03-31 5.67 8.54%
    2009-04-01 6.18 9.16%
    2009-04-02 5.42 9.13%
    2009-04-03 3.38 5.69%
    2009-04-06 2.21 3.61%
    2009-04-07 3.67 5.88%
    2009-04-08 3.13 4.99%
    2009-04-09 3.10 5.43%
    2009-04-13 3.11 5.66%
    2009-04-14 3.03 5.41%
    2009-04-15 3.30 5.82%
    2009-04-16 4.67 8.81%
    2009-04-17 3.06 5.92%
    2009-04-20 0.94 1.64%
    2009-04-22 4.88 9.55%
    2009-04-23 2.88 5.41%
    2009-04-24 3.69 7.27%
    2009-04-27 2.54 4.90%
    2009-04-28 3.66 7.14%
    2009-04-29 4.31 9.02%
    2009-04-30 3.07 6.59%
    2009-05-01 1.80 3.72%
    2009-05-04 3.21 7.04%
    2009-05-05 1.34 2.91%
    2009-05-06 3.18 7.14%
    2009-05-07 4.56 10.31%
    2009-05-08 2.94 6.62%
    2009-05-11 1.46 3.22%
    2009-05-12 3.85 8.57%
    2009-05-13 3.01 6.18%
    2009-05-14 3.68 7.61%
    2009-05-15 2.38 4.85%
    2009-05-18 3.01 6.45%
    2009-05-19 2.12 4.62%
    2009-05-20 3.50 7.87%
    2009-05-21 2.42 5.02%
    2009-05-22 1.70 3.52%
    2009-05-26 5.89 13.05%
    2009-05-27 2.19 4.89%
    2009-05-28 3.18 6.95%
    2009-05-29 2.02 4.49%
    2009-06-01 2.25 5.49%
    2009-06-02 2.11 5.27%
    2009-06-03 1.17 2.87%
    2009-06-04 1.86 4.70%
     
    #52     Aug 2, 2009
  3. I think your looking at the wrong side of the equation.

    Reducing the Option Cost was not intended to increase profits at exercise. It happens to add a little but the purpose was to reduce decay and increase the opportunities to liquidate earlier.

    Take a look at your net position at 30.

    Your Holding:
    319 long with mean cost of 32.60
    100 33 puts @ net cost of $11.5K.
    100 37 calls @ net cost of $10K

    Guestimated Option prices at 30:
    33 Put 3.50
    37 Call .50

    You can liquidate your entire position
    Options for approximately $40K
    Share loss of - $867
    Options Cost: -$21.5k
    ==========
    Net: $17.5K

    Most importantly you've reduced your total cash investment to
    $33K ($21.5K options and $10.5K shares) while decreasing your time at risk. 50% return on a 10% swing.

    If you re enter with a new tradeset at 31 and the market moves the full 20% per your original plan. You've made another $17K. Doubled your investment with significantly lower risk.

    You still have some Tip money from the scalps but I don't believe they will scale as you invision. Even if the market remains sideways between 31 and 37 your bots will occupy your time but don't scale up enough to offset decay. Just do the straight options play, liquidate and be done.

    I'm curious to see how this options cover model works with RLM Futures and what the time frames look like.
     
    #53     Aug 2, 2009
  4. tommaso

    tommaso


    Yes that something that bothers me and I think it is worth to investigate this direction.

    I know byteme makes fun of me any time I mention the use of "pair" of accounts :)). But I think there are several situations where we can can leverage on that (and, in fact, I have coded my infrastructure to consider by default "pairs" of accounts).

    At ib they sort of said (i wonder if it's technically possibly and legal) that perhaps in future we will be able to neutralize positions across accounts (eg. -1000 and 1000 of same sec on two accounts would be "neutral").

    Anyway, one reason why I tough to use the in-the-money options because I would have a strip (actually too narrow) where both the accounts could play, one against the other (double scalping).

    We might even go deeper in the money, but this is costly in terms of options or profit (?).

    I am not sure I understand your sentence "Can you not scalp along the same increments as the long so you have a net zero position between the two accounts" but I would like to understand if you have a specific idea to sort of "doubling" the scalping.

    (If a trick is found, probably would boost profits incredibly.)

    T
     
    #54     Aug 2, 2009
  5. Trading Futures will allow sub account positions to offset.

    I hear the same thing... and in effect it all nets into one account but when your working an algo system you have to be able to seperate and adjust you robot positions based on fills.

    Its much easier to do in seperate accounts as the single account cost averaging makes the programming and auditing more complicated.

    There are also some benefits of controlling when your positions closeout / offset especially near the end of session for margin purposes. IE. if your broker uses your positions at 2:45pm to determine your overnight margin requirements... You can hold positions open a few minutes longer and preserve capital.

    But why waste time arguing math... Live and let live...

    ------------- Concurrent Trade Bots -------------

    If you scalp both sides you can book profits as long as both bots are able to exit. As your long is being drawn down and in effect is stuck... averaging down, waiting for market to checkup to exit.

    Your Short bot can be scalping profits. You run the risk of reversal and your short getting drawn down when your long gets to exit.

    You are already wrapping the two bots with options except you've violated your trade plan and sold lower then your call.

    You already know the average down game so you adjust your add increments for the short bot so it gets back inside your range.

    You also run the risk of getting spread apart... both long and short are being drawn down with a widening gap between them for either to exit. Just do your math and sync the add increments so the set remains balanced and inside your range.

    Gives you another reason to liquidate the entire tradeset. Scalp both ways inside your trade range... You'll need two sub accounts otherwise the short will close out the long.
     
    #55     Aug 2, 2009
  6. tommaso

    tommaso

    Yes I know. In fact my starting point was the scalping concept. Probably we need to run a few tests on paper trading to understand better what is here the "main strategy": the "scalping" part or the "shares-option" part. I have a feeling that the scalping might be predominant, but I may be wrong.


    About your curiosity "RLM Futures", I must confess i am unfamiliar with these instruments and probably need a place where to start up (not afraid to learn new stuff)...

    [Anyway if you have specific indications and guidance I have no problem to code also this part to take a look at it.]


    T
     
    #56     Aug 2, 2009
  7. long gamma baby...............what happens if the stock stops moving a lot? u get another "bot"??
     
    #57     Aug 2, 2009
  8. Open up a Sim Account with Openecry.com
    Use their Market Replay feature and record some data:
    They've got a great API for algo trading, programming bots and DDE for Excel modeling. Setup a trade manager account with a few sub accounts. Have fun ;)

    RLM-MU9 is the current Russell 2000 Futures Contract
    ORLM are their options.. trades on IPE exchange 8pm - 6pm CST: 22 hours a day.. Options are best traded during regular trading hours. Footprint should be a close match to TWM.

    ES, NQ, YM, 6E are all viable instruments with liquid options worth testing. The 6X's are all currency futures and their options can also be used to hedge and wrap Forex as everything settles to cash.
     
    #58     Aug 2, 2009
  9. I'm not sure if you want to commit another $300K to a trade plan your already stuck in. The instruments are index related so there is minimal chance of it going flat. Just getting stuck burning time sideways inside a 20% range.

    I think the game plan was the bot will scalp oscillations to offset decay allowing small profits to be made while waiting out a break out.
     
    #59     Aug 2, 2009
  10. Don't get me wrong or discourage you...
    High frequency scalping is good...
    Averaging down in steps increases your exit opportunities.
    Options Hedge wraps your range and protects your position.

    I understand your trying to capture the curve... Suggestions are geared to tune your Exit strategy and improve the risk/reward of your plan:
     
    #60     Aug 2, 2009