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

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

  1. End of the week. Quietly scalping and hedging. Mostly hedging: the mkt continuously pulling up is preventing us to close several short players still open on metals and energy (which are almost reversing position at this point).

    [​IMG]

    In the meantime. I am getting ready with the new release, which I should go live on this account anytime in the next week (probably from Monday). I will be devoting the weekend to some simulations for a preliminary tuning and testing of all the game rules.

    (With the update, the hedging action should intensify a bit, by "overloading" the directional moves, and with a quicker close mechanisms.)
     
    #241     Jun 6, 2014
  2. Let me begin explaining the rules reorganization. Later in case we will go through the individual rules of each rule set.

    - Cloud Phases -

    First of all, let's remember, that based on pragmatic experience, we have identified (so far) 4 main "phases" (per side) in the order cloud formation (clearly, they can combine in 16 configurations, considering both sides).

    We have already discussed them previously and they are again summarized in the following picture (showing one side, for the other one just exchange buy with sell.)

    [​IMG]

    The meaning of this classification should pretty intuitive and not require much explanation.

    The additional set of rules 5) and 6) are meant to provide"override" rules to any of the above 4 stages.

    5) Indicates a condition of favorable move with the open players momentarily being in profit.
    6) Indicates a generic condition of strong directional move

    As anticipated in a previous post, rule set 5) was introduced to automate the possibility to take advantage of quick favorable moves (which do happen every so often). Rule set 6) is also a variant of a similar idea, extending the concept to situations where the players are still negative, but there is anyway a strong favorable directional move (for instance, a violent reversing condition.)

    [In general, 5-6 can be seen as (momentary, because they kick in only under particular circumstances) forms of automated and tight "pyramiding" (of appropriately spaced players) mechanism, equipped with a very "sensitive" close rule, which would shuts most of the (positive) open the players down at the smallest sign of price inversion. Clearly, the players which remain "stranded", will possibly be "recovered" later on, as by general design.]
     
    #242     Jun 7, 2014
  3. jcl366

    jcl366

    Hi, a question about your system. By what method does the system enter trades that are not meant for hedging? Are they entered at random, or when the price crosses a grid line?
     
    #243     Jun 10, 2014
  4. Hi jcl366,

    thank you for your question.

    A "deep" answer to it is actually problematic, as it would first require us to define what is meant by "random" :) and it may even be argued that many people actually are mostly making "random entries", even though they live in the illusion they are following some meaningful "signal" :))

    More pragmatically, the entries (player open), in our case, are dictated by the "entry rules". Those 4 categories we have just seen, and the additional 2 "override" rules, contain inside the various rules to open and close players (maybe in next post we can dig in these rules one by one).

    Once the order cloud starts being populated, the players open are all interdependent, both regarding price and sizing, as of course we want to use the the previous trading information (current shape of the order cloud) which is being preserved to decide the next orders (new players).

    (These rules are adjustable by the fund manager, in order to fit specific instrument "structural" characteristics, such for instance ETF decay, drifts and so on.)

    As to the green "grid lines" you can see in the screenshots, currently they are displayed only to give the manager a useful "visual feeling" (since the % grid spacing is kept constant, about 1%, for each instrument) about the instrument volatility and range. At this time, they have no use whatsoever, neither for opening new players or for closing them.
     
    #244     Jun 10, 2014
  5. jcl366

    jcl366

    Thanks for the explanation. Ok, if I understand it right the "alpha" does not come from entry/exit rules, but from keeping memory of lost trades and using it for recovering losses by entering further trades with some hedging algorithm - is that correct?

    If so, why does this method produce an edge? Suppose the win chance of any trade is 50%, then I would assume that this is also valid for the hedging trades. How does using memory of lost trades increase that chance? Do you have a math formula for that?
     
    #245     Jun 10, 2014
  6. > is that correct?

    That's right, in the sense that it provides a necessary condition to play trading games which are not uniformly dominated (clearly, it does not "guarantee" an "edge").


    > Suppose the win chance of any trade is 50%

    In very rough and simplistic terms, assume you were trading with ("memory-less") stops with 50/50 chances and no trading fees. If you keep your trades relatively small to the available capital, you would be fluctuating around a PNL = 0 with positive and negative periods (which, in some cases, may even be longer than your lifetime, clearly.)

    If you add the trading fees, you add a long term negative drift.

    Now assume somehow you could "get back" a fraction of the 50% losers. That would provide some positive drift.

    Clearly, this is an oversimplification, as the matter here, if meant to be applied in the real world, can get so articulated that investigations must be carried necessarily through simulations, intuitive insight, and actual trading. And efficient games are necessary to take into account all the structural characteristics and the problems with "real" instruments (decay, contango, execution issues, drifts working against you, etc.)


    > Do you have a math formula for that?

    Following the idea sketched, I believe it is possible to prove a "theorem of strategic dominance", under specific assumptions. However, I preferred to leave the matter at an intuitive (and somehow more powerful) level, and if there are researchers interested, they can certainly propose some actual "incarnations" of the above (which could be based on all sort of formalizations: probabilistic models, fuzzy, chaotic, etc.).

    Note that the theorem could not say that you are going to be "profitable", it would "merely" say, that for any strategy S, which does not use the past trading information (eg., "stop-and-forget" orders), you can build a new strategy S*, which improves it (dominance) by efficiently using that information.

    For the moment, I am more interested in the actual $$$ creation process. I think I can leave the task to develop theoretical "proofs" to other academics.
    I prefer to work out a "practical demonstration", with real money and real world difficulties, which can be hardly captured by abstract theoretical models, (often containing a lot of unrealistic assumptions). Math is just a more precise language for ideas: here we are just discussing the ideas.
     
    #246     Jun 10, 2014
  7. jcl366

    jcl366

    Thanks, this makes it clearer. Forgive me that I'm a little slow, but I'm still not 100% sure where the edge of your system lies.

    Suppose you have two trade strategies S0 and S1, where S0 does not use past trade information and S1 does. In any other regard the strategies are exactly identical. You can then build a difference strategy S2 = S1 - S0. This would be just trading both systems, but S0 in opposite direction. If your system has an edge, S2 should always have positive expectancy - is that correct? And if so, why do you then trade S1, instead of S2? If S2 alone is causing the positive drift, it should be vastly more profitable than S1.
     
    #247     Jun 10, 2014

  8. > In any other regard the strategies are exactly identical.

    This cannot be. To use past information, S1 must be essentially different. For instance as to sizing modes, entries and close.

    At minimum, there are the "losing" players open which must be closed when possible (partial loss recovery).

    (Deriving a strategy S* from S you can possibly "inherit" some ideas or concepts, but the past trading information must be used. And this at bare minimum includes "resolving" the losing trades when possible.)

    If S* and S are doing the same, it means you have already switched to the "dominant" architecture, and further improvements are possible only at the level of scalping/hedging game specification, that is, in regard to how the past trading information or specific structural characteristics of the instruments are actually used.
     
    #248     Jun 10, 2014
  9. jcl366

    jcl366

    Ok, I see. Then let me formulate a different question for understanding the edge by continuing the losing trades:

    Suppose you were trading not real instruments, but a portfolio of random walk curves, some correlated, some anticorrelated. Had your system then still a positive drift? If not, which property of real price curves causes that positive drift, as opposed to random walk curves?
     
    #249     Jun 11, 2014
  10. I believe that the theoretical situation you describe (portfolio of random walk curves, some correlated, some anticorrelated) is the "ideal" situation which (in statistical terms) may maximize the positive drift you can build with a scalping/hedging game. The actual form of the random processes which do maximize (in statistical terms) this drifting effect might be object of theoretical investigations, and they are clearly dependent on the scalping/hedging game definitions (for instance one might empathize more or less capturing the "directional" moves).

    It's an ideal candidate because (assuming the naive framework of non overlapping stopped trades) you are normally 50/50, and all you "recover" feeds your drift. So the battle is mostly purely between trading costs and your edge.

    In the real world, however, the situation is different, because the market (market makers, etc.) somehow "hits back", and its "response" is built taking into account also your orders. So you are not in a completely "neutral" environment, which evolves independently and is unaffected by your presence, but in an environment where there may be (and there are) other algorithms actively working against you (nothing personal anyway :)) ).

    Just imagine I were the programmer of the market making program. It's clear that if would work to program it to take around and "rip off" :) as many participants I can (clearly in statistical terms). So depending on your order sizes, the liquidity of the mkt, and so on, there can be a more or less significant influence of your activity.

    There are of course many other aspects of high unrealistic behavior in random walks. They can escape to infinities, while real world instrument don't. You may have a fixed volatility parameter (like in the GBM), while in the real world this does not exist. You can have constant correlation matrices, while this in the real world does not exist, and so on. They evolve independent of the trading activity, while real prices don't.

    Further, "real" instruments may offer several additional practical challenges. For instance many leveraged ETFs have a strong (structural or fundamental drift), which you must take into account, as it may well greatly exceed any drift you can build. You may have contango. Situations when instruments are not shortable and therefore be able to hedge otherwise. Continuously changing volatility and correlations. Trading costs, fees, dividends and interests to take into account, and so on.
     
    #250     Jun 11, 2014