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

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

  1. jb514

    jb514

    This is still a vol arbitrage strategy so you can't really say there's no prediction necessary. PNL seems to have some correlation with asset prices.
     
    #341     Jul 2, 2014
  2. The discussion about "prediction" is an interesting one, although probably more under a philosophical point of view than in practice. Well, there are cases when of course beliefs impact practice, and those are the cases which are most relevant to a fund manager.

    When is the concept of prediction "dangerous" ?

    1. When you think you can "predict" and therefore you blindly rely on it (thus not appropriately hedging)

    2. When you think that the mkt is giving out "predictive signals" which may give you a statistical advantage. In this case, you would proceed normally with take profit and stops of whatever size, unknowingly sitting on an unstoppable negative drift and under the sword of Damocles of limited capital. The point is that the mkt may actually be "telling you nothing" (at best :) ) and your entries may just be random events.

    But let's make a step back.

    Superficially, one would like to differentiate between 2 categories of strategies:

    - Those which are directly or indirectly relying on some predictive signals or prediction
    - Those which mechanically apply some rules and do no make any predictive effort, nor about future prices nor about future volatility.

    To the first category belong things like regression (in a broad sense), pattern recognition, neural networks, etc .... In general, anything that on the basis on past tickdata produces some form of "extrapolation" (either of price or volatility).

    Now, our friend AdrianHagh81 here has expressed his appreciation about my proposal of a statistical approach to fuzzy regression, which may make you suspect that at least I should be a great fan of those methods. Now imagine you ask any proposer of "regression" methods (or other math models, including Neural networks, etc.): would you suggest to apply your research to trading ? Well I can't answer for all the other guys (and probably they don't do much trading either), but let me give my personal answer. No, I would not (unless the purpose is descriptive). Why ? Well statistical methods can't be just applied mechanically in a blind way. It's not that by applying a mathematical model, whatever it is, you can create relationships which do not exists. Well, of course, they may be good for interviews or to impress your boss for a little while.
    Of course, the mathematical model will, in any case "spit out something", but the problem is that a spurious or nonsense correlation is being exploited, so the output is some "random" event. (Different is of course the case of applications to a physics framework, where there may be underlying "laws" or sensible regularities to be exploited).

    If the mkt is not giving you any statistical advantage, then you can use all the math and sophistication you may think of, but what you get will still be useless, to the purpose of getting a statistical advantage. Of course, the point is that some people do think that the modern and electronic markets are still giving away those magic "hints" which will make you rich. Unfortunately, there is no evidence for that, and until some serious evidence (thus, excluding scammers and uneducated folks) is presented, I think we must relegate that stuff to the world of Magical Thinking.

    In any case, whatever is the philosophical standpoint, one thing is sure. That one must have effective hedging techniques, and certainly the "stop and forget" device is not the most effective, as the involved "loss of trading information" will be unforgiving in the long term.

    In brief, it's pretty irrelevant if you think you can predict or no, if you hedge as you should. (Actually, I do think I personally can make pretty good predictions for scalping purposes, but don't ask me if it's "real" or just an "illusion" :)) ).

    What matters is that, in the meantime, you don't forget to carry out all the right most rational hedging actions and that you are not carried away by reliance on foolishly-used delusional models, self-deception and desperate hope.
     
    #342     Jul 4, 2014
  3. AItrader

    AItrader

    Hi Fullautotrading,

    could you post some examples of investment situations and
    their relative "right most rational hedging actions"?

    Detailed numerical examples, please, not just qualitative descriptions. That would really help in undestanding a part of Gbot hedging activity.

    Thanks!
     
    #343     Jul 5, 2014
  4. Hello there Fullautotrading,

    I followed the last few exchanges and I have to say to those who may have doubts that I found only great intellectual integrity in your work, which I have been following for about 2 years now.

    The Gbot principle is to create profit faster than loss, while the negative unrealized is kept under control “as good as it gets”. Did I summarize correctly?

    Clearly, the drawdown is actually a phase of investment as we are not using stops, and as we are averaging: At 1 time, the 2 buy/sell averages will cross and profit will be there.

    But what if the traded capital comes to exhaustion while Gbot is not generating profit fast enough on other instruments to pay for the investment (i.e. the drawdown)? This could happen in the case of a flash crash or 9/11 type event, is it correct? Or even now, with those instruments that are pulling the PNL down; what if you would not be capitalized enough..?

    I am also aware that if such a case occurs, Gbot should at least not do worst than anybody else or than any other system, but that is a poor solace if the account is blown..!

    The manager can of course take safety measure in advance, especially by defining trading corridor with options units acting as safeguards, but that would probably also have a negative impact on the whole performance of the system and might slow your drift?

    Could it be a help to always consider the situation, at any moment, under the following criteria:
    “Are the profits already generated, sufficient to finance the maximum risk of the portfolio”?

    Key word here, being “maximum risk”… Allow me to elaborate:

    • If the prices are creating DD in 1 direction on 1 instrument, we could define arbitrarily as “maximum” risk limit on this instrument the volatility level in the direction of the DD; price may reach this limit (which is at a “realistic” distance), or they may reverse.

    • At each tick, we calculate for each instrument the “maximum” DD that will be caused with the open positions, if the prices reach the vola level.

    • If profits already generated are sufficient to open a counter position on this instrument, then we keep trading. If profits already generated are not sufficient anymore, then we hedge: Opening a counter position that will reach its full value when prices reach the vola level. At that moment, both the positions in DD and the hedge can close for a 0 sum.

    • The interest of defining arbitrarily the maximum risk level with the vola is that it can allow to always compute if the account is rich enough to take the chance of the next trade.

    • Also, it could be interesting to crunch numbers and see whether it’s more interesting (for the drift) to calculate the unrealized to be hedged, as the sum of neg+ pos, or just as neg.
    on’t know if I’m being clear? Does that make sense?
    It seems to me such a criteria could make the system more safe. And also, it would enable to judge across the portfolio which instrument is currently best suited to hedge the whole portfolio. It becomes easy to calculate a “recovery ratio” for each instrument, once we have a maximum limit. We could also factor in the speed of the instrument in this ratio calculation.

    Hmm, I feel like I’m taking my chances now, to suggest this and you may already have considered this, or better.

    In any case, that would be really interesting for all readers I think, to dig deeper on the hedging issue.

    Thanks in advance for your feedback, and I hope this post was not tooo long ( I know it was..!)
     
    #344     Jul 7, 2014
  5. @Johnny Ca$h

    >I followed the last few exchanges and I have to say to those who may have doubts that I found only great intellectual integrity in your work, which I have been following for about 2 years now.

    Thank you. I can even die happy now :)


    >The Gbot principle is to create profit faster than loss, while the negative unrealized is kept under control “as good as it gets”. Did I summarize correctly? Clearly, the drawdown is actually a phase of investment as we are not using stops, and as we are averaging: At 1 time, the 2 buy/sell averages will cross and profit will be there.

    Yes, except the "averaging" part (at least as it is currently understood). I will be explaining this in detail when responding to the above post of AItrader. Since you have been following me for some time, you may (and rightly so: my fault) have missed some my latest development on hedging techniques. However, I will explain that in detail.

    >This could happen in the case of a flash crash or 9/11 type event, is it correct? Or even now, with those instruments that are pulling the PNL down; what if you would not be capitalized enough..?

    This will be clearer when I go more in detail about hedging. In reality, extreme sudden events will likely not hurt that much. What currently appears more troublesome (at the current stage) are very long, slower, price waves with alternating direction.

    >I am also aware that if such a case occurs, Gbot should at least not do worst than anybody else or than any other system, but that is a poor solace if the account is blown..!

    Well sure. Some good capital is needed in any case. I don't actually believe in "becoming rich" trading starting with "small" capital. As I see it, one has already to be (relatively) "rich" :) and trading is just a form of investment (like several others), involving some degree of risk. Of course, I'd like it were not so. But that appears to be the reality.

    >The manager can of course take safety measure in advance, especially by defining trading corridor with options units acting as safeguards, but that would probably also have a negative impact on the whole performance of the system and might slow your drift?

    Yes, there are other "alternative" or complementary hedging techniques (also involving options), with pro and cons. I will also discuss that when talking more in dept about hedging.

    >If the prices are creating DD in 1 direction on 1 instrument, we could define arbitrarily as “maximum” risk limit ...


    Yes all these ideas make sense. The only difficulty is to reconciliate that with the concept of "preserving and using the trading information". I have done some work and advances lately in this direction, and I will explain that in the next posts.

    >I hope this post was not tooo long ( I know it was..!)

    You did successfully touch a lot of core and crucial topics. And it will take me some time to appropriate respond and shed light on all these aspects. I do thank you very much for taking the time to elaborate all these points, your constructive feedback, and for your kind words.
     
    #345     Jul 7, 2014
  6. We had a pretty nasty surge today on gold (see yellow arrow, where we stopped), and having all those 3X ETFs on metals, the PNL spiked to a nasty -22% the initial capital (we had accumulated anyway several Ks hedging the way up, which anyway mitigated a bit the hit). Thus the account owner decided to suspend the trading and take his time to reevaluate the situation.

    During this week I have added, among many others, a useful feature which allows to suspend ("flatten") an instrument, leaving all the players open, while the actual position of the instrument is 0, which is very useful in cases like these, or, more importantly, to "suspend" an instrument to use that capital on other instruments which, for whatever reasons, are momentarily more convenient. (This means that we can still maintain the "trading information", even if an instrument is "flat" or "stopped", for later reuse).

    [​IMG]

    In the next posts, responding to the question by AItrader, I will probably be reviewing what are the hedging devices and actions which are available, examining pros and cons of each method (including the "ordinary" stop loss of course, option collars, averaging, player superpositions, etc.).
     
    #346     Jul 9, 2014
  7. Some notes on hedging, as promised.
    Let's consider, for instance, a short (signed) position Q with average price A.

    For instance:
    Q = -1000 shares
    A = $50

    Let's consider two higher prices P0 and P1 (A < P0 < P1)

    for instance:
    P0 = $ 100
    P1 = $ 150


    Let's consider the situation at price P1, under two possible "hedging" scenarios.

    - Scenario I (say, "<b>averaging up</b>")

    Action consisting of a sell order of -U shares at price P0 (U denotes the "signed" size of the order).

    for instance:
    U = -1000 shares


    - Scenario II (say, "<b>player superposition</b>")

    Action consisting of a buying -S shares at price P0 and then selling -S shares at price P1 (S denotes the "signed" size of the order):

    [​IMG]

    Let's see what we have when we arrive at price P1, under the above two scenarios.
    In (I), we have a position equal to Q + U. When we arrive at price P1, our "loss" is:

    Q (P1 - A) + U (P1 - P0)

    The effect of the "averaging" order has been to rise the initial sell average A to the new higher value:
    <pre>
    P0 - A
    A + U ---------
    Q + U
    </pre>
    In (II), we have a "final" (signed) position equal to Q (taking less margins). When we arrive at price P1, our "loss" is:

    Q (P1 - A) - S (P1 - P0)

    (smaller than the previous one). The effect of the "protective" player is also to rise the initial sell average A to the new higher value:
    <pre>
    P1 - P0
    A + S ---------
    Q
    </pre>
    It might be interesting to ask what is the order size -S of the "superposed" buy player which makes the increase of the average at least the same as in the case (I) of "averaging up":
    <pre>
    P1 - P0 P0 - A
    S --------- >= U ---------
    Q Q + U
    </pre>
    we get, for the buy order:
    <pre>
    P0 - A Q
    -S >= - U --------- -----
    P1 - P0 Q + U
    </pre>
    For instance, in our example, we get -S >= 500. (This would hold in general. If U = Q and P1 - P0 = P0 - A, we need a buy of at least -U/2 shares to have the same or a greater effect on the average).


    So, if we have a situation looking like the top picture, we continue to add "protective" buy players, but at some point, some or all of them are closed. This would cause an increase of the average of the current short position.

    If instead, we continued adding buy players (bottom picture) and we let the position to become long ("inversion") from that point on, further buys would cause a decrease of the average of the current long position.

    [​IMG]

    Finally, we can "alternate" between these two situations, pushing a bit up the average of the sell players and a bit down the average of the buy players, thus gradually getting them "closer", and, possibly, cause a "crossover" (clearly, if funds suffice to sustain the game).

    This would also suggest that, in practice, it may be useful for the fund manager to have the functionality to "force" the "protective" players to remain open (I am going to add that).

    It would also be interesting to review the (real world) disadvantages of these mechanisms and the (complementary or alternative) use of option "collars".
     
    #347     Jul 10, 2014
  8. AItrader

    AItrader

    Hi Fullautotrading

    thank you for explaining the hedging procedure in full details.

    It seems that a key point is the determination of the distance between prices when novel trading actions are to be undertaken.
    Have you had any thoughts to share on how to determine that?

    I hope that you will continue to trade with Gbot by paper trading and keep updating the threads as it still provides some insights about Gbot behaviour.

    Again thanks!
     
    #348     Jul 10, 2014
  9. sc0t

    sc0t

    Hi Fullautomatedtrading,

    Thank you for this great explanation, please keep the good work.
     
    #349     Jul 10, 2014
  10. [​IMG]
     
    #350     Jul 10, 2014