dsugums 6 pip auto-trader by 'im again

Post Reply
garyfritz

Re: dsugums 6 pip auto-trader by 'im again

Post by garyfritz »

Let me make sure I understand. You open 3 pairs, wait until the net profit is 6, then close the position (banking the 6 pip profit) and immediately open another set of 3. Correct?

Assuming that's true, it's exactly equivalent to opening the 3 pairs and HOLDING THEM OPEN, except you're paying 3 spreads every time you close 3 and open 3.

Maybe this can't be backtested in Empty4. It can't be backtested -- as a system -- in Tradestation either, because TS only trades 1 symbol at a time.

However I can *simulate* a trading system by tracking the 3 values, keeping track of when the sum of the 3 positions moves 6 above its entry, then "closing" that position and "opening" another. I did that, and I verified that it's exactly equivalent to opening the 3 pairs and holding them, other than slippage/spreads.

I tested it on 6 months of 5 min bars. (Maybe the 5mins are too slow for something that moves that fast? I can do it on 1min if that's better, but I can't do tick charts on multiple symbols.)

Starting 8/1, it had 130 pips closed and -55 open by 9/6/11, when an "event" more than doubled its closed profits in a few minutes. As of today it has 797 pips closed and -160 pips drawdown.

This chart shows the last 5 months of 2011, which was all I could get in Excel's 32767-point plot limitation:
6pip.gif
The blue line is your "closed" profit. But the red line includes drawdowns from your open position -- and it is the actual net value of your account. Not too terribly bad, but...
dsugums wrote:Some slight changes to the EA. The setting need to be changed to EU (buy), USDCHF (Buy) and ECHF (Sell).
Not sure if makes any difference, but I tested it using that actually.
Yes, that makes a HUGE difference. This thing is just betting on the directionality of the triple. You've just reversed it:
6pips2.gif
So instead of making about 700 pips, it loses about 700 pips.

Have I misunderstood something??
You do not have the required permissions to view the files attached to this post.
Raiden
Posts: 8
Joined: Sat Jan 28, 2012 5:50 am

Re: dsugums 6 pip auto-trader by 'im again

Post by Raiden »

If you Open EURUSD (sell), USDCHF (sell) and EURCHF (buy) simultaneously 1 lot, you are not hedging but effectively taking a smaller USDCHF (buy) position.

To illustrate:
Image

Any value from this triangle trade is from this smaller net USDCHF position.

Edit: highlight cells for easier tracking
Last edited by Raiden on Tue Jan 31, 2012 4:08 am, edited 3 times in total.
blahn
Trader
Posts: 53
Joined: Wed Nov 30, 2011 2:39 am

Re: dsugums 6 pip auto-trader by 'im again

Post by blahn »

It's not exactly the same as buying and selling EC. if you were to buy and sell just EC, you would have a perfect correlation and always hold your position and spread in check. For example, 2 hours ago i started dsugums ea and let it open the 3 trades, the spread i lost in doing so was roughly 12 pips. for over half an hour it did hold a negative 12 pip difference no matter which pair rose and which pair fell. But now, 2 hours later what's my grand total? about 25 pips in the negative. why? because they currencies have a drift to them. If I had opened the trades up in reverse after watching a stoch difference or some other pair monitoring method then i would be 25 pips in the positive. Take a look at this quick chart I did and you'll see how the pairs follow each other, sometimes very closely, and other times with a pretty large drift. the only way this will work is if the trades can be opened up in opposite direction from the current drift.
corr pairs.gif
Alpenkorps wrote:
blahn wrote:That pip spread that widens and shrinks between correlated pairs is what makes it work.
I didn't get your point properly. Selling EU, UC and buying EC is like Selling EC then buying EC again. So how does pip spread between Euro and CHF works?
You do not have the required permissions to view the files attached to this post.
blahn
Trader
Posts: 53
Joined: Wed Nov 30, 2011 2:39 am

Re: dsugums 6 pip auto-trader by 'im again

