Automated folio trading - Role of Information and Hedging

Discussion in 'Journals' started by fullautotrading, Dec 7, 2014.

  1. CL and ERY are moving a bit today and we have returned to -9%:

    Code:
    NetLiquidation                908,918.81 USD                      [Min: 712,498.60, Max: 1,048,240.20]
    Code:
    Δ NetLiquidation              -91,081.19 USD  -9.11%
    I have prepared, with the order enqueuer (essentially an "order scheduler", as we have seen in previous posts), a "buyback" plan for the "manual layer" of ERY where we have "memorized" the "losses" and liquidations of the ERY options:

    ERYBuyBack.png

    It's pretty "slow" with only 1,000 shares at a time at various step, but I don't want to be too quick to close the position, like a scared chicken after all that DD :)

    Every time a target is hit, if the price goes back I will short it back (of course, when it makes us the grace to allow short) and recreate the "target", so we do a sort of "semiautomatic" scalping on this layer, to close the "ERY option chapter".

    Of course, it's free to go up again (no prediction here :)): it can't hurt much more than it already did, now.
     
    Last edited: Jan 21, 2015
    #31     Jan 21, 2015
  2. Here is a "flashcard" summarizing some of the considerations we have been making so far. Just an intuitive sketch, we will articulate it more in the following:


    - "Horizontal" components (possibly "nested") of price movement

    Non-predictive scalping/hedging, through player superposition: full-automated, unattended. (This is where the machine cannot be beaten.)


    - "Vertical" component of price movement

    - Portion ("protective players") of the scalping/hedging engine (full auto) [covering about 1/4-1/3 of DD in best cases, depending on data microstructure]:

    - Option management (semi-automated):

    [ Dynamic protection, using just OTM options (PUTs to protect downside, CALLs upside).
    As soon as the protective option go ITM, close as many short players as possible, place a take profit and hand the layer to the bot in full auto mode and short-only constraint, and start rebuilding the needed position at the near OTM strike.

    Time decay recover: OTM options on both sides. Not "too far away" (< 15% away). Place take profit.

    Periodically reassess situation and hedging needed against vertical moves.]

    MarketVision.png

    Special intervention of the fund manager in some situations

    - Discretional player injection
    - Super tight scalping/hedging manoeuvres (manual entry, automated-close) [mostly done in the 60' "trading window"]
    - Move investment load from an instrument to another one
    - Re-sync after liquidations or option expiration (close/assign/exercise)
    - Rollover and other forms of past trading information preservation
    [...]


    Eg: H-V "components" in the real word (CL example):


    CL_HVComponents.png
     
    Last edited: Jan 22, 2015
    #32     Jan 22, 2015
  3. In my experience talking with many fund managers, I have noted that a common issue many of them have is right where the bot has instead its greater strength, that is dealing with the "horizontal components" of the price move, where the human is for various reasons, many of which of psychological nature, pretty ineffective (unless he has specifically adjusted and trained himself to deal with it), or simply does not have the resources (time, attention, patience, precision) to deal with it.

    On the other hand, a non-predictive scalping/hedging engine cannot, in general, cover completely the "vertical moves". The reason for that is obvious, as that would require making no money on the horizontal moves :)

    However, it can and does (if instructed to do so) protect against part of (just a portion of) the vertical moves. The mechanism through which it does that are the "protective players", that is those players which essentially buy high and sell low (with the aim to sell higher/buy lower). Clearly, as long as we can close those, they provide an hedging action, while when they remain open, they obviously reduce our profit on reversal.

    If you ask: how much can it cover ? That is strongly dependent on the instrument and its data microstructure. All instruments will be different, an in general best results are obtained with liquid stuff with a lot of significant fluctuations (eg. energy sector). It is also dependent on how we setup the scalping game. (If we allow too much "protection", we may end up losing too much of the profits obtained scalping the horizontal moves: so instead of being a protection, it is a "self defeat" :) )

    As an example let's take our CL layer (same picture as previous post, but in "player view" instead of "order view"). The blue and red squares denote the buy/sell players which are currently open (all the closed scalps that are shown in the previous picture are hidden in this "view").

    If you take a look, you see we have now 7 players long (blue squares), which you can think of as a sort of "averaging down" (in reality conceptually it's not, as they are simply players which could not close in profit, due to lack of fluctuations). Down below you see 4 sell players, in red, and those were player open for protective purposes, and that as well could not close because CL did not continue the downward move.

    Now, the range shown is from 62.99 to 51 (remember this is the December contract), a 20.35%, and if you had been averaging down 7 contracts your PNL would be significantly lower than the -16K "investment" we currently have. Why ?

    The reason is that we have been "stealing away" money in the horizontal moves the way down. How much did we grab? That is shown in the lime green string on screen:

    Open scalp values: -37.6K, Sell: -7.2K, closed players: 29K.

    CL_4Players.png

    this means we have grabbed and "archived" :) in the downward move about 29K. Clearly, these are incorporated in the PNL in form of a "lesser loss or investment": when CL goes up and the buy players can close, it will show more evidently in the PNL.

    Those 29K are not a small figure on a 20% range and in a perspective of speculative "investment" on OIL, and this is typical of energy futures which are rich of fluctuations and trade most of the time. If you do the same with stocks, you mostly get a very low figure. It may even happen that if CL stays long time fluctuating at this level we get back in the green (PNL >0) with not even need of any reversal (clearly, we will make more money when it reverses and can close the open buy players).

    [ Another interesting point is how do we differentiate, when in DD, a "loss" from an "investment" and how do we make sure we are actually "investing" and not, instead, "losing" our money. That is another question we will discuss later on, and in the meantime I look forward to hearing your ideas on the matter. Of course, it has also to do with the concept of "trading information" and its preservation, so that it can act as a form of "stored potential". A similar problem happens in less (?) speculative investments (like opening a restaurant or building a condo): how do we know we are investing and not anticipating our time and big money in ventures which won't pay back ? :) Clearly, when talking of financial instrument this has a lot to do, in addition possible factors pertaining to the economic situation (for those who believe they matter), with the "nature" of the instruments traded, the possible "structural" drifts they have, the influence of contango, various forms of decays, the tendency to reverse to past prices, etc., which must be carefully considered for each instrument traded.]

    btw, I am also noting that, with some cautions, the CL options are pretty good for this kind of automated scalping, and I will insist in this area.
     
    Last edited: Jan 22, 2015
    #33     Jan 22, 2015
  4. Today started slow and we got some volatility around 11:00 (check http://www.investing.com/webmaster-tools/economic-calendar to see what happened at that time).

    I have been following closely the situation, also hedging a bit the large ERY position with ERX and CL when needed. DGAZ has made the mistake to return high :) , so I could "unwind" that irritating liquidation (made by IB) we have seen a few post ago (it was running down in a non-shortable condition).

    DGAZ.png

    Here we see in a practical example why it is important to keep track accurately of all actions and hedging orders, so that we can "unwind" them, thus statistically unbalancing the situation from 50/50 to our favor. With the occasion, I also overloaded a bit the position, since now I have funds available I can "hammer" it as it deserves :).

    We have recovered quite a bit, and currently about 8% under, and the API reports to us:

    Code:
     - Current values (received on: Fri 23 Jan 2015 01:10:58:646 [ Thu 22 Jan 2015 19:10:58:646 edt ]) -
    
    AccruedCash                       -65.00 USD                      [Min: -65.00, Max: 0.00]
    AccruedDividend                     0.00 USD                      [Min: 0.00, Max: 0.00]
    BuyingPower                 2,630,421.10 USD                      [Min: 0.00, Max: 6,666,666.67]  (7.35 x 357,750.27)
    FullAvailableFunds            357,750.27 USD                      [Min: -100,810.83, Max: 1,000,000.00]
    FullExcessLiquidity           394,563.16 USD                      [Min: -83,144.06, Max: 1,000,000.00]
    FullInitMarginReq             568,496.09 USD                      [Min: 0.00, Max: 903,130.38]
    FullMaintMarginReq            531,683.20 USD                      [Min: 0.00, Max: 879,512.34]
    NetLiquidation                926,246.36 USD                      [Min: 712,498.60, Max: 1,048,240.20]
    
    - Initial values (received on: Mon 08 Dec 2014 15:19:16:873 [ Mon 08 Dec 2014 09:19:16:873 edt ]) -
    
    AccruedCash                         0.00 USD
    AccruedDividend                     0.00 USD
    BuyingPower                 6,666,666.67 USD
    FullAvailableFunds          1,000,000.00 USD
    FullExcessLiquidity         1,000,000.00 USD
    FullInitMarginReq                   0.00 USD
    FullMaintMarginReq                  0.00 USD
    NetLiquidation              1,000,000.00 USD
    
    Current - Initial (elapsed: 45.41 days)
    
    Δ AccruedCash                     -65.00 USD  0.00%
    Δ AccruedDividend                   0.00 USD  0.00%
    Δ BuyingPower              -4,036,245.57 USD  -60.54%
    Δ FullAvailableFunds         -642,249.73 USD  -64.22%
    Δ FullExcessLiquidity        -605,436.84 USD  -60.54%
    Δ FullInitMarginReq           568,496.09 USD  -60.54%
    Δ FullMaintMarginReq          531,683.20 USD  -60.54%
    Δ NetLiquidation              -73,753.64 USD  -7.38%

    We have a tremendous load on ERY (as a consequence of the "memorization" of the DD of the options), and a gradual "discharge" plan, as seen in a previous post. I will be using both ERX and CL to hedge possible unfavorable moves. We should not be "shy" to short CL to hedge ERY, because even if you forecast that CL will go up, it still has a strong contango (just look at the price difference between the December contract that I am using and the current one), and there is no doubt those hedging sell players will eventually all come back home :).

    In the meantime, I have been "ripping off" some of the CL options and experimenting with a few different strikes. So far I like them, apart the mishap with the CL FOP 201503 54 [ LOH5 P5400 ] which, for some
    mysterious reasons, keeps printing absurd quotes, with over 500 ticks spread (the strange thing is that in some premarket hours the spread returns normal, and in fact this early morning the bot even closed some scalp on it.) . It's practically keeping about 200K frozen and locked without possibility to do anything.

    What is
    likable of these instruments, imho, is that they trade almost with the "easiness" of the underlying (small spread, etc.) and they actually add to the fluctuation of the underlying their own strong contribution of volatility and produce a lot of useful fluctuations. Also, the time decay provides a definite and reliable "structural" drift in a relatively short and known timespan, which certainly helps getting out from the unilateral short scalps.

    Once we get rid of ERY, I think it's better just to focus on futures, and, in case, just some of the most liquid ETFs. I think I had enough adventures these ultrashort ETFs :)
     
    Last edited: Jan 22, 2015
    #34     Jan 22, 2015
  5. I have mentioned that the tickdata "microstructure" is actually a fundamental aspect in our non-predictive approach because most the profits are due to the various (possibly nested) horizontal components of the "price curve".

    Compare for instance this CL option:

    CL_PUT45.png

    We can see here definitely an "horizontal" development, and we also know there is a well know time decay in action on the price curve.
    (Remember that in all my charts I always use the same type of reference system, so that the horizontal green lines you see on the screen always represent about 1% move.)

    Now let's take for instance this chart (this is EUR/USD considered in the period of our trading session, 46 days):

    EUR_USD.png

    Now, you tell me: how can you make money from this ?

    Certainly, it not by scalping "horizontal" components in the price curve, as there are none appreciable (at least in the visible range). Sure, you can say, but this timeframe is not large enough. Ok, but are you willing to wait years just to complete a "wave", provided that some fluctuation will actually take form in the future?

    It's pretty evident that to trade that stuff, we cannot rely on a non-predictive approach as we can do with CL and its options (and many other instruments). But somehow we need to get right the "direction". So this starts looking more like "gambling", unless of course you have a solid understanding of all the economic and financial drivers behind this pattern and are able to create meaningful predictive models. (And you must also believe that "forecasting" prices is actually possible:) ) This is also why here a DD looks more like a "loss" than an "investment".

    Stocks also have a "microstructure" which is not very "suitable" for what we are doing here. Why is that ? I won't spoil your fun and let this as homework :)

    In any case, even armed of a good predictive model, if and when the price starts going in a different direction respect to your beloved model (and given enough time you will always get one wrong), what do you do ? How do you hedge? Then you are back to a problem of hedging techniques and therefore in "our realm" of specialization. However, here you have another problem, even assuming that we start hedging with techniques similar to those we have been using, it's pretty obvious that this kind of pattern is much "slower" and develops in a much larger timeframe, and you can be trapped in DD for years and years before even starting understanding what your situation is. Enough time to exhaust your (or your investors') patience, and finally convince you or your investors to leave the money on the table and fade away.

    So it's not like you pick something at random, maybe just because you heard so on some website, create a "folio" and turn on a bot or some "signal" provider, and go to the beach while it will print money for you. It's not like that at all. We need to carefully select our instruments and have a good real-world understanding of their dynamics, possible decays, drifts, etc and all the reciprocal relationships. And this can be acquired only through actual practice. Then we must focus on what we are doing and carefully guide the tool whenever it needs guidance. And this is very hard work, requiring in practice a full time (and beyond) commitment. Just as when you buy a hunting weapon, you don't expect that it will go hunt and shoot all by itself, and also bring you the preys. It does not matter how good or advanced the tool is if you don't have enough experience (or skill), patience and commitment with it and with everything surrounds it.
     
    Last edited: Jan 23, 2015
    #35     Jan 23, 2015
  6. End of the week. Not much happening today on the instruments we are trading (we don't have miners or metals at the moment in the folio).

    We have recovered most of the DD and in good shape and full control for next week. We have essentially most of our investment on CL and ERY, and we are hedging with ERX and sell players on CL itself. This time, we will not repeat the mistake to leave a large position open with the risk of some monster gap, as we have seen in previous adventures. I have hedged the large position of ERY, about 600K value, with an even larger position of ERX (about 900K value), considering that we are exposed also with CL. Clearly, I will undo the ERX position as soon as it appears not to be necessary (most of the players would close anyway automatically as soon some "decline" of the individual PNL is detected).

    PNL_7.png

    DGAZ has started coming out of the water, showing some profit. Today I made sure to hammer it even more than what the application wanted to, and there is more if it returns high :)

    DGAZ_2.png

    Today I have been playing with the "semi-automated scalping" feature (this is carried out on the 60' window) and even added some improvements. In a next post I will explain more in detail how it works, and it appears that this is probably one of the most valuable features I have developed so far as it allows an ultra-fine control on the hedging actions especially every time we hit our available fund limit", and also valuable to scalp very tight and easy, with good results even when an instrument is going nowhere:

    SemiautomSH.png

    This is the ERX layer I have been using to protect against ERY moves, and all those sell players are ready to automatically roll back in case ERY decides to fall. If instead it goes up, we will continue to add sell players to ERX to recover funds and avoid losses (Note that the reason why I use ERX to hedge, and not ERY itself, is because more manageable and liquid):

    ERX_3.png
     
    Last edited: Jan 23, 2015
    #36     Jan 23, 2015
  7. Not much happening on our side (mainly oil and energy) yesterday and today. Just fluctuations: good for some scalping :) . I have not done much intervention, apart playing a bit on the ERX layers opening some extra players, and let them close automatically on some PNL decline (for instance a 50% decline). I have also been playing similarly with DGAZ. Even if the application does not place some players due to current rules, we can always override and take the helm, every so often, in order to grab even the smallest moves and grab some extra scalps. For instance, in this picture DGAZ is sliding down a bit and on the "60' trading window" (each green vertical line is 10 minutes here) one can play with it:

    DGAZ_3.png

    dropping and tightly pyramiding a few players with instruction of immediate close on reverse (individual "PNL decline"). It's not going to make a huge difference in the big picture, but since we are anyway in front of the PC and there is some nice automation available to grab these small moves, why not to take advantage of it :) ?

    I have also been activating some CL options and let them scalp (in short-only mode and with a take profit), and actually they almost all closed in profit but 1: the infamous :) CL PUT 54 which remains with those strange quotes (bid/ask = 8/11.5) and monster spread (350 ticks now), and so completely unmanageable, in this Dxxx account (on a real account the close order should be executed.) It is also responsible for the weird fluctuations in the equity curve I plot, because my PNL (different from IB) is computed by including the closing price and therefore this weird spread is included in the computation (I have actually an option to tell the instrument to use the midpoint or the intrinsic value + time value, but I am not using it now.) Anyway, when it expires, in 20 day we will take care of the issue :)

    The CL layer has been scalping quietly, and occasionally I have been "dropping" some extra sell players, because I want to make sure that why we aim for the oil reversal, the contango will not eat us alive. Last time we looked at a picture of this layer (see posts above) price was 54.36/54.40, we had a position=7 with a PNL of -16K and we ad scalped away about 29K. Now it is lower 53.69/53.75, with a PNL of -7.1K and the scalps amount to 43K. So, you see, even if (and especially :) when) not going anywhere, and actually slightly down we are still actively stealing money, that is capturing the "horizontal" component of the price move. And that is what we are actually after, as in a non-predictive scalping/hedging we mainly "see" everything as "decomposed in horizontal moves".

    CL_10.png

    and in "player-view mode" (of the same layer), this "horizontal scalping" action becomes more evident in the "order clouds":

    CL_10Players.png

    ERY continues to hold the big position, and I am mostly using ERX and CL to hedge it when necessary.

    Overall we are (numbers coming from IB API):

    Code:
    NetLiquidation                926,873.78 USD                      [Min: 712,498.60, Max: 1,048,240.20]
    Δ NetLiquidation              -73,126.22 USD  -7.31%
    so recovered most of the nasty DD caused by the ERY options (a "vertical" move which we indulged in letting run "vertically" in order not to close the options with huge spread in this Dxxx accunt).

    PNL_8.png

    (The strange-looking PNL "spikes" in the curve, and the difference with IB computations are obviously mostly due to the weird and erratic quotes coming from the CL PUT 54 :) )

    We are doing ok: we have recovered almost all the worst DD and with a good "investment" on energy and oil. We need to hedge carefully against possible unfavorable moves, and keep into account the CL contango, not sparing short players on that layer anytime they look appropriate.
     
    Last edited: Jan 27, 2015
    #37     Jan 27, 2015
  8. Very tough day, today, with energy stocks hitting very hard. ERY spiked to the roof, and almost wiped out in minutes all we had on the manual ERY layer: PNL went from 94K to 16K pretty quickly:

    ERY_4.png

    I worked to hedge on a ERX layer with semiautomatic scalping in the 60' min window. While the feature in principle worked well (I got also some other ideas to improve it), I feel I have been using too small sizes for the protective players (hedging orders), and initially underestimated the magnitude of the danger. Having recognized the mistake, we have another thing learned for next time :)

    ERX_4.png

    Currently we are -16.81% under and this was a pretty serious blow. Not fatal yet :).
    It's also pretty irritating having 200K stuck in the infamous CL PUT 54, right now that we would need all our resources to "hold the helm". Anyway, let's see how it develops tomorrow.
     
    #38     Jan 28, 2015
  9. Good morning.
    We got in deeper troubles yesterday, with ERX and ERY shooting again intraday further down/up.

    It was difficult to hedge the huge ERY position from an already stressed situation of fund shortage. To make things even worse, we had a lump of money (200K) "locked" in the CL PUT 54 working against us, and, if that wasn't enough, DGAZ added further difficulties, as it added made the usual "trick": first shoot up wiping all the previous positive PNL and then started to fall in a non-shortable state: nice guy :) (As a "practical teaching" this tells us that when we start smelling troubles we should close everything is in profit and just focus on the problems.)

    I hedged in the 60' window, by injecting some players on ERX and CL layers, and letting the app close them by itself when possible.I also did some error in doing so, apparently making towards the end of the move orders too large and close which when the stock bounced back worked heavily against me.

    So one of those difficult days from which anyway I learnt a bit and I am even able to derive some wisdom or the future :) which I will list below.

    But first, let me respond to many of you who have contacted me privately essentially saying, with with very polite and amusing roundabout ways: you have done so much to automate all this, why do you keep messing so much with it ? :)
    You are, of course, right, but I do have some "excuses" for that :) . The excuses are, that once one introduces an excessive discretionary bias, as I did with the ERY options, then you are drawn in a sort of "perverse circle", where to hedge the problem, you need even more intervention. So there is an "original sin" :)


    The single most damaging factor

    What we learn from this is that, ideally, discretionary intervention should be limited to the "general vision" and, then, relatively small corrections and adjustments, and not injecting "lump of funds", which are, then, difficult to manage. In my experience so far, it looks like that the single most damaging action one can do is to allow a relatively too large position concentrate at one spot. Instead, what is most beneficiary, in the perspective of capturing the horizontal component, as a number of relatively small appropriately spaced orders which are better able to capture the price fluctuations.

    A "lump of money" concentrated "at one price spot", instead, causes in most cases a form of trading "inefficiency" which is then difficult to deal with, both algorithmically and discretionarily. So this seems to be a principle of general applicability. Note that as "corollary", this principle also strongly advises against stops and abrupt stop and reverse actions.

    Instead, what is usually effective is a smooth and continuous series of trading actions, tuned in a such a way that any further action (player) also serve the purpose to hedge precious losing actions (players).

    So let's keep that in mind for the future, as a fundamental guiding principle. Let's also give it a name, so we recall it better: maybe let's call it the "spot inefficiency", or the "lump of money inefficiency" :), or whatever you like.


    The "growth" factor

    Another excuse, is that when I am playing on a Dxxx account I am more inclined to experiment and search for more knowledge, and knowledge usually stems from thinking about mistakes and dealing with difficult and troublesome situations. So I do have a "creative bias", which pushes me (even subconsciously) to explore situations so that I can then derive solutions which then, once acquired, can be used routinely in an automated form. This is the way to evolve and go ahead, settling up everything there is to settle.


    A new "mechanism"

    For instance, one thing, that I definitely realized yesterday, was the fact that the protective players, need some more "persistence", in the sense that for extremely wild instruments like ERX what can be noted is that the current automation is closing too easily those players when the price has a little retracement, so often ending up with too many serial open/close, without really being able to "build up" a "protecting" position.

    So this has suggested, after some good night of sleep, and I have been adding it this early morning, the addition of a new mechanism, which essentially prevents the close of the players belonging to a certain phase (for instance the "protective" or the "reversion" players) until they form a position which is at least equal to some given fraction of the other side position.

    For instance, if am in "protecting" mode, and with a too large short position, I may want to gradually build up an opposite position and allow the close of these protective player, only after reaching some "critical" mass. So I have been adding this mechanism, and from some simulations I am running, it does seem quite useful and effective to have.

    So you see, that from a "creative" perspective, it is important for me to have the hands on the matter and even mess up a bit with it :) because in this way I can have a deeper understanding of what is then needed in real world applications to deal with all practical problems which can arise managing a real funds. Certainly, once some principles are established, there is no point in messing with them further, and do the opposite of what you have already established :)

    So just allow me some "creative and messing-up license", especially on Dxxx accounts, and once we have all principles and mechanisms well tuned and setup, let's be more methodical, especially in the application in Uxxx accounts :)

    So, remember: no abrupt actions. No "lumps of money" concentrated at one spot. That will never be good.


    Don't shoot for "vertical" moves

    Remember also that we are not after the "vertical" component of the moves, but we are after capturing the (possibly "nested") "horizontal" ones. So we should not really have a personal directional bias, but focus mostly on capturing fluctuations. What we need to be well aware of are, instead, the possible decays of instruments (eg. ultrashort instruments), drifts and contango, because we do not want them to work against us while scalping.

    In fact, if while you are focusing in the horizontal fluctuations, you have the price continuously "sliding down" (like the CL contango), you need somehow to adjust for that with a negative bias, or else this continue sliding down will eat all your scalping profits. So, while not shooting for vertical components, it is important to be aware of the long term drifts incorporated in the price curve.


    Finally, here is another trading idea. Thinking about CL, an useful approach could be the following. Assume that at a certain point the oil price is so low that you can only "expect" it will rise. Instead of being long do the following:

    --------
    CL trading idea (applicable, similarly, to other instruments)

    - CL: non-predictive scalping/hedging, with a short bias (even if expecting it will rise)
    - short CL PUTs (adequately OTM): scalp with short-only constraint
    - add a few protective (long) PUTs when necessary: these are picked "just OTM" and switched to full automation, short-only, with a take profit, when become sufficiently ITM)
    --------

    So, this will cause you to express the possibly personal "bullish" sentiment through the automated scalping on the short PUTs but continuously benefiting from time decay and contango from the underlying in the long term. And note that the contango and time decay are the real big players here and main forces in the mkt, which cannot be simply dismissed, or behave like if they were not working against you, if you hold a position against them, as they do work against you and do that in a systematic and inexorable way, there no scalping action will be ever able to counterbalance them in the long term :)


    On the practical side of our current test, the situation isn't particularly pretty :) with some -20% DD and a bit too many losses piled up on the ERX layer and a few liquidations that I need to re-sync. Anyway, I will let the bot work a bit more autonomously to pull me out of the troubles with this ERY/ERX situation, and when there are more funds available to focus on a patient recovery of the layers which have accumulated the larger losses:

    ERX_5.png

    I will also adopt to the above idea to trade CL, which seems more suitable, to focus to a on non-predictive approach, and less relying on directional moves :)
     
    Last edited: Jan 30, 2015
    #39     Jan 30, 2015
  10. It looks like that the large position on the ERY and the money locked in the CL PUT 54 are in practice making arduous to recover, with the available funds. In fact, even the favorable moves end up generating further losses because the lack of funds do not allow to close the position created for hedging on the ERX layer. This is, in practice, causing a simple "transfer" of the loss from an instrument to another (in this case from ERY to ERX).

    We can note here how the large ERY position is an example of violation of both the "principles" we have been mentioning in the previous post:

    - 1. Violates what we have called the "lump of money principle" because it's too much money allocated at one price;
    - 2. Violates the idea of scalping focusing on the "horizontal" moves, because a large sum on one spot has mostly directional consequences.

    So, this is a "double-size mistake :) A chunk of capital used in this way absorbs way too many useful resources which could be used for scalping, and it forces to take undue losses anytime the price goes against you. In addition, the same happens even if it goes in the right direction, because there may be not sufficient money to close the position on reversal on the hedging instrument. This way, in practice one is digging a ditch and burying himself in it :)

    This situation here is a bit extreme, but, in a smaller scale, it actually happens anytime we are trying to be after directional moves. For this reason, I believe that a "nonpredictive" approach is the one most reasonable, as it allows to look at any price move as a sequence of (possibly nested) horizontal levels, where there is a lot of money to be made on "fluctuations". Of course, on top of it one can always apply possible predictive models or personal expectations, in the form of discretionary actions, use of "biases", and so on.

    A purely directional view is instead imho counterproductive because you either have to use a very small fraction of your capital in directional bet (with essentially random outcome: PNL fluctuating around 0 + negative drift due to trading expenses) or, with larger bets, it tends to keep locked money in positions which, even when work in your direction, may still be able to create problems and one ends up not even making money on it. So it's important to "scatter" the allocation over the price range and operate in a dynamic fashion, getting in and out, with a continuous action of hedging on the "horizontal corridors".

    It's clearly a shift of vision that in most cases is not very intuitive, because most of the "conditioning" (even from a lot of misleading literature :) ) we have is to look at the market trying to spot directional moves ("trends"). This thread I think illustrates in practice pretty well this point. If we look at what is going on in the various layers, we can see for instance that I have closed in profit all the CL option layers (except, of course, the untradable one, CL PUT 54) and the main problem is being represented by a "lump of money" :) allocated on ERY, which is not being scalped but it's freely fluctuating with the market like a big hammer swinging on our head.

    That money could have been used much more efficiently in scalping activity with smaller position and little risk, and not being forced to take innumerable losses and liquidations.

    So, I think this is pretty illustrative of the suitability of the approach based on non-predictive scalping/hedging, where we look at each price move as a sequence of horizontal steps, which are possibly "nested". "Nested", in this case, means something like having a choppy market around some price level, then having a directional move down (for instance) and a choppy mkt at that level, and finally returning at the previous level above. In this case, we have 1 "horizontal moves ("first level") and 3 horizontal moves ("second level") which are nested in the previous level (clearly, a highly profitable configuration in our approach):

    HorizontalView.png

    Instead, these big "lumps of money" left fluctuating with the price direction are only source of problems and a very inefficient way to use the available funds.



    Breaking the "lump of money" :)


    Yesterday, reflecting on the "lump of money" issue, I focused another idea to deal with these situations, which I think can also be of general usefulness in a lot of situations. In the case of ERY, the big position has been created by me by opening a ridiculously large position on ERY options, and then moving the assigned shares on a manual layer. However, there are other cases where there might be an undue accumulation of money at one spot for various reasons.

    Examples of these reasons are the following:

    - A pre-existing large position which you are importing within the automated application ("position projection")
    - A reopen order of a rollover, transformed into an automated player
    - A manual order that you placed either by error, or because you wanted to be greedy and that you want to pass to the automated management
    - A liquidation made by the broker that you have transformed into a player
    [etc]

    Whatever is the reason, a large player at one spot is always cause of inefficiency and game disruption. Take for instance the 10.000 shares order on ERY (one resulting from one assignment), if we want the application to start trade automatically on this layer , so that we can start realizing something and not just taking hit with the directional moves, we can of course transform the order into a player (this is done with just 1 click), but the problem is that 1 player of size 10.000 is certainly going to create disruption in the automation, because its abnormal size.

    Now I focused a solution to this general problem. This is actually something which has been in the back of my mind for a while, but with the issues of this test I have been finally focusing on it.
    What we can do is to take any player which is "fat" and blatantly oversized and break it into pieces :) I am aware the idea can be a bit mind blowing when you first hear it, but I can envision it will be a useful feature. Now, what do I mean by "breaking" a player (open order) into pieces ?

    Well, I mean that I take the order and substitute, in place of it, say N smaller orders in such a way to keep both the global position and global average unchanged. For instance, assume you have create a big player, say of size n. The player is sitting there with its huge size and it's a problem to deal with it. Then we say, ok let's break it into pieces, each piece not larger than s shares and let's distribute the resulting players over the price range, appropriately spaced (for instance a x% of the avg fill price of the original player).

    So, for instance, what we can do is to create a number N of players equal to the ceiling of ( n / s ) and we allocate in the N-1 player the size s and in the N-th player either the size s, if n is divisible by, s or the remainder of the n/s division.

    Then, we take these N players and assign them an avg fill price in such a way that if we take all the players together, their combined (weighted) average is the same as the original player. This sounds like a pretty powerful idea, and on Monday we will try to apply it to the ERY layer so that we can take the entire layer and pass it to the bot instead of letting the huge position fluctuate with the instrument:

    UniformSplit.png

    As a practical example of this, look at the following preview (momentarily connected to the "demo" account, not paper trading). Let's take ERY and let's break it into pieces the large 10.000 shares player (I added a split feature with a small dialog to specify the size of the pieces and the distance between them). We start from this situation with the huge size players, and then we apply the splitting:

    OversizedPlayers.png


    thus obtaining something like this:


    SplitPlayers.png

    And same thing for the other big player (18.100 shares).

    Similarly, we can break also all the other players on any other layers which we feel are a bit large.



    Note also the "shift in logic"

    Looking at the split of the big player on ERY layer, it is also apparent that doing this, it also induces a noticeable change of the recovery "logic". You would remember that previously I had placed a few "enqueued orders" for later automatic execution (this was a, say, "semiautomated" solution). Those enqueued orders started from about 21 and when down.

    ERY_Enqueued.png

    This, however, has caused problems because the fluctuation of that huge position, before arriving to the point where we can start discharging it, can be is very harmful as it wipes out all the available funds.

    Now, instead, we are switching to full automation, and the split players which are created force also a different approach. In fact, what will happen is that the higher players now will tend to remain open unless the price goes up, while those just below the original player will immediately engage in automated scalping/hedging, without any further delay, thus possibly freeing resources for horizontal scalping at the various price levels. And actually this shift in logic seems in principle reasonable. Anyway, we will see how it will play out in our situation.
     
    Last edited: Feb 1, 2015
    #40     Feb 1, 2015