Our PNL curve still fluctuating about there. Wheat ZW is momentarily pulling down quite violently: Crude oil (CL) has shifted most volume to the front month contract CLZ5, so any time from now is good to make the rollover. Preferably, I would wait to be "flat" (should that happen by chance today), so that I just do the "information transfer", or else I need to make also the actual rollover orders (which is no big deal anyway). Silver SI is still up relative to our entry point, we will see if it continue its run or it will momentarily reverse (my guess would rather be for the latter). If it continues for good, we will start a new set of layers.
> I need to make also the actual rollover orders I thought you were fully automated ['fullautotrading']. Why are do you need to 'make rollover orders' (or any other orders)?
Thank you for your useful question debitspread. We work with several "layers" because we wish to gradually populate all the price range, thus gradually spreading our capital all over the place. For instance, you might have, as we have currently have now, 6 layers for CLX5 alone. When you need to move your trading activity a next contract, such as CLZ5 for instance, you may need or not a "real" order to roll over your position. If the algebraic sum of positions of all layers is 0 you don't need any order: you just transfer all the information about the players (which of course is the most important thing which needs to be "transferred"), for each layer. If, instead, the rollover is done when such a sum is positive or negative (so there is an actual position in the "underlying account"), the rollover procedure includes also placing the actual orders. The process of "rolling over" and information transfer, imho, is better left to the fund manager as it may involve some preferences on the timing as well as unexpected things to be taken into consideration (eg., external orders, liquidations by the broker, etc.) and should not be too much work for him, as it takes only about 30 seconds at most once a month (or every 3 months for stuff like ES, NQ, YM, NKD, FX futs, ...). Of course, there is no problem in automating everything one wishes to, and I am usually quicker to write the code than to reply to people asking for a significant feature: usually it's just matter of common sense what degrees of freedom and control to leave to the fund manager. And, of course, also common sense evolves in time . Also keep in mind, that the same instrument could also be traded by multiple independent instances of the application (although I would advise against, as said in a previous post), not to mention that the same account might be subject to some additional "external" trading activity carried out by other means, including broker liquidations, so it's just much safer to leave this aspect to the fund manager who can have a global vision of all what is going on.
The situation looks ok this morning. I have rolled CL to the contract CLZ5. SIZ5 does not seem to break up significantly, so, for now, we do not create new layers for it. NQZ5 and YM have accumulated some DD, due to absence of "fluctuations" in the last few days and the mkt going up. It's interesting to note how instead ESZ5 if fine. This may seem contradictory as ES, YM and NQ are strongly correlated. The explanation for that is that we started trading ES earlier, and the price could form some fluctuations which instead are not present in NQ and YM. We have already noted that the actual microstructure and "shape" of the price curve of an instrument can make a significant difference. If YM and NQ persist at the new price level we may open new set of layers to scalp them. 406 limit orders so far, 41 solar days, comms exceed 1K, maint. margin around $98K.
And Wednesday is gone too. Today the PNL has been swinging up and down mostly following index futures markets ES, NQ, and YM, where as seen in the previous posts we have a few positions. We are just waiting to see their "intention": if they reverse we will do nothing and just continue using the current "price corridor", which for instance for NQ currently stretches about a 9% upward. In case they break up for good, we will start a new set of scalping/hedging layers at the new price level. The G-L (Gain-Loss) has being increasing quite steadily and providing "fuel" to be invested in the scalping activity. Currently it reached about $123K. At the moment, the PNL curve is at level $17.2K, so the "unrealized" is pretty wide, as the mkt has been "streching up". We have been running now for about 43 solar days. Current maint. margin is about $98K and we have executed 428 lmt orders spending $1,057.16 in comms.
We have ended the week with a "red alarm" and very sharp DD, mostly caused by issues with NQ and YM (and NG): This is a clear signal we still have a few unresolved "issues" that need to be addressed. - problem with the "fractional" hedging players, when the number of contract multiplied by the fraction of the hedging order does not arrive to 1 (because we use a packet = 1 contract and a position constraint to limit the max size at 2 "packets"), which causes most of the time the hedging player not to trigger - possible problem with allowing all the layers in the same set to possibly take the same-sign position - too late creation of new set of layers In the next week we need to discuss these issues, and put in place some fixes for them, as they can cause unpleasant DDs on selected instruments. In the meantime, I have added a few new set of layers, for the instruments which have moved significantly since the previous "price level": ES, NG, NKD, NQ, SI, YM, ZL.
As promised I have begun working on a few improvements to deal with the issues we have identified in the previous post. First of all, I am focusing on the DD (drawdown) "containment". Since our "protective" players (essentially corresponding to "stops" in an ordinary system, but with the possibility to "undo" them) are triggering a bit too late due to the "fractional" way their sizes are defined, I am introducing a new device to improve the DD management. Let's see some changes I am making right now. I have defined the following new metric: Code: G-L - PNL Relative PNL Divergence % = ------------------------------ * 100 Max(Abs(G-L), Abs(PNL)) ( when G-L - PNL > 0 ) The name of the metric is obviously is "tentative" and if you have a better one just let me know . However, let's see the idea. From our PNL chart, we have seen that we can follow both the G-L (Gain-Loss) curve and the PNL curve. The first one indicates the amount of the scalping activity and can be interpreted as a sort of "potential" profit, in the sense that if would become coincident with the PNL in case all the "unrealized" gets to 0. Clearly, we wish to bound this gap between the G-L curve and the PNL curve as much as possible, so that the continuous scalping action represented by the G-L curve can "pull up", in due time, the PNL curve. The above metric is therefore a "normalized" measure of such gap, and of course we would strive in our simulations for scalping/hedging games with lowest values of the max "Relative PNL Divergence" (max computed over time). Furthermore, it turns out it can be used very effectively to automatically decide when to increase the hedging action only when it is needed. In fact, if the gap grows too much for a given instrument, that is a sign that we need to strengthen the hedging action. Therefore, we can introduce a mechanism where "containment action" (the hedging action) increases with the gap (or an increase triggers after one or more thresholds). In am currently running some simulations and this mechanism seems quite effective, reducing drastically the DD and smoothing out the PNL curve. As soon as I find an optimal implementation I will enforce this new improvement.
Looks like today CL has made a sudden large upward move. So we are returning in the realm of our first "corridor" for CL, which is a good thing, as we have been loading up the second "corridor" (the one "above" the first one). Here is the "best" CL layer showing the surge: At the same time NGZ5 (natural gas) is probably near to bottoming down, we are also near to the time to roll over. So for now we just wait a bit and if it goes further down we will open a new set of layers (we have 2 sets already at work). NQ, YM, ES have been causing a sharp DD, due to their correlations , simultaneous moves, and most layers aligning to a short position. I'd say that as soon as we recover NQ and YM, we can dismiss them, to avoid future large negative spikes in the PNL curve, which are always unpleasant.
Now we want to roll over NGZ5 to the new contract NGF6. Let's examine the situation in order how to do that in the most convenient way. We have currently 2 set of (3) layers active and a long position of 5 contracts (that is each layer, but one has 1 long player open) Now in cases like these where we have multiple layers there are usually at least 2 ways to proceed: A. One way is to place an offsetting order on an additional layer and then transfer all layers one by one, finally restoring the position on the manual layer (after transferring its data to the new contract) B. Another way is to "flatten" the layers one by one and make the "information transfer" to the new contract's layers, and then recreating the position on the new layer. Obviously it's up to the the fund manager to pick a preference. In general, option A can be more convenient when there are long/short players open, and therefore using a single order to offset the current position can save some commissions. In our case, I prefer to proceed layer by layer since they are all long, and distributing the orders on the various layers seems more in line with a principle of "diversification". So we get the following new situation about NGF6 (2 more orders triggered as soon as I put the layers back in auto mode, so the position is now actually of 7 contracts): As it is also apparent from the above picture, the rollover is quite"costly" in the sense that we are obviously "realizing" losses due to a significant contango (e.g., see the difference between the short and long player). On the other hand, since we "keep in memory" all this information in form of open virtual players, in due time we should have opportunities to "undo" these "losses" by closing the associated players in various future price fluctuations.
Great thread, fullautotrading! I like that you're experiencing some wild swings due to the drop in commodity prices, but you also got to experience the increase in ES. Definitely interested in seeing where this is going since I'm in the auto-trading camp myself.