Post by blahn »

garyfritz wrote:
So instead of making about 700 pips, it loses about 700 pips.

Have I misunderstood something??
There has to be something in the ea that will monitor which direction the pairs are drifting from each other in order to place the proper buy and sell. I've been doing it with with just 2 pairs using Dreamliners method for trading the drift. If you hold on the the pairs too long without them drifting back together there's a big chance they will stay apart for a while, or even worse drift further apart and drag you down to DD hell. Take a peek at his thread and you'll see what i mean. it does work but you need exit strats just like normal trades and nothing is guarantied.

http://www.forexfactory.com/showthread.php?t=160912
User avatar
hanover
Posts: 8
Joined: Wed Nov 16, 2011 9:23 am
Location: Hamilton, New Zealand

Re: dsugums 6 pip auto-trader by 'im again

Post by hanover »

I think there might be two different discussions occurring here, and it’s possibly causing confusion.

One is about triangular arbitrage, and the other about hedging divergence. I’ll explain where I believe the difference lies. The EA that Steve has created can only profit if/when triangular arbitrage occurs, and mbkennel brilliantly explains the difficulties that I was clumsily half-alluding to in my earlier post (thanks, Matt!). However, I believe that dsugums has caused confusion by mistakenly describing his idea as hedging divergence (which is the idea that blahn is developing in his post).

Triangular Equilibrium, and Arbitrage
Think of currency pairs as dominos, e.g. where a 3/4 domino = EUR/CHF, 3/1 domino = EUR/USD, 1/4 domino = USD/CHF. If you lay out these dominos, they can be made to form a perfect chain that links back onto itself, i.e. 3/4 -> 4/1 -> 1/3. In other words, we start with 3, and we end back at 3 also. That is triangular equilibrium: EUR/USD x USD/CHF = EUR/CHF. Another way of looking at this is to cancel numerators and denominators: the end result is 1/1. Hence if I take the EURUSD quote and multiply by the USDCHF quote, I should get something very close to the EURCHF quote. Try it and see for yourself. The math works because FX quotes are nothing more than ratios. In this situation, the only way to profit is to find quotes where, due to momentary inequities in the market, the equilibrium breaks down, potentially creating an opportunity for arbitrage (guaranteed return without any risk). However, spreads are obviously going to reduce, if not completely negate, these opportunities (although I’ve seen packages that purport to find arbitrage opportunities by comparing quotes from different bookmakers, oops sorry crims, in much the same way that sport arbitrageurs operate). As long as the quotes continue to accurately reflect the 1/1 ratio, it is impossible to profit from such a ‘hedge’.

The 1/1 concept need not stop at a triangle. If we can connect 4 or more dominos in a perfect ‘ring’, i.e. end with the number that we started from, then using analogous currencies will again deliver a 1/1 result, where the only possible profit opportunities lie with vagaries in the quoting.

Hedging Divergence
Now let’s address the hedging divergence, which is described by blahn, and also in his link to Dreamliner’s thread. This is the case where, by placing two or more dominoes together, we do NOT end with the number we started with. For example, we could hedge something as simple as EURUSD against USDCHF: 4/1 -> 1/3 leaves us with a 4 (EUR) unmatched at one end of the chain, and a 3 (CHF) at the other. Or, performing algebraic cancellation: EUR/USD x USD/CHF does not equal 1/1. It equals EUR/CHF (same as the end result with the dominos). This means that if we buy both EURUSD and USDCHF, we could effectively achieve much the same thing by simply buying a suitable volume of EURCHF. That is why I believe that hedging is little more than an illusion.

The hedging divergence works as follows: if EURUSD and USDCHF are maximally divergent, then EURCHF is either significantly 'overbought' or 'oversold'. Hence we are effectively employing a mean reversion strategy on EURCHF, nothing more.

