Hi fullautotrading, could you please express in a few sentences (no formulas) what PosAbs and Avg aim to capture? >"PosAbs" := Current (absolute) Position >"Avg" := Current Average I can follow the mathematics but I cannot understand what type of concepts are used to qualify the status of the player? One could be related with the absolute exposition and the other with the average fill price? but why are they important? Thanks!
Hi AItrader, >One could be related with the absolute exposition and the other with the average fill price? That's right. Let's simplify drastically in such a way that there is a 1-1 correspondence between orders and players. So, for sake of explanation, let's say that, for instance: open a T BUY Player = make a BUY order, say 100 shares close that T BUY Player = make a SELL order, say 100 shares Now what I have been calling the <b>Avg</b> of the T BUY player would be the fill price of the buy order and the <b>PosAbs</b> would be the number of shares filled: T BUY player Avg = fill price of the buy order T BUY player Position = quantity filled when the buy order is executed So, the virtual players, in essence hold the essential information about fills. Each one holds essentially the number of shares (or contracts) filled and the average fill price (in the actual implementation, of course, they hold a lot more information, but for the moment we can just disregard it). >why are they important? Clearly, this information is important, as if you could not keep track of all your fills and filled quantities, you could not trade at all. This is an extreme simplification, but should convey the essential information. Let me know if something is not clear.
Here is a quick folio update. Later I will tell more on the GASX "tale" and how I have coped with the situation. FAS is still "locked" and fine. Placing the "option unit" to defend it against the bubble turned out to be a good move. We are proceeding with a <b>relative drift</b> (RD) of 28.82%, which would be nice (although not much realistic) to keep at that level. The <b>daily net gain</b> is now almost $500 (including holidays). We need to wait for the "major investments" to turn into profit. We still have a good deal of $$$ invested in the metals and gas, which have to come back home <img src="http://www.elitetrader.com/vb/attachment.php?s=&postid=3917236" /> Noticed that DRN (DIREXION DLY REAL EST BULL3X) has an ex-dividend date Ex date on Mon 23 Dec 2013. So I flattened it momentary placing an "offsetting" player on a new layer. I will probably close the "flattening" player on Monday, or whenever in profit, and then normally resume the game. Remember: we don't take prisoners [The funny thing is that I added the player (+424 shares) to avoid paying the dividend, but at market closed it was in profit of more that 100 bucks ) Well, we have to see if it gaps down Monday.] There is another "guy" with ex date on monday, but we are long on that: IYR (ISHARES US REAL ESTATE), dividend: 0.60 (0.95%). We have 100 shares, so 60 bucks. So far the most nice guys have been: VXX (**) DGAZ (**) ERX ERY (**) FAZ (*) UVXY (**) TVIX (**) GLL (**) ZSL (**) UCO (*) GASX (**) (**) = short position constraint This week I have been doing some game enhancements. Looks like the order sizing is one of the most crucial factors in the scalping /hedging game effectiveness. Later we will see some more "theory".
Last trading day of the year. Here is a quick folio update. Everything is going according to plans. We begin to see some glimpse of the sky, from the "underwater" world <img src="http://www.elitetrader.com/vb/attachment.php?s=&postid=3921098" /> Happy New Year to all, and may it bring a lot of new $$$, gratifications and happiness.
First trading day of the year. Pretty busy. The application started sending out dozens of orders since premarket, and we have started taking the fruits of our investment in oil and metals. FAS is still locked but I added an additional 100 shares short protected with an additional "option unit" (in a next post i will show how in more detail). I had to hedge GASX, giving up almost 4K, but they are "stored" in the "layer memory", and they are just "postponed" in my view. Here we begin to see a glimpse of the <b>sheer power of a "statistical drift"</b>. Clearly, just as illustrated (just by analogy) by the so-called Kelly criterion, one could spoil everything by letting some "runner" go to far, but we are carefully supervising the game. That's all a manager has to do, after all. 78 days so far. 97 active layers. We are running with a "relative drift" (RD) of 18.54% and HI ("hedging intensity") of 109%. We just got pulled up "above the water" of about 17K, and have made a gift to IB of over 4K in commissions (are we not entitled for a discount ?) Over 360,000 shares traded. Margin usage is currently below half of the init capital (201K). <img src="http://www.elitetrader.com/vb/attachment.php?s=&postid=3921833" /> Removed layers: XOP STK SMART PNL: 38.63, comms: 4.35 XLB STK ARCA PNL: 14.47, comms: 3.03 XHB STK ARCA PNL: 40.43, comms: 8.81 VXX STK SMART_USD PNL: 41.18, comms: 6.35 UVXY STK SMART PNL: 206.42, comms: 14.74 TQQQ STK SMART PNL: 195.70, comms: 28.60 SQQQ STK SMART_L1 PNL: 26.52, comms: 4.10 SQQQ STK SMART PNL: 22.32, comms: 4.58 QLD STK SMART PNL: 17.84, comms: 4.38 PNR STK SMART_USD PNL: 6.98, comms: 1.42 OIH STK SMART PNL: 5.08, comms: 1.52 IYR STK SMART_L1 PNL: 12.26, comms: 1.54 GASX STK SMART_L3 PNL: 479.81, comms: 6.39 FAS STK SMART_USD PNL: 28.43, comms: 5.91 ERX STK SMART_L2 PNL: 222.30, comms: 7.20 EEM STK ARCA_USD_L1 PNL: 6.62, comms: 1.38 DIA STK SMART PNL: 5.02, comms: 1.46 CVX STK SMART PNL: 9.82, comms: 1.46 FAS OPT 20131122 81 C SMART 100 PNL: 236.93, comms: 1.07 FAS OPT 20131122 88 C SMART 100 PNL: -207.65, comms: 3.65 UVXY STK SMART PNL: 20.39, comms: 2.07
As promised, let's explain a bit what I did about FAS. We left it "locked" with -400 shares and an "option unit" formed by a combination of CALLs and PUTs to provide some "protection" against the developing "bubble". The intention was to leave it there until either expiration of price falling to the lower strike. However, since I saw lately some of the investment we made to slowly come back with profits and noticing the very high price of FAS, I decided that it would be nice to take some of the profit of the possible long players on FAS. So I decided to close <b>one of the long players (one with 100 share)</b> in order to realize about 540 bucks. So, practically, we go from -400 shares short to -500, and we need to accordingly add some more options. To add the options this time I did not use the automatic option scanner we have seen last time, but a <b>new feature</b> I added during the holidays. This is a <b>manual option add/execute facility</b> which, respect to the automated scanner, offers, imho, some more flexibility of use. In fact, in this case the "option unit" can be formed by an <b>*arbitrary*</b> number of CALLs and PUTs and they could also have mixed (different) expiration dates. I find this new feature quite handy, and I am pretty happy about it. In the pictures below you can see it. Picture 1: Selecting options to be placed in the "protective structure" Picture 2: Adding the options and executing the buy/sell orders (call 92 +1 @ 2.34, put 75 -1 @ .58, put 84 -1 @ 1.9 ). Selecting the long player (100 shares) and forcing it to close. Remember that to open the player dialog, just click on the player symbol (circle or square) while in "player view" mode) Picture 3: You can see here the order resulting from the player close (-100 shares) on a FAS layer Picture 4: Current FAS situation, as directly resulting from the "account view" (updates sent by IB via API). We are short -500, with several options in place. <img src="http://www.elitetrader.com/vb/attachment.php?s=&postid=3921940" />
These simulations appear to be overloaded with commissions. Find more strategic positions to take so that you aren't hedging so often. It's way overdone with the way that the hedging basically does so if there is "any" drawdown when you should be only doing that with "too much" drawdown.
Hi bwolinsky, thank you for your kind comments and suggestions. Note that these are *not* simulations. We are trading <b>real $$$</b> on a <b>real account</b>. All you see here is real. Well, I have <b>97 layers</b> open, and so far I have bothered hedging just 2 instruments! It does not seem too much hedging at all. I would rather say, it's too little hedging, and a more prudential approach would entail to "protect" *each* instrument, at early time, even before starting scalping it. But of course, this is up to the fund manager, and anyone can hedge as he prefers. That is why I (and probably you too) smile when people ask me about performances and CAGR. They seem to forget that the algorithmic engine is just 1 component of the system.
<b>Strategic entry injector</b> For the fund managers who are starting using/testing my app and are relatively new to it, let me provide some everyday use tips. One feature which turns to be pretty useful either when creating a scalping game, or supervising it, is the "strategic entry injector". This is accessed by clicking on the blue/red ball icon on the trading monitor. It allows to "inject" <b>new players</b> which will be dealt with algorithmically. There are many ways to use this feature, and indeed very little to abuse it as the application (and the current game) will always correct any "mistake" you will make, and actually the corrected orders will usually turn into extra scalping profits. Especially when creating new games and reasoning on the desired scalping/hedging logic, the possibility to inject entries (new players) turns out to be very valuable. <img src="http://www.elitetrader.com/vb/attachment.php?s=&postid=3922107" />
<b>More about the SDX</b> Let's end the week with some "theory", so you can think a bit about it, and come out with more ideas. It's now some time since I have proposed the <b>Direction</b> (SDX) and <b>Codirection</b> (SCX) indices (to detect "correlations", beyond linearity), but I still receive a significant number of emails from people around the world, asking details on how to compute them. In a previous post I have explained how to possibly use the <b>SDX "divergence"</b> to provide a realtime description of some situations of possible interest happening on the price curve. Making a step back, let me recap below in a concise way, in a picture (taken from my page: <a href="http://www.datatime.eu/public/gbot/MetricsForAlgorithmicTrading.htm" target ="_blank">http://www.datatime.eu/public/gbot/MetricsForAlgorithmicTrading.htm</a>), the SDX definition and actual computation. <img src="http://www.datatime.eu/public/gbot/SDX_Recap.jpg" /> (The "names" of the variants are immaterial, those indicated in the picture are currently used in the application, but they may change anytime.) Remember that the "HitList" contains the times and prices (T<sub>j</sub>, P<sub>j</sub>), j=0, ..., H, when different <b>price grid lines</b> are hit by the price curve of an instrument: ( (T<sub>0</sub>, P<sub>0</sub>) , ... , (T<sub>H</sub>, P<sub>H</sub>) ) This is a "trailing list", in the sense that its size is dynamically kept not exceeding a given size H+1, and the older observations in excess are dynamically trimmed away, as the time advances and price curve evolves. Most people seem to have an initial difficulty getting that the SDX is not computed on the original "HitList", but, in general, on a "resampled" (downsampled) list obtained from the HitList. So, when we write SDX<sub>R</sub>(H) it is meant an SDX computed on a resampled array of size R+1 (that is, considering R price differences) obtained from an HitList of max size H+1 (that is, having at most H consecutive price changes), where R <= H (H+1 is the "trim size" of the HitList. Clearly, there is no resampling as long as H <= R. The reason why the SDX is always computed on a resampled array of size (R+1) is primarily to <b>allow comparisons</b> between SDXs on different timespans. It's not exceedingly important what R you choose (that would depend on the desired trading "frequency"), but once you have chosen it, it has to remain the same for all the SDX's you compute or compare (especially for the purpose of computing divergences or making other comparisons). (Personally, I am currently using R=10, for my purposes.) (The more profound reason, from a math point of view, is that SDX<sub>R</sub>(H) would almost surely converge to 0 as R (and H) diverge.) From experience, I can tell that the SDX<sub>R</sub>(H) is <b>extremely sensitive and effective</b> - especially when the tickdata microstructure is "dense" (liquid instruments with high tickrate) and "drive" it well - and proves to be very valuable to create very dynamic scalping hedging games and <b>instantly react</b> realtime to any mkt move, without being fooled around by "noise", by immediately placing orders to either "capture" the move or hedge, depending on the situation and the order cloud. (As a personal side note, always remember that, I am not attributing to these descriptive tools any "predictive" or absolute value, outside of a meaningful architecture.) That said, of course, anyone can use it as he likes