Let's see how the algorithmic trading is developing. The following 2 pictures summarize the current situation. You can see we have developed a gain in excess to the loss of about 7.5K at this moment (about 40 days), so with a daily average of about $ 185. The drift is probably excessive. A result of too little and a bit late hedging (which I am going to correct at game level, for the future). If you are wondering: <b>where all the money we have scalped away is gone ?</b>, look at the second picture which shows the current PNLs for each layer. <img src="http://www.elitetrader.com/vb/attachment.php?s=&postid=3905902" /> There is currently some folio unbalance, with too much money invested in FAS. Not an ideal prospective being short on FAS on a mkt which seems to have forgotten what reversion is The other instruments with a load do not concern me at the moment. I can wait to see how they develop. The position on FAS is -390 shares. Quite uncomfortable at this time. In the next post I will show what I have just done to hedge that, and explain the rationale. In the meantime, think what you would do, and feel free to discuss your various proposals with pros and cons.
<b>DEALING WITH OPTION EXPIRATION: HOW TO CONVERT THE EXPIRED OPTIONS INTO POSITIONS TO BE DEALT WITH AUTOMATICALLY</b> Before addressing the FAS hedging topic, let me clarify how to deal with expired options within the algorithmic system. <b> General introduction </b> You will remember that earlier (Fri 18 Oct 2013) we introduced, as an "hedging exercise", some FAS options. Those options were: a CALL 88 (we bought 3 each at price 0.68) a PUT 81 (we sold 1 at price 2.38) <img src="http://www.elitetrader.com/vb/attachment.php?s=&postid=3907203" /> In my (made up) terminology, these options form an "<b>option unit</b>". Protections units can be created by using an automated facility, that automatically selects the optimal pair (by scanning the entire chain of options) based on the fund manager's preferences, such as expiry date and general "structure" of the "option (protection) unit". An "option protection unit" can be of one of the following basic types (or structures): <i>Protection against price surge</i>: +N CALLs -M CALL +N CALLs -M PUTs <i>Protection against price plunge</i>: -M PUTs +N PUTs -M CALLs +N PUTs In these units, the "+" options provide "protection" (I call them "defense options"). The "-" options provide provide a "repay" for the <b>time decay</b> of the defense options (I call them "decay-repay options"). So, within this scheme, the structure 3 CALL 88 / -1 PUT 81 was the first type listed above (we will see different structures in action, later on). <b>DEALING WITH EXPIRATION</b> Now, when those options expire, we may have 3 main possibilities: - They expire both OTM (out of the money). In such a case, we do not need to do anything: the application will automatically retain the small profit we have planned by design when we defined the option unit. - The short options expire ITM (in the money), and the long options expire OTM. - Both expire ITM. These cases are all pretty easy to deal with. Let consider, for instance, what happened in our example above: +3 CALL 88 @ 0.68 -1 PUT 81 @ 2.38 We had, at expiration (22 Nov 2013), the underlying price (as last reported by IB) at 85.4, between the strikes so we got assigned on the short option and therefore [since these options are not cash-settled (like VIX options)], we have a corresponding new short position (-100 shares) appearing in our IB account. So we get additional -100 shares in our "physical" account. Now, we remember that <b>the whole point of the algorithmic system is to not accept any "definitive loss", but to keep track of ALL of them and possibly "resolve" later them into profit</b>, if possible. So how do we transform this result of being assigned into a position which is dealt with automatically by the application ? This is done in just a second by using a feature of the application which allows to <b>transform the -100 shares at 81 (+ comms) into either a T or CT player</b>, which the application will integrate into the current trading and will deal with just as all the other automated players. This way, we don't "forget about the loss", but it is <b>fully integrated into the algorithmic treatment</b>. (In the next post I will show a picture and detail of that.)
It has been brought to my attention that I erroneously wrote (and also copy/pasted) in the previous post: "-1 PUT 81 @ 2.38" while we we are obviously talking of a CALL (as shown in the picture) and the -100 shares are obviously due to the CALL expired in the money: "-1 CALL 81 @ 2.38" So take into account this correction throughout the post
Thank you elitetradesman, just my own application (those discussed in this thread are all original concepts). [In case you are interested, you can get it (free) from my website (just google the app name + "algorithmic trading") and trade along with us (on paper trading) if you wish.]
<b>ADDING a VIRTUAL PLAYER to keep track of expired options</b> So let's see how to add a "virtual player" to keep track of the loss of the option unit, and the rationale of that. In our example, we had 1 CALL 81 sold at 2.38 (1.07 comms) and 3 CALLs 88 bought at 0.68 (3.65 comms). Note that IF they had expired both out of the money (OTM) we would have (let's call this "OTM Profit"): "OTM Profit" := premium received - premium paid - comms = ( 2.38 * 1 * 100 - 0.68 * 3 * 100 ) - (1.07 + 3.65) = ( 2.38 * 100 - 2.04 * 100 ) - 4.72 = ( 238 - 204 ) - 4.72 = 34 - 4.72 = 29.27 [The positive figure is "by design", as the "option placer" in the application always create a "protective unit" which yields a small positive value for OTM expiry. We will see that in detail in the next posts.] Now in the general case (including what happened in our case) what we get (for CALL options) for the loss at expiry time (when the underlying price was undrl = 85.04) is: ( 2.38 - max(0, undrl-strike1) ) * 1 * 100 - ( 0.68 - max(0, undrl-strike2) ) * 3 * 100 - (1.07 + 3.65) = ( 2.38 - max(0, 85.04 - 81) ) * 1 * 100 - ( 0.68 - max(0, 85.04 - 88) ) * 3 * 100 - 4.72 = ( 2.38 - 4.04 ) * 1 * 100 - 204 - 4.72 = (-166 - 204) - 4.72 = = -370 - 4.72 = -374.72 Clearly, due to assignment, this "loss" is actually currently "running" and its value can be obtained, at any instant, by replacing in the above undrl with the current ask price (which is now above 81): = ( 2.38 - (CurrPrice - 81) ) * 100 - 204 - 4.72 So, we have in essence -100 FAS shares @ 81 (assignment) which need to be "rolled back", in order to recover the "running loss". For this reason, we simply place a player at 81, so that when it ever closes at some price (81 - Δ we return to our planned "OTM Profit" plus the scalp value: "OTM Profit" + Δ * 100 - comms in other words, it would be the same thing "as if" the options would have expired out of the money and, in addition, we made a positive scalp from 81. In essence, we need "to roll back" the assignment of -100 shares at 81: so we just place a player at that price awaiting to take profit. This is a general simple solution to the need of keeping track of ("temporary") losses created by option units, which can be used anytime at least one option expires ITM. (For PUTs it's just the same, except that the position we add would obviously be long.) If both expire OTM, there no need to do anything at all. <b>ACTUALLY ADDING THE PLAYER</b> So let's simply add a player @ 81 in the application. This is done immediately by clicking on the context menu and selecting the item "Project a virtual ...". <img src="http://www.elitetrader.com/vb/attachment.php?s=&postid=3907547" /> It may also be "cleaner" to create a <b>new layer</b> for just this player (or all players arising from option usage). (The player added, or even the entire layer, could also optionally be let in "manual mode", in case we would wish to close it manually sometime in the future.)
Before going into the FAS hedging question, that you at this point have already guessed from the screenshots is based on options, let me make a quick introduction to the concept of protecting with options within the algorithmic system. We have already seen, in the previous post, how to deal with expired option to fully <b>integrate them within the algorithm</b>, I have to explain however a bit how we use and choose the options in the first place. <b>WHAT IS AN "OPTION PROTECTION UNIT" ?</b> In its simplest form a "protection unit" (a made up term) is formed by a pair of options with same expiry which are sold and bought simultaneously in possibly different quantities, N and M, in such a way that the options being sold are able to "repay" the time decay of the options which are being bought. So, as anticipated in a previous post, we can have: <i>Protection against price increase</i>: 1) +N CALL1s/ -M CALL2s 2) +N CALLs / -M PUTs <i>Protection against price decrease</i>: 3) -M PUT1s / +N PUT2s 4) -M CALLs / +N PUTs The conditions ("time decay repay") obviously are respectively: 1) (M * CALL2 Bidprice - N * CALL1 Askprice) * Multiplier > UserThreshold 2) (M * PUT Bidprice - N * CALL Askprice ) * Multiplier > UserThreshold 3) (M * PUT1 Bidprice - N * PUT2 Askprice ) * Multiplier > UserThreshold 4) (M * CALL Bidprice - N * PUT Askprice ) * Multiplier > UserThreshold where the "UserThreshold" can be any positive (small) amount (eg. $20). Such pairs are automatically identified by the application, by scanning the entire option chains and finding the optimal pairs, matching the structure chosen by the fund manager. So one does not need to worry about that, apart, of course, understanding the meaning of the structure . (I will show the automatic retrieval in detail in a next post). <b>HOW ABOUT EXPIRATION DATES ? </b> Expiration dates are left at the preference of the fund manager. In very general terms, my current opinion is that for the units which use the same types of options such as: +N CALL1s / -M CALL2s and -M PUT1s / +N PUT2s you generally want to pick a rather far away expiration date, because you need to give the price time to possibly travel toward the far away strike. On the contrary, for the protection units which use calls and puts together such as: +N CALLs / -M PUTs and -M CALLs / +N PUTs you generally want to pick a closer date, for just the opposite reason. <b> WHEN TO USE OPTIONS VERSUS THE "HEDGING ENTRIES" ? </b> First of all, both forms of protection can be used at the same time. So one does not exclude the other one. However, sometimes one might like to "load up" a bigger position on one direction, avoiding too much hedging and at the same time protect with options. Clearly, the possible reversal might bring in much more $$$ than the case where we allow hedging entries, which could reduce significantly the possibility to make $$$ from a reversal. It's pretty much a fund manager's preference, and it may also depend on the very nature of the instrument one is dealing with and its structural characteristics. For instance, it's not advisable to allow an inverse 2X/3X ETF to load up a big LONG, long term position, unless you have suicidal tendencies ,and so on. If instead you are hedging a short position of an instrument such as VXX, options might be an appealing choice, imho (in that case in the configuration N CALL1/M CALL2, for instance). In case one wishes to protect an instrument with options alone, the "hedging entries" could even be disabled altogether (this is an option of the "layer settings"). <b> REAL-WORLD EXAMPLE </b> A practical example is immediately offered by our FAS case. We had about -400 shares short that needed to be hedged. Wanting to resort to options, we might for instance choose one of the configurations 1) or 2), suitable to protect a big short position. I chose in this case +4 CALLs 85 / -8 PUTs 72. The main reason for this choice is that, in case of assignment, I prefer to deal with the problem of having 800 shares long at a lower price (after having recovered completely the current DD of the instrument), instead of having additional shares short at an higher price and more DD. (Also, if that should happen, I would probably rather move the +800 shares long resulting from assignment as a short load on an inverse instrument such as VXX, which is in practice "eaten alive" by the daily compounding effect and ETF decay, which certainly helps a lot closing short scalps). If, instead, the price remains within the 2 strikes we simply continue scalping, and we are protected "for free" (as the call options time decay is being "financed" by the puts). <img src="http://www.elitetrader.com/vb/attachment.php?s=&postid=3907886" /> [In the next post I will explain how to automatically pick up these "option units" using the "<b>option placer</b>" within the application.] Feel free to make questions or suggestions for improvements.
This weekend have been playing with some new features which improve the usability of the trading application. On the "cosmetic" side, I have added the possibility to zoom in/out the trading monitor so it's possible to have a closer look at the orders. More importantly, I have added a feature which allows to keep into account the PNL of <b>removed layers</b> in the running equity curve. In fact, as you may have noticed each instance of the application is completely <b>self-contained</b> and keeps track of its own PNL to the penny. This allows, of course, to <b>overlay multiple instances</b> of the application (that is, multiple clients) over the same or multiple linked accounts, and, thus, also trade distinct multiple folios on the same (or multiple accounts). Each instance has the capability to stay accurate to the penny and also to check (and adjust when necessary) the <b>position synchronization</b> with the account being traded. So far the PNL was computed on the layers currently loaded in each instance. Now I am keeping track also of all removed layers (pnl/gain/loss/comms), so that the equity curve can come out without the "gaps" and "mutilations" due to layer removals. In practice, I am translating, at removal time, all the equity curves of the respective amounts removed, so that the shapes are preserved. This will come handy in our test, as I wish to get rid of a few layers that I am not using anymore, but, at the same time, did not wish to spoil the shape of the equity curves. <img src="http://www.elitetrader.com/vb/attachment.php?s=&postid=3908145" />
Hi fullautotrading, thank you for your interesting thread. I am very impressed about the quality and advance features of G-bot and about your decision to post a live trading journal. It takes a lot of courage as it is a real test on out of sample data. Please keep up posting (daily maybe ) how G-bot is doing on the live account that you mentioned at the beginning of this thread. I am sure that each day trading session is full of real challenging trading situations that you can comment on to explain how your methodology has been successfully applied to. Thanks.
Hi AItrader, thank you for your kind words. Actually the one who needs to be praised for his courage and vision is our investor Lately I am not posting as frequently as I would like, as the software updates (and some other research) are absorbing a lot of effort and time, but I will try to catch up. Yesterday the metals took a big hit (see for instance: http://www.silverseek.com/article/december-2-gold-and-silver-fall-over-2-and-4-12744 and this comment: http://www.silverseek.com/article/odds-default-12742), so we had a load on the corresponding layers (ZSL, SLV, GLD, GLL, DZZ, DGLD). The FAS drawdown (which at a point reached -1.9K on a layer), on the other hand has been partially reabsorbed, and actually today the instrument price plunged even below 81 (where, as you remember, we had the option strike and the "virtual player" with -100 shares). Now it is about 81.33. So we have now to shift our "attention" on those metals and hedge the position. In the meantime, I have removed the layers which were positive (PNL>=0) and with no player open (so no "losses" waiting to be "recycled"), in order to simplify the management and focus on the remaining ones (the values removed remains anyway stored within the application). See picture below for current folio situation. <img src="http://www.elitetrader.com/vb/attachment.php?s=&postid=3909271" /> As a general consideration, it turns out the 3X (like DRN, ZSL, DGLD, ...) are not much comfortable to trade, as they present very scarce retracements/small fluctuations, and large moves which almost immediately triggers hedging entries (GASX is perhaps the most manageable among those beasts). So far the most pleasing has been ERX and other energy related stuff.