You can make the basket as complex as you wish, but by simply performing the algebraic cancellation across the whole basket (note: if you sell instead of buy, simply invert the pair, e.g. selling EUR/USD is the same as buying USD/EUR), it will always resolve itself into a simpler set of orders, reducing your spread costs. At this point I expect to get folk replying indignantly “Hedging is not an illusion. I profit regularly from it!”. Of course it’s possible to profit using the complex hedge; all I’m pointing out is that it’s equally possible to profit, and probably more efficiently, by breaking it down into a simpler basket of orders. The illusion lies with the fact that the trader believes that hedging X/Y with Y/Z provides his gains, when he is actually skillfully trading X/Z, although he doesn’t realize it. The points where he is adjusting the hedge is perfectly equivalent to the timing of entries and exits on X/Z.

Because the dominos don’t connect perfectly with this kind of hedge, there is risk of loss involved; and where there is risk of loss, there is likewise opportunity for profit. That’s the conclusion I’ve reached after 5 years of study: that fancy MM does not in itself provide a free lunch; it is only the taking of risk that makes return possible. At least for the retail trader.

David
Last edited by hanover on Tue Jan 31, 2012 5:04 am, edited 1 time in total.
User avatar
Alpenkorps
Trader
Posts: 213
Joined: Thu Dec 15, 2011 4:03 am

Re: dsugums 6 pip auto-trader by 'im again

Post by Alpenkorps »

Thanks David for the excellent explanation. I was also confused by this, because the idea behind this EA can't be Hedging Divergence.
Take my love, take my land, Take me where I cannot stand
I don't care, I'm still free, You can't take the sky from me
mbkennel
Trader
Posts: 29
Joined: Tue Dec 20, 2011 5:40 am

Re: dsugums 6 pip auto-trader by 'im again

Post by mbkennel »

blahn wrote:If we were using pure hedges that might be true, but since we're working with synthetic/correlated hedges, it makes sense. All the synthetic hedges we trade will naturally drift apart, sometimes by a pretty large amount, come back together and then drift the other direction. That pip spread that widens and shrinks between correlated pairs is what makes it work. I'm going to guess that the reason dsugum has trouble being quick enough to grab the profit is because he's entering randomly instead of watching the pairs shift apart. When I trade correlated pairs I use dreamliners ideas he started here, along with other tools, correlation charts etc that developed later in his thread.

http://www.forexfactory.com/showthread.php?t=160912
Going down that direction (statistical instead of riskless arbitrage) can work, though we should then join the co-integration thread here where people are trying to do it correctly. Note that correlation isn't the same as cointegration.
"It is a capital mistake to theorize before one has data." Sir Arthur Conan Doyle.
"If your experiment needs statistics, you ought to have done a better experiment" Lord Rutherford.
User avatar
hanover
Posts: 8
Joined: Wed Nov 16, 2011 9:23 am
Location: Hamilton, New Zealand

Re: dsugums 6 pip auto-trader by 'im again

Post by hanover »

blahn wrote:For example, 2 hours ago i started dsugums ea and let it open the 3 trades, the spread i lost in doing so was roughly 12 pips. for over half an hour it did hold a negative 12 pip difference no matter which pair rose and which pair fell. But now, 2 hours later what's my grand total? about 25 pips in the negative. why? because they currencies have a drift to them. If I had opened the trades up in reverse after watching a stoch difference or some other pair monitoring method then i would be 25 pips in the positive.
With respect, I think you're confusing Dreamliner's approach with dsugums' EA. That's the point I was attempting to make in my previous post.

Dreamliner's strategy can deliver profit (or loss) because, if you perform the algebraic cancellation, the result is not 1/1. You are effectively trading the currency pair that is the net result of the cancellation. Therein lies the possibility for the 'drift' that you're describing.

Dsugum's EA (assuming that you buy EU and UF, and sell EF; or sell EU and UF, and buy EF) delivers a 1/1 result following the cancellation. Hence the movement in the P/L from -12 to -25 pips is most likely due to either an increase in the combined spread, or (less likely) anomalies in the prices quoted by your crim. If the P/L does ever reach +25, it's almost certainly due to anomalies in the quoting.
blahn
Trader
Posts: 53
Joined: Wed Nov 30, 2011 2:39 am

