Algorithmic trading for hedge funds: hedging techniques and application to a folio

Discussion in 'Journals' started by fullautotrading, Jul 21, 2014.

  1. Today GDXJ closed several scalps. Also TNA harvested the results of the latest investments. This caused the PNL to rise a bit, even if the "investment" on ERY and TBT is mostly still all there, so we have a good , still unexpressed, "potential".

    PNL59.png

    GDXJ has taken the lead on PNL, and this was expected, due to the "relatively" long time passed near "exhaustion". Here is a screenshot of GDXJ (as usual, the top picture shows the open players only, while the bottom one, all orders):

    GDXJ_5.png
     
    Last edited: Sep 17, 2014
    #71     Sep 17, 2014
  2. Let make a small summary scheme on the "protective structures" we have been using so far. So it can be used as a "flashcard", for future reference. In the future we will refine it.

    Let's also, with the occasion, introduce some more "terms" so we know what we are referring to when we use them.

    In general, let's call a "protective option-share configuration" any combination of options and shares we might use to create our "scalping corridors" and thus bounding the possible "runaways".

    Possible examples we have been using of such configurations are (for the ETFs case):


    for Downward drift / short trading bias

    (upper zone or manager preference)
    + M CALL
    (scalping short biased)
    - N PUT
    - N * 100 shares


    (lower zone or manager preference)
    + M CALL
    (scalping short biased)
    - N CALL
    + N * 100 shares



    for Upward drift / long trading bias

    (upper zone or manager preference)
    -N PUT
    - N * 100 shares

    (scalping long biased)
    + M PUT

    (lower zone or manager preference)
    - N CALL
    + N * 100 shares

    (scalping long biased)
    + M PUT


    for no bias, bilateral scalping

    Any suitable superposition of the above unilateral configurations, and of course "neutral" scalping.


    When the "protective option-share configurations" have a structure like for instance those illustrated above, we call the positive position "defense options", the negative position "repay options", and the shares "cover shares". The manual layer where the cover shares are placed is called the "shares layer". Sometimes we call M/N the "defense-repay ratio".

    Note that an instrument can be traded with "biased scalping" (either on the long or short side), even if it does not present any "structural" drift. That is just a preference of the manager (It is probably preferable to trade "unilaterally" any instrument, for easier management). [Clearly, instruments that do have a "structural" drift cannot be scalped with a bias "opposite" to their drift, or the scalping action will ordinarily never be able to "catch up" the continuous runaway.]


    Rule to open

    We are currently using what we called the "10% rule of thumb", which means:

    Distance (between measured on the "shares layer"): 10% of the volatility figure
    Size (M): 10% of the "packet size" (which, as you will remember, also depends on volatility)
    Expiration: manager preference (usually something between 1 to 2 months or more, also depending on the size of the "corridor" one wishes to create)

    (Clearly, the strike selection of the options in the configurations and the M, N positions is automated in our case, but it could also be done completely manually if one wanted to.)

    In a next post I will also make a concise summary of the "maintenance actions" after expiration of the options of the protective structure.
     
    Last edited: Sep 17, 2014
    #72     Sep 17, 2014
  3. Today the PNL has increased a bit, due mainly to scalping activity of TZA and UNG, while the main "investment" (in TBT and ERY) is, mostly, all there. (Peaked at almost 21K.) Today added a new "protective configuration" to TNA. Usual type (put/-call)

    PNL60.png

    UNG has been keeping, so far, an almost "ideal" behavior, fluctuating in a relatively small range and thus easily capturing about 7K.

    UNG_3.png

    Tomorrow we will have a few options expiring, and in the weekend we will review the "option maintenance" actions, so we have a clear picture of what to do at expiration.
     
    Last edited: Sep 18, 2014
    #73     Sep 18, 2014
  4. On the scalping logic side, these last few days I have also been doing some more refinements to the player spacing algorithm. In fact, watching the entries, it appeared useful to have the possibility to specify 2 different rules for spacing from players that are above or below the new player being created. This is more evident for the "scalping-reversing" and "hedging-protecting" phases, where it appears nice to have a finer control on player spacing.
     
    #74     Sep 18, 2014
  5. End of the week. Today we spiked to a new PNL height (22.K) to end up about where we were yesterday, apart that the G-L (Gain - Loss) has also reached a new high value (which denotes a good "potential"). GDXJ has definitely taken the lead touching a max PNL of 19K. We also had 7 options expiring, so we will make some "maintenance" during the weekend. At this time the application is still "in sync" with the account, so we will review the situation when the broker removes the options and makes the trade report. Apparently anything expired OTM, so we will not have much to do this time.

    PNL61.png
     
    #75     Sep 19, 2014
  6. Let's do some maintenance for the expired options. As said, we had 7 options expiring on friday. They all expired OTM, so no PNL "adjustment" is needed. I also double checked with the IB trade report and everything matches to the last penny. So we have actually nothing (like for instance re-syncing the shares) to do, except of course, for the short option (-4 ERY, -1 TBT), to close the "cover shares" which were open with the "protective configuration", and remove the expired layers. We will do that when the market opens.

    ExpiredOTM3.png

    In a next post I will make a "flashcard" to summarize the actions we need to carry out for option maintenance after expiration, for all possible cases.
     
    #76     Sep 21, 2014
  7. The week has started with a significant rise of ERY and TZA, which have pulled the PNL in the "underwater world". The RegT margin did not help at all, taking way too much margin (with "portfolio margin" requirements can be about 1/4) and thus annoyingly blocking some of the scalping activity. TNA also loaded a good position (all the 14K it made before have been absorbed in a new "investment"). There seems to be still too much correlation, which is more evident in these drawdown phases. (I will probably remove TZA when it returns positive). To recover some margin, I flattened UCO, and I will resume it later.
    Also, added options to GDXJ (-12 call 42/-3 call 35, +300 shares).

    PNL64.png
     
    Last edited: Sep 22, 2014
    #77     Sep 22, 2014
  8. Today and yesterday we have been continuing loading and scalping on ERY, TZA, TBT and TNA. The RegT margin in this case has been very annoying because has deprived us of a good number of large scalps (and profits), due to new orders being blocked. This shows clearly in the G-L (Gain - Loss) curve, where we can see a significant plunge (hedging orders) and only a late partial recover (the recover happens when the prices moves in such a way to free money resources and allow the new orders to execute). Clearly, this is quite inconvenient, but since it appears we cannot switch to portfolio margin (I think this should be allowed in test accounts), we need to deal with that. To recover some margin I temporarily flattened UCO, UNG and GDXJ. So, in application with real $$$, always use portfolio margin (https://www.interactivebrokers.com/en/?f=/en/software/pdfhighlights/PDF-PortfolioMargin.php?ib_entity=llc).

    Another annoying factor encountered is that some instruments are not shortable (ERY today and TBT yesterday), which of course causes significant problems with the scalping activity. In particular, the problem is that if, for instance, you have hedged a move up with buy players, you may remain "locked" in the position, without the possibility to place sell players on reverse, which of course prevents the possibility to make the deserved profit (for this reason the app has the option to block new buy players as long as an instrument is not shortable).

    PNL66.png

    Clearly some of the above problems would disappear trading futures, but then an even bigger problem might arise in many accounts (under-capitalization).

    Yesterday I added a few more options on TNA and GDXJ. Playing with all different "option configurations" is quite useful to get a practical feeling about usage. (In particular it is useful to look at the manual "shares layer" to be guided to place new configurations. In practice on this layer we should be seeing in the long term a meaningful scalping pattern, created by all the "cover shares" used in the protective configurations.)

    So far, it seems to me the hedging action of the options has more a psychological value than anything else, while the major source of immediate hedging has been given by the player superposition. [Psychology is of course crucial too, because no application or strategic approach can cope with a manager (or investor) who has psychological issues with the investment phase, and unplugs the machine in a "load" phase. One thing that many traders do not seem to realize that making money by trading is not a natural and intuitive process, but it does require to overcome some psychological difficulties, and one has to clearly get used to that. And I think that options can be quite valuable in this regard.]

    I also believe that the expiration has to be chosen a bit farther in the future. Less than 2 months appears to be too short time. For the next configurations I will try to pick expirations more far away.
     
    Last edited: Sep 24, 2014
    #78     Sep 24, 2014
  9. End of the week. We are still in the middle of an "investment" phase, with a good "load" on ERY, TNA, and TZA. Yesterday, since TBT turned positive (almost 5K) and margin hitting the (RegT) limit, I preferred to "flatten" TBT in order to be able to continue scalping with the other instruments. Another reason is that anyway it's pretty correlated with some of the other instruments, so there was no much point in keeping it active. The situation is fine and as expected. TZA could actually be removed as when there are large moves it practically mirrors TNA, so there is no much point in keeping them both. I will remove it later, when it returns positive.

    Today we also had a few options expiring and we will see those in detail in a next post.

    PNL68.png
     
    Last edited: Sep 26, 2014
    #79     Sep 26, 2014
  10. Still in the middle of an "investment" phase, with a "load" on ERY, TNA, and TZA, we are at about 12% drawdown. RegT margin is preventing a lot of good scalps, anyway the application is able to deal optimally with the rejections due to the strict margin requirements, either automatically reducing the order sizes (when price reversing) or placing new hedging players (when price moving in the "load" direction). [To recover some margin I have temporarily "flattened" UNG, which anyway is not moving much.]

    I have also removed the layers of the expired options, which were:

    Code:
    -- OTM Long --  (do nothing)
    
    GDXJ  CALL 47.5     (closing price automatically set = 0)
    GDXJ  CALL 48.5     (closing price automatically set = 0)
    TBT   CALL 58.5     (closing price automatically set = 0)
    TNA   PUT 64        (closing price automatically set = 0)
    
    -- OTM short -- (close "cover shares")
    
    TNA CALL 77        (closing price automatically set = 0)
    TBT PUT 54         (closing price automatically set = 0)
    
    -- ITM short -- (resync)
    
    GDXJ PUT 40         (set closing price = 0, "virtual fill" +100 @ 40)
    GDXJ PUT 41.5       (set closing price = 0, "virtual fill" +100 @ 41.5)
     
    Last edited: Sep 30, 2014
    #80     Sep 30, 2014