| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Symmetrical Hedges https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=4767 |
Page 1 of 1 |
| Author: | Boulder [ Sat Jun 18, 2016 10:59 pm ] |
| Post subject: | Symmetrical Hedges |
Hey guys, so the other day I was explaining to a close friend of mine how RnR and Rene's GridMaster with its Dancers work. As I was explaining basic concepts such as hedging, offsetting, etc. an idea occurred to me which prompted me to research a bit and get some numbers. Before I continue I make abstraction of spread, commission and swap for convenience. The idea involves symmetrical hedges. These come in multiples of 2. N = 4 would be a symmetrical hedge of 4 trades composed of 2 buys and 2 sells. Buys are placed higher than sells at all times in this case. When a symmetrical hedge is activated, a loss is locked-in. This locked-in loss I denote with π. Further I denote P = pip-distance between levels of a grid. Also S = N/2, which stands for the amount of orders of a single side of a symmetrical hedge. π(N;P) is then the locked-in loss of a N-sized symmetrical hedge in a grid with pip-distance P. Question 1: How is locked-in loss related to N (or S) and P? Next step is to allow 1 trade to break the symmetry and have a chance at offsetting the locked-in loss π. Take N = 4, P = 5 pips and lets say price activates a 3rd asymmetry-creating sell. Visually: When price gets at that 3rd sell's level;
We impose the rule to only take action at every grid level. In order for that "sell 3" to offset the entire position and come out with the first minimum profit, it has to travel [π(4;5) + P] = 20 + 5 = 25 pips. This happens 5 levels lower. Question 2: How are these minimum levels of liquidation related to N (or S) and P? Now let's say we allow a "sell 4" to be triggered when price falls a level from "sell 3". Situation effectively becomes: Again using "Sell 3" as reference point 0, the first level at which first profit is reached is 3 levels lower. This is 2 levels faster relative to the first case (where asymmetry difference was 1). The profit we obtain here is also equal to P = 5 pips. Another example is when N=6 and P=5. This time we allow Diff = 3. Thus at 3 consecutive levels, sell or buy orders are activated. This is an example: Locked-in loss π(6;5) = 45 pips (calculated in a similar way as previously shown). Using "Sell 4" as reference point 0; first positive TP is reached after a fall of 5 levels. Net pips won = 15 when immediately capped. Question 3: What are the dynamics of these minimum levels of liquidation, N, P and profit relative to asymmetry difference (= Diff)? To answer these, I worked out an Excel spreadsheet (which you can find below). First tab answers Question 1. As suspected, locked-in loss is not a lineair function of S (remember S = N/2), but a convex function. The exact function is given by:
I also added a column 'probability of occurrence'. Since - in somewhat normal conditions and considering a certain time constraint - the occurrence of N = 2 symmetrical hedges is much more likely than a hedge of N = 20. Furthermore, if you increase the distance between grid levels, i.e. P, the probabilities again change. E.g. a symmetrical hedge of N=4 and P=5 is more likely to occur than a symmetrical hedge of N=4 and P=25. The 2 graphs are dynamic and are meant to be used with P between 5 and 25 (I arbitrarily configured the probabilities by assuming P between 5 and 25 and a maximum N of 30). P on the first tab is the only input you'll have to change to see how things work. These graphs' purpose is merely visual in order to grasp the concept better. The exact weights of the probabilities in no way should be considered applicable to real life. Things get really interesting on the 2nd tab "Asymmetry Modes". I analyse up to 5 asymmetry differences. To reiterate; an asymmetry difference is defined as the maximum net difference between the amount of buys and the amount of sells. Diff = 5 allows 5 sells or 5 buys to be activated once price breaks through the boundaries of a symmetrical hedge. Reference point 0 still remains the first buy or sell that breaks the symmetrical hedge. The only input you should play with here is "pips to cover". P is linked with the P on the first tab. So do not manually change it. Everything should be rather self-explanatory (do not be afraid to ask for clarification!). The graphs at the bottom-right are what's interesting. For P=5: This graph plots the minimum levels (relative to reference point 0) price has to cross over before a S-sized hedge's locked-in loss can be offset for a profit. The green vertical line considers a hedge of size S=7. In the case of Diff=1; a single 8th buy/sell will have to travel about 50 levels before it can close out the hedge with a profit! Whereas Diff = 5 (with 5 buys or 5 sells) will only have to travel 10 levels from reference point 0 (i.e. the level where the first asymmetry-creating trade of the 5 trades got activated). So Diff = 5 with its 5 trades will cut the to-travel distance by a factor of 5. As you can see Diff = 3 and Diff = 4 are pretty close to Diff = 5 too. In general the higher we go in Diffs, the less impact in terms of lesser-to-travel distance we see at a given S. If we advance in S, the wedge between Diff = 1 and the rest of the Diffs grows exponentially. A downside however is that a higher Diff will quicken the growth of a bigger symmetrical hedges. But put in perspective, the minimum to-travel levels grow much slower. This suggests that Diff=1 is absolutely not effective for this strategy. Too high levels of Diff neither since their impact decreases with higher Diffs + the adverse effect of contributing to the growth of larger symmetrical hedges increases. However, this last adverse effect may be largely mitigated because the probability of occurrence decreases with rising S (cf. Question 1). Also this particular graph does not change with P since it is linked to strict rules and mathematics. Next comes the last graph that plots the amount of pips won after price traveled the required minimum levels w.r.t. S-sized hedges. This per Diff mode. This one actually surprised me. It seems Diff=3 is at all times superior to Diff=4 for any size of hedge! When it closes out the entire position, those 3 trades will always bag at least as much or more pips than 4 trades will. Diff=1 always bags 5 pips when it closes out any hedge; again very inefficient and not really worth it if you put into perspective the amount of levels a single trade will have to travel over. Diff=5 shows inferiority to Diff=3 at S=3, S=7, S=8, S=12, S=13, etc. This graph of course will change with the parameter P, but only in absolute values. Relatively speaking it remains the same. All things considered; using Diff=3 and Diff=5 in accordance with the last graph's sizes of symmetrical hedges should be optimal. The bigger a symmetrical hedge grows the smaller the chances get for it to grow even bigger symmetrically. This because the hedge width grows too which in turn will make it more difficult for price to travel back to the other end of the hedge's boundary. Even after a severe whiplash which could potentially activate e.g. an extreme N=20 symmetrical hedge; if and only if you are well-capitalized, only small lot sizes are used and a decent P is implemented you should normally be fine. It is after all only a matter of time before the market moves hard in one way and covers that locked-in loss. In this sense you'd never see your balance go down. Your DD will increase of course, but I'm wondering whether it would make me feel more at ease if I manage to wholeheartedly rely on the arguments I just wrote in this last paragraph. Also when applied to a few pairs, the interaction should flow rather organically I'd suspect. Some pairs should cater for ones that are stuck in a symmetrical hedge for a certain amount of time by growing the balance, until they get released and start to cater for the pairs that were doing the catering. Of course it will all depend on carefully choosing P for each pair. In any case, I enjoyed this exercise and thought sharing could be helpful. If anyone should feel like making an EA out of it, I'm always ready and delighted to help Cheers, Aram |
|
| Author: | renexxxx [ Sat Jun 18, 2016 11:40 pm ] |
| Post subject: | Symmetrical Hedges |
Excellent work Aram! You have clearly put a lot of thought and time into this. I have a question that was not immediately obvious to me: You mentioned that a Diff of 3 or 5 in a asymmetrical hedge situation is optimal. But what about a Diff of 7 or higher? Isn't a higher Diff not always better? (Of course I'm ignoring account size and available margin here) |
|
| Author: | Boulder [ Sun Jun 19, 2016 12:51 am ] |
| Post subject: | Symmetrical Hedges |
Heya Rene, thanks for your kind words! Yes indeed as I posted the thread that thought came up in me as well. So of course I added additional Diffs to the sheet, up to Diff = 10. As you say, it is indeed true! Have a look at the result: So indeed:
|
|
| Author: | Boulder [ Wed Jun 22, 2016 2:56 am ] |
| Post subject: | Symmetrical Hedges: Extended (part 1) |
Ok so I got more fascinated by these symmetrical hedges and wanted to do more research in order to come to a better understanding. I extended the spread sheet and will walk you through step by step. You can virtually analyse nearly any sort of symmetrical hedge now. The previous posts made use of constant lot sizes. Let's recap one second: This is a symmetrical hedge of N=6. We allow a Diff=1 and imagine price drops further down (after it has activated that N=6 hedge of course). For the sake of simplicity I use 0.01 lot = 1 point per pip. The easiest way to determine this symmetrical hedge's locked-in loss, is to imagine what the loss is at the red dashed centreline. In this first example buy 3 = -12.5, buy 2 = -7.5 and buy 1 = -2.5. Sum and multiply this by 2 since you have an equal amount of sells in the negative: -45 points. Abbreviations:
Now let's extend this example to Diff = 2: As you can see: a larger NPW and a smaller/faster MLL as opposed to Diff=1. Effectively the merit of Diff=2 is greater than M of Diff=1. Also taking LiL into account; 0.0370 of Diff=2 is still bigger than Diff=1's 0.0111. What this means is that it is better to initiate 2 additional asymmetry-creating orders instead of 1. Up until this point there's nothing new. The last few post's "discovery", was that there seems to be an optimal Diff-configuration for every size of symmetrical hedge (with constant lot sizes). The way I determined optimality however was faulty because I didn't take into account both MLL and LiL. I simply (falsely) stated that it would be optimal to respond with the Diff that would result in the highest NPW after it reached the level of liquidation. This way of working should be better and more truthful. Now the next step. I wondered how things would evolve if we were to increment the lot size with 1 point (e.g. 0.01, 0.02, 0.03, ...). Or more in general, with increment ε. A visual example is worth a million words: Here ε = 1. Raising the increment to ε = 2 would give you this: Both M and M/LiL of ε = 2 are more favourable compared to ε = 1. Now of course LiL grows when we increase ε. Rather fast. The following graphs are for ε = 1 and ε = 2 respectively compared to constant lot sizes. However; this is absolutely nothing when put next to a martingaled hedge.. This grows actually double as fast since a hedge has 2 sides remember? Nonetheless, martingale's devastating power should be striking to anyone. So do not even contemplate a second of going into that. It will ruin you. In an attempt to mitigate the growth of LiL per growing N-sized hedge, I introduce 'k'. I was interested to see the dynamics of cutting and not incrementing the lots after the k-th level. Note that this k is connected to the red dashed centreline. Here's another example to explain: Everything can be found in the spreadsheet attached to this post. The main stuff is to be found in the tab called 'Symmetric Hedges Increments'. The other tabs should be self-explanatory. These are the only inputs for you to manipulate and create any sort of hedge you wish: We arrived at the interesting part. I wanted to compare the base case of constant lot hedges with the incremented lot hedges for every S&Diff-combination. The required panels that do so are these: I made sure that cells of the incremented-lot panels would get highlighted if they were smaller than the corresponding cell of the constant lot panels. So if M_constant > M_incremented, cells in the bottom-left panel gets highlighted in red. Similarly for bottom-right panel when {M/LiL}_constant > {M/LiL}_incremented. Then I counted the amount of red cells for both panels and registered them. An important assumption is made here implicitly. By just 'counting' red cells, I assumed that every S and Diff combination are equally important and thus equally likely to occur. This is of course not true. Therefore most weight should be given to the cells at the top-left corner and weights of importance should decrease in a diagonal, gradient way to the bottom right. My first post mentions these decreasing probabilities. Perhaps I could add them in the next version of the spreadsheet. In any case I did this twice; for ε = 1 and ε = 2. Then started with k=30 and went down all the way to k=2. This is the resulting table: The nice thing to note first is that these results do not change by changing P. So mathematically it will hold for any width between grid levels you choose. M will change of course. M/LiL won't. Nor will the relation between M's or M/LiL w.r.t. incremented lots or constant lots change. I highlighted the best results with green. It gets even better; the first green results of each column surprised me because of this. For ε = 1 and k = 5: For ε = 2 and k = 10: All the red cells are concentrated at the bottom-right AND most of them are not that much smaller than their corresponding constant-lot values. This is warmly welcomed since the bottom-right S&Diff-combinations are the ones which are the least likely to occur! The other green ones had red cells all over the board, so they are not to be preferred. In conclusion we can rather confidently state that these hedges are optimal. The 2nd way of hedging and playing the game is actually better but requires a more heavily capitalised account. |
|
| Author: | Boulder [ Wed Jun 22, 2016 2:56 am ] |
| Post subject: | Symmetrical Hedges: Extended (part 2) |
Lastly, this time in order to decide which Diff to employ at every S-situation is decided by M(erit) rather than NPW only. For ε = 1 and k = 5, the "optimal merit"-graph becomes: That's one hell of a rocky snail if you ask me The methodology is the same as for NPW; aim for the highest M by choosing the lowest possible Diff. Let's start with the first point where S = 1. This is the situation you should imagine: The correct response would then be given by choosing Diff = 1 for S = 1 and thus 1 asymmetry-breaking sell (or buy, whichever hits first) is allowed to be activated. Other Diffs are possible but Diff = 1 is the smallest and should therefore be preferred. (Strictly mathematically speaking we should be indifferent in this model Let's have a look at S = 3. So you should be seeing this on your trading screen: The optimal/highest merit is given only by Diff = 2 this time. So when price falls, this is the way we should be responding: As the highest Merit is given by Diff=2, we should be most happy relative to all other 9 Diff-alternatives with this MLL and NPW combination - i.e. the speed with which we exit and the amount of money we obtain - when we do exit. Relative to the grid with constant lot sizes, our Merit is also superior. I do not use M/LiL-ratio in a similar way due to the assumption that we play this game only with a well-capitalised account AND the psychological "reassurance" - if you will - that every hedge you get into is temporary; for the market will move one way or another sooner or later. Again in that sense you will never see your balance go down and you know that you'll always be covered by a hedge. Also the exits are substantially quickened by the incremented lots (until k = 5 of course). If your account is big enough, you should be more than fine. Given that we decide on an unfortunate and badly chosen P, the main and sole disastrous price-pattern that is lethal for this system - if it persists for a long time -is this one: In any case, interesting stuff to think about Cheers, Aram |
|
| Author: | rapple [ Wed Jun 22, 2016 7:47 am ] |
| Post subject: | Symmetrical Hedges |
Dear Aram You have put a huge amount of work into this and should be congratulated I was wondering if it was possible to use your analysis to look at decreasing the pip distance for each buy/sell level. (eg. Buy1=25pips, Buy2=20, Buy3=15 : Sell1=25, Sell2=20, Sell3=15, Sell4=10, Sell5=10, etc). This way you could leave the Lot size equal but increase the likelihood of an assymetric hedge when price runs off in one direction. Just a thought. Cheers Richard |
|
| Author: | Boulder [ Wed Jun 22, 2016 9:54 am ] |
| Post subject: | Symmetrical Hedges |
Thanks for your kind words Richard! Getting the 'k'-parameter integrated was the toughest part I'll see if I can do something with those decreasing grid distances. Should be an interesting exercise. Cheers, Aram |
|
| All times are UTC | Page 1 of 1 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|