Trading algorithmically a folio without stops (with IB), real $$$

Discussion in 'Journals' started by fullautotrading, Oct 16, 2013.

  1. After some time away (busy in development) I am back with a new real $$$ test.

    Since now the number of people that have joined me in this fund management project has grown considerably, I am going to be able to make some more interesting tests of new trading approaches and ideas and variants on top of my application.

    The opportunity for this test is kindly provided by a generous investor who has kindly made available some capital for this test (after some time of due diligence).

    During this test I will also continue the development process of the application whenever new interesting ideas that you guys suggest will prompt me to add features. So it's not just trading, but as I usually do in my threads, also research, development and discussion time.

    The start capital is not huge (151K) but the idea of the investor is to possibly double it soon and increase it further. Clearly, unless I publically blow up in shame the whole thing :)

    In the nex posts, I will show the first draft of the folio and welcome all discussions about trades and trading games. I will be showing, screenshots with realtime trades for each instrument, as well as the aggregate behavior of the whole folio.

    The ideas is to proceed very gradually. I will first start with a small folio of ETFs and STKs, which will be gradually enlarged, and then, when there is more capital, I will open a new instance with some futures.

    The title of this thread is a little provocation within the interesting and neverending discussion about "stops" (see for instance: http://www.elitetrader.com/vb/showthread.php?s=&postid=3885672#post3885672 ), which I think should be called "take loss". As you will see, I will not be using "ordinary" stops, but rather trying to hedge the unfavorable moves through the whole folio dynamic. I use also the term "memoryless stop", and later in this thread it will probably be clearer why. :)
     
  2. Ok. I got the application running and loaded up a few ETFs to start the dances.

    At the moment I am watching an initial folio of 28 instruments, 12 of which are now in "auto" mode.

    A general setting I have indicated in most cases to proceed with packets less than 1.5K. These are the packets which will be used for the scalping activity.

    Since the packets are usually small, we know that commission expenses will be significant. We accept that as the "price" to pay to stay small and diversify, in presence of "relatively small" capital. In time we will gradually adjust both folio and packet sizes.

    Today we saw a couple of orders, which are open. One on UCO (-50 shares) and another on FAS (-10 shares). In time, the trading web (order clouds) will slowly begin take its shape.

    Some of the ETFs are the infamous "inverse" version (eg, ZSL, DUG, ERY, etc.) for which I usually prefer to set the "short only" game constraint.

    Cointegration blocking will be active and in case I will be revising the thresholds if necessary.

    Most instruments are using the example game "CT_TPlay", while for some of the bear ETFs I have defined the example game "CT_Tight", which, if there are wild moves might result a bit aggressive due too shorter spacing between entries.

    The picture shows the situation of the trading monitor now (mkt is closed at this time) with the current folio.

    <img src="http://www.elitetrader.com/vb/attachment.php?s=&postid=3887452" />
     
  3. We got our first trade, as UCO closed the -50 shares well before the opening bell (Thu 17 Oct 2013 08:40:44:516 edt ).

    As expected, we still need to pay the full comms (0.86). But that's ok for now (btw, make sure you have selected the "cost plus" plan).

    <img src="http://www.elitetrader.com/vb/attachment.php?s=&postid=3887584" />

    [PS. About trading windows, if you are using some ETF (that I may have missed to specifically setup) and would like to enlarge the default time windows, just let me know the actual trading hours you have observed, so that I can set them as defaults.]
     
  4. The order clouds are slowly taking their shape, while we supervise the situation anticipating possible runaways.

    Our goal clearly is to favor the scalping activity and contain the "runaways" so that the scalping activity fruits can exceed the unfavorable runaway component.

    As an hedging exercise we add a new layer for FAS, as the original instrument has taken 2 packets, and the mkt might continue inflating the bubble. For the new layer will take a long T_Only game is selected.

    I am also adding a "option unit", through the utility which is in the application (3-rd picture below), in the form of 1 short call against 3 long calls, in such a way to stay theta positive.

    Clearly, if the options remain out of the money their combined PNL will be negative most of the time, except the few days just before expiry.

    <img src="http://www.elitetrader.com/vb/attachment.php?s=&postid=3888363" />
     
  5. Let's use the weekend for some general thinking and high level discussion about the general organization of the approach to trading we are using.

    A first sketch can be the following (we will refine the conceptual picture as we proceed). We can identify 2 main activities:

    1- <b>Automatic trading</b>
    (carried out by the algotrading application according to scalping/hedging games defined by the fund manager)

    2- <b>High-level Supervision</b> of the folio and trading activity
    (a duty of the "fund manager")


    Within the <b>Supervision</b>, we can identify the following tasks:

    2.1-- <b>Selection and study of each instrument</b> to be added to the folio: including history, fundamentals, specific features (beta, volatility, correlations, understanding of the prospectus)

    2.2-- <b>Game selection and possible specific adjustments</b> including possible directional constraints and tuning of game parameters to beta, volatility and other specific characteristics of the instrument

    2.3-- <b>Extra hedging</b> to taper expected or actual "runaways". This may include:

    2.3.1--- <b>New instrument layers</b> definition. These can be formed by the same instrument or a correlated instrument
    2.3.2--- <b>New option layers</b> mainly with a "protective" function

    2.4-- <b>Overlay of "discretionary layers"</b>. This is a very vast area, which we can explore at a later time, and may also include the use of option structures with a non protective function, but rather aimed to capture extra profits under given circumstances and assumptions.
     
  6. I have been adding some more instruments and "layers" so that we have a total of 53 instruments running now. The first orders have begun to trigger and gradually the "order clouds" are taking shape on each layer.

    During this journey I will keep revising this folio, adding or removing more instruments or layers.

    The situation of the current PNLs is summarized in the picture below.

    <img src="http://www.elitetrader.com/vb/attachment.php?s=&postid=3890470" />

    Many of the readers already know my terminology, but for those who are reading for the first time let's clarify some of the terminology I use.

    <b>Game</b>

    The set of rules which gives rise to the orders issued on a given instrument, in reaction to the market data received. This is also called "scalping/hedging game".
    Note that the word "scalping" is used here in a generalized sense, irrelevant of the size of the amount being realized. The game is not only "scalping", but also "hedging", as I will explain later, using a mechanism which I call "player superposition". This is just one of the source of hedging, and works at layer level. The other forms of hedging, which I will explain later, work across layers ad use the instrument correlations or use additional layers (same or other correlated instrument with different games, or options).
    The games are completely defined by the fund manager (through a simple interface where trading rules can be specified), and those games I am using are just "example games" in my application, but anyone can redefine them at will. (While trading one might have new ideas for new games.)


    <b>Layer</b>

    By "layer" it is meant an instrument playing a given scalping/hedging game.
    We can have multiple layers having the same instrument, with different games.
    For example, we could have one instance of FAS playing the game called "CT_Tight" and another, and another instance of FAS playing the game called "T_Only", and so on.

    In practice, any item in the treeview on the left, listing instruments gives rise to a "layer".

    In the next posts, I will explain how the hedging mechanism works and what is the nature of the edge of this approach.
     
  7. To give a quick idea of what a "game" can look like, let's take for instance the layer trading SCO, which has a few orders. This is the "example game" called CT_Tight, and, in this case, has a short constraint applied.

    You see the position taken was quite small (we will increase it a little as the trading proceeds) and consequently the commission "relatively" expensive.

    <img src="http://www.elitetrader.com/vb/attachment.php?s=&postid=3890479" />

    This is just the beginning of what will eventually take form in an "order cloud", as I call it. An "order cloud" is simply the set of orders generated on a layer by a game.
     
  8. Today we added a few more orders to our order clouds. The layers with correlated instruments (TQQQ, UPRO, QLD ..., DRN, ...) we defined to hedge against the runaway instrument (FAS, URE) have begun to work against the drawdown, as we wanted, thus smoothing the equity curve,

    The various PNLs are:

    <img src="http://www.elitetrader.com/vb/attachment.php?s=&postid=3890933" />


    In the next posts I will begin to sketch the logic of what we are doing, addressing the details of the hedging mechanism.
     
  9. You see for instance like just a couple trades on TQQQ (long) were sufficient to practically recover the FAS (short) unfavorable move.

    <img src="http://www.elitetrader.com/vb/attachment.php?s=&postid=3890993" />

    Now, just as an example, I showed here how this works with 2 layers with different competing games.

    However, even if the fund manager does not make any game choice, the application will proceed by itself <b>analyzing the correlations across all instruments and enabling or disabling appropriately the entries in such a way to minimize the exposure and maximize the global hedging effect</b>.

    Our goal is always to maximize the scalping action and, simultaneously, to contain the runaways.
    All the process of trading can be seen in principle as a "tug of war" between 2 forces: scalping (realization of positive profits) and "runaways" (unfavorable moves).
    And all the application has to do is to maximize the first and cut/taper the second.


    In more formal terms, let's consider the PNL decomposition:

    <b>PNL = Realized gain + Realized loss + Unrealized</b>

    In our context, since, by definition, we take "no stops" (= no take loss) then we have:

    <b>PNL = Realized gain + 0 + Unrealized</b>

    In other words, the PNL is resulting from a "struggle" between the results of massive scalping activity (Realized) and the entity of the unfavorable moves (Unrealized).
    All our effort are towards the maximization of the scalping action and at the same time the reduction of the impact the open orders which are "running away".
    Note that even if you were using "stops", you would have the same problem, but aggravated by the actual presence of the "Realized loss" component.

    Once it is clear that hedging is a crucial activity, it is just way more efficient not to "realize" the losses at all and develop at maximum level the hedging mechanisms (using all means available and that we will see: player superposition, layer overlay, correlation blocking, options, etc.).
    The common problem with "stops" (=take loss) is that some people do not realize that they are just a component in the above equation, and simply throwing most of the Unrealized into "Realized loss", as they in effect do, it is, in many cases, a sure way to prevent the possibility to achieve any systematic profitability.
     
    • tqqq.jpg
      File size:
      196.8 KB
      Views:
      877
  10. You can see that so far we have managed to have a smooth growth of the equity curve, and we intend to continue grow it smoothly. [Commissions are relatively enourmous, as we expected, but I intend to lower their relative weight, as we proceed.]
    The FAS options, as expected, will stay negative until near expiry. We do not care, as we have introduced them as just as a mere example of possible "protection" towards extreme events. If they remain OTM they will result in a non losing event. If they expire ITM (there might be an assignment), the short option position would be "transformed" into an actual (short) underlying position managed automatically by the application, just as all the other positions (remember: we do not allow "loss realization".)

    <img src="http://www.elitetrader.com/vb/attachment.php?s=&postid=3891462" />

    During the weekend I will probably begin to sketch of the concepts of "superposition" and "layering" work, and what is the reason why they are *much* more efficient than any stop mechanism operated at level of a "single-trade thread".

    Thank you very much for the great attention this journal is receiving: I can see an enormous number of view in just few days. Please, of course, feel free to post thoughts, questions, suggestions :)
     
    #10     Oct 26, 2013