Re: dsugums 6 pip auto-trader by 'im again

Post by blahn »

Excellent replies, helps clear a few things up for me since I'm also a bit new to the scene. I do have a question tho because trading 3 or more balanced pairs like this always comes up and seems to me to have the same problems as 2 pair correlated hedges. Isn't drift and divergence between any 2 of the 3 or 4 balanced pairs going to change the equation temporarily until they come back into correlation? what happens when there's a loss of 20 percent of correlation between 2 of the 3 pairs, or even a reversal of correlation for a short time?
hanover wrote:
blahn wrote:For example, 2 hours ago i started dsugums ea and let it open the 3 trades, the spread i lost in doing so was roughly 12 pips. for over half an hour it did hold a negative 12 pip difference no matter which pair rose and which pair fell. But now, 2 hours later what's my grand total? about 25 pips in the negative. why? because they currencies have a drift to them. If I had opened the trades up in reverse after watching a stoch difference or some other pair monitoring method then i would be 25 pips in the positive.
With respect, I think you're confusing Dreamliner's approach with dsugums' EA. That's the point I was attempting to make in my previous post.

Dreamliner's strategy can deliver profit (or loss) because, if you perform the algebraic cancellation, the result is not 1/1. You are effectively trading the currency pair that is the net result of the cancellation. Therein lies the possibility for the 'drift' that you're describing.

Dsugum's EA (assuming that you buy EU and UF, and sell EF; or sell EU and UF, and buy EF) delivers a 1/1 result following the cancellation. Hence the movement in the P/L from -12 to -25 pips is most likely due to either an increase in the combined spread, or (less likely) anomalies in the prices quoted by your crim. If the P/L does ever reach +25, it's almost certainly due to anomalies in the quoting.
dawsonsg
Posts: 2
Joined: Sun Jan 22, 2012 11:21 am

Re: dsugums 6 pip auto-trader by 'im again

Post by dawsonsg »

Hi Gary, are your calculations of profit taking the three spreads into account?
garyfritz wrote:Let me make sure I understand. You open 3 pairs, wait until the net profit is 6, then close the position (banking the 6 pip profit) and immediately open another set of 3. Correct?

Assuming that's true, it's exactly equivalent to opening the 3 pairs and HOLDING THEM OPEN, except you're paying 3 spreads every time you close 3 and open 3.

Maybe this can't be backtested in Empty4. It can't be backtested -- as a system -- in Tradestation either, because TS only trades 1 symbol at a time.

However I can *simulate* a trading system by tracking the 3 values, keeping track of when the sum of the 3 positions moves 6 above its entry, then "closing" that position and "opening" another. I did that, and I verified that it's exactly equivalent to opening the 3 pairs and holding them, other than slippage/spreads.

I tested it on 6 months of 5 min bars. (Maybe the 5mins are too slow for something that moves that fast? I can do it on 1min if that's better, but I can't do tick charts on multiple symbols.)

Starting 8/1, it had 130 pips closed and -55 open by 9/6/11, when an "event" more than doubled its closed profits in a few minutes. As of today it has 797 pips closed and -160 pips drawdown.

This chart shows the last 5 months of 2011, which was all I could get in Excel's 32767-point plot limitation:
6pip.gif
The blue line is your "closed" profit. But the red line includes drawdowns from your open position -- and it is the actual net value of your account. Not too terribly bad, but...
dsugums wrote:Some slight changes to the EA. The setting need to be changed to EU (buy), USDCHF (Buy) and ECHF (Sell).
Not sure if makes any difference, but I tested it using that actually.
Yes, that makes a HUGE difference. This thing is just betting on the directionality of the triple. You've just reversed it:
6pips2.gif
So instead of making about 700 pips, it loses about 700 pips.

Have I misunderstood something??
Post Reply

Return to “Automated trading systems”