Welcome to the Traders Laboratory Forums.
Technical Analysis The technical discussion forum for traders.

Reply
Old 10-10-2011, 06:52 AM   #1

Join Date: Aug 2008
Location: Bangkok
Posts: 131
Ignore this user

Thanks: 4
Thanked 21 Times in 17 Posts



Lightbulb Correlation and Hedging Revisited

Hello, I am starting a thread regarding the idea of trading positively correlated currency pairs. I read the extensive postings on other threads and have developed some tools that I find useful. I have been trading these new tools successfully for about a year now. Basically I first developed my own ideas and charts, then adapted some of the ideas from the other posters.
I will have to see how this works with posting links to other trading forum websites. I was going to post this in context to a mega thread dealing with this subject. I was limited in my posting options, so I will post it on this website. I will begin with a nice customization of another person’s work to show where my work diverges from their main thread. The idea of the JM Variance was posted early in the major thread here by the developer JM1941.
http://www.forexfactory.com/showthre...160912&page=29
It had more floating variables and intensive displays than I wanted for my systems. It was abandoned early on in their thread, and was replaced by a stochastic system. I do not care for the stochastic system much, due to stochastic flattening at tops and bottoms. I want precision and accuracy, avoiding rescaling, and light programs that I can run on multiple charts. Hedging can involve hundreds of pip draw downs, and something like a flattening stochastic can be costly. As far as I could tell, most of the posters found their results to be moderate and mostly resigned to demo trading and further development.
My development focused on trying to get clear measurements for when positively correlated pairs are separating enough to trade back together. Here is a parable to give an idea of the challenges and task. If I were going to mechanically measure the ocean ripples at two different bays over long periods, I would have to set up measurements. First the tide levels would have to be compensated for. These are the major daily bar trends. Next the individual waves would have to be filtered or compensated for. These are the hourly trends and chop. Finally one could get down to trying to get accurate measurement and comparisons of the ripples created by the wind (5 minute charts), and contrasting them to the other bay, in real time.
So I went to work reprogramming the JM Variance to be able to compensate and freeze some variables, so I can measure what I choose. After this is presented, I will go on to share my extensive correlation charts and profiles. I do not use the standard numerical correlation websites for choosing positive pairs. I find that a visual overlay chart is better for this. I am well aware of the distortion factors.
For the reason that a 2 pairs move apart (hence show low correlation) before I want to trade them back together; numerical correlation charts are not my preferred method. For distance of separation and speed of separation, I use my version of JM Variance.
Correlation (hedging) trading is a fairly complex endeavor. I have taken it to many levels, including trading currency pairs against indices, stocks, and commodities. The draw downs can be staggering, the news drastic, and trades can last for weeks. It is not something to quickly jump into. The concepts of scaling, tuning and measuring are not a precise science. The wild cards like the Swiss Euro intervention can throw off historical correlations, possibly for all Swiss related pairs.
I stay with correlation trading because it is a good way to use minimum lots to get very long pip gains. I have tripled accounts in a few months. I also can rest in hopes that the offset correlations are strong enough to compensate for major market swings, and my drawdowns hopefully minimized. Also I have confidence to ride long trends and reversals, because I am somewhat hedged. These concepts hopefully will become clearer as I show charts and strategies. There is a real beauty in just watching my open trades fluctuate until they are well in the profits. I have a real confidence that the correlations will bring the pairs back together as they have thousands of times before.
Eric Johnson is offline  
Reply With Quote
The Following User Says Thank You to Eric Johnson For This Useful Post:
parrondo (12-08-2011)
Old 10-10-2011, 01:37 PM   #2
zdo

Join Date: Nov 2007
Location: boonies
Posts: 1,202
Ignore this user

Thanks: 301
Thanked 308 Times in 220 Posts
Blog Entries: 104



Re: Correlation and Hedging Revisited

Thanks. A couple questions
Why are you using the term ‘hedging’ instead of ‘spreading’?
Does your work include consideration of which pair (or instrument) is leading?
Example: EUR and US indexes are directionally correlated – but which one is determinant / leading?
Tranfer same ? to the correlated pairs.
zdo is offline  
Reply With Quote
Old 10-10-2011, 02:08 PM   #3

Join Date: Aug 2008
Location: Bangkok
Posts: 131
Ignore this user

Thanks: 4
Thanked 21 Times in 17 Posts



Re: Correlation and Hedging Revisited

I will try my best to be useful with the questions. Honestly I got deep into the chart technicals not really even knowing what a "hedge fund" really was. So I hope others will accept the invite to add knowledge.

I say hedging because if you are working with 2 positively correlated pairs, even if both of them rise, if I am short one and long the other there should be a hedging effect. I do not care where they go, just that they come back together in pips and correlation. I think spread betting is a slightly different type of arbitrage, but I am fuzzy on that technique.

I have seen systems that use leading and following indicators, and some of Jason Fielders work, I think that mine is different. Do no I do not use leaders. I do establish a top pair to sell, and a bottom pair to buy.

As for my time periods, I prefer to trade hourly based charts, and the trades can last for days to weeks. I can trade 5 minute bars also, but do so less these days with mega trends like the EUR/USD declines.
I will show a chart as an intro. This chart is to give a beginner the allure of correlation trading. It is far from the whole story, and far from the advanced charting I will soon move to.
The picture shows the GBP/USD chart in red line EMA form. The top window is the green bar chart of the same GBP/USD. The yellow line chart overlay is the EUR/USD with a similar proportional accuracy. For months you can look back and see these pairs separate and come back together. If you could just measure the separation maximum averages, and trade them back together, you could not lose it seems. I mean, if the red is on top, sell it and buy the yellow on the bottom until they come together.

This is a simplistic and distorted view, but the basic concept is true. It just takes some advanced tools to see and measure clearly. I do appreciate the questions, let me know if I can be more clear.
Attached Thumbnails
Correlation and Hedging Revisited-eur-gbp-intro.jpg  

Last edited by Eric Johnson; 10-10-2011 at 02:14 PM.
Eric Johnson is offline  
Reply With Quote
The Following User Says Thank You to Eric Johnson For This Useful Post:
parrondo (12-08-2011)
Old 10-10-2011, 02:54 PM   #4

Join Date: Aug 2008
Location: Bangkok
Posts: 131
Ignore this user

Thanks: 4
Thanked 21 Times in 17 Posts



Re: Correlation and Hedging Revisited

I will now advance to my version of the JM Variance. I will rename it to the EJ Variance (EJV) for clarity form the original designers work. The attachments will still say JM Variance versions though; I do not want to disrupt the Metatrader profiles looking for my working title files.

From the picture you can see a yellow line chart, this is a 2 EMA overlay of the hourly bars of the EUR/USD. The white line chart is of the NZD/USD. This was created by dragging my custom indicators from the navigator menu onto the same lower window.

****** An early and IMPORTANT note, my preferred Metatrader is the forex.com USA (not UK, but that will work). It has the most currency pairs, stocks, commodities, and indicies available that I like to work with. Even then, there are different versions of the USA platform, they all have the currencies that work with the FXF extensions on them. Only the overlay line charts and profiles that I give are platform dependent. I have some of the line chart overlay indicators for normal Metatrader available and will try to clearly post these.
My JM Variance indicators (EJV) are not specific and accept either format of currency input in capital letters. For example EURUSDFXF is valid for a forex.com platform. For most all other platforms the input is EURUSD.

The bottom window of the picture shows the pink histogram. This is the EJV indicator. It shows the true pip difference between the EUR/USD and NZD/USD. Due to the prices of each pair being on different scales there is some work to be done to set up a useful chart that does not auto scale.
That is part of the challenge. The overlayed line charts are very unreliable. They rescale as you scroll them, introduce more lines, and even change on different monitor resolutions. They are useful, but I will cover them in a different post.
I will get into the nuts and bolts of the EJV indicator in the next post so you can better understand why it is a useful tool.
Attached Thumbnails
Correlation and Hedging Revisited-ejv-intro.jpg  

Last edited by Eric Johnson; 10-10-2011 at 03:13 PM.
Eric Johnson is offline  
Reply With Quote
The Following User Says Thank You to Eric Johnson For This Useful Post:
parrondo (12-08-2011)
Old 10-10-2011, 04:16 PM   #5

Join Date: Aug 2008
Location: Bangkok
Posts: 131
Ignore this user

Thanks: 4
Thanked 21 Times in 17 Posts



Re: Correlation and Hedging Revisited

Here is where the market scientists part of the forum comes in. You are going to learn to control the graphic display that is normally automated by the computer. If you follow the logic, you will see why I did the EJM programming to set enable capturing specific measurements.
Here are the input parameters with defaults
Pair1 = "GBPUSDFXF"; **!!! Always the currency of the greatest numerical value
Pair1_digits = 0.0001 ; * leave this alone if not a Yen pair
If_yen_pair_0.01_not_0.00 01 = "X" ; * change the above “digits value” to 0.01 if yen pair

Pair2 = "EURUSDFXF";
Pair2_digits = 0.0001 ; * change the above value to 0.01 if yen pair
P1WeekOpen = 1.61; * GBPUSD current price level – disregard “ week open” idea
P2WeekOpen = 1.42; * EURUSD current price level
Scale_factor = 5000; * this is the vertical stretch of the display histogram
For_yen_try_50_not_5000 = "X" ; * if one or both of the currencies are a yen pair change the
scale factor to the 15- 100 range

Lookback= 4000; *number of bars back histogram is displayed, important for not bogging down computing power on the charts, also can adjust the total number of bars on the chart from the main MT menu tools, options, charts

I will begin the details of setting up a workable chart. I will soon release the profiles that I have set up to save time and for examples. The reason for keeping the highest value pair as #1 is that when it comes time to place the trades you need to know the direction. If the histogram is above the zero line, sell pair #1 buy pair #2. If the histogram is below the zero line, buy pair #1 sell pair#2.
Yen pairs have different decimals, so I had to program in compensation for them. Do as the * instructions say. If the pair #1 is a yen cross, change the digits to 0.01 for pair one. You can have pair #2 be a non yen pair, or a yen pair also.
You set the week open value to the present price now. After you display the histogram, it is here that you adjust the up and down orientation of the histogram. Only use pair one and move it a few pips. For instance if the histogram was above the zero line too high, I could change the number from 1.60 to 1.65 . Each chart must be independently tuned. You want a lookback of at least 12000 bars. This placement of the histogram to zero line is aiming to have the histogram oscillating above and below the zero line over the last 6000 bars in general. You will probably need to set the scale factor first. Both of these are general setting estimates, you are really looking for fast and far separations. They will show up better if you adjust your settings properly. Once set up, I adjust lookback to 4000 to save computing power.

The scale factor I set by scrolling back 12000 bars (and setting the lookback to 12000 temporarily). I reduce vertical stretch scaling (scale factor) until the highs and lows fit on the chart. I know they are highs and lows because they keep continuing to the zero line eventually. Work with the week one (P1) open value to center at times. It is possible that the pair just changed real pip ranges as seen on the day bars ( had a major range change). Usually with scale factor adjustments down by 1000 at a time, the chart looks useable. Any histogram with a Yen cross can be scale factored from 15- 100 units range. I know this sounds complex, but with practice is not that difficult. My preset templates will be helpful also.
Oh yes, Meta trader backfill. Sometimes I need to make individual blank charts with the correct time frame. Then I turn off the auto scroll. Use the page up key to backfill the chart, then the histogram will backfill when the program is restarted.
So with all of that detail, I will soon post what to look for with your set up charts. I have 1 hour and 5 minute chart profiles I will release to get you started. I am sure I will want to edit and add to this page, but I wanted to give a taste of where this is headed.
My coding programming I am sure is far from properly copywrited or refined, it has been tested and used, hope it is useful.
Attached Files
File Type: zip ''JM_Vari-BEST lookback yen 10 INVERSE positive up.zip (1.5 KB, 32 views)
Eric Johnson is offline  
Reply With Quote
Old 10-12-2011, 03:36 PM   #6

Join Date: Aug 2008
Location: Bangkok
Posts: 131
Ignore this user

Thanks: 4
Thanked 21 Times in 17 Posts



Re: Correlation and Hedging Revisited

Here are the EJV Metatrader profiles and indicators (bulk pack) for the forex.com FXF extension platform. It is to help people experiment with.
Backfilling may need to be done with individual charts. Deactivate the auto scroll and use the page up key to backfill the proper time period.
There are unnecessary indicators in the pack, and some for regular Metatrader platforms.
Make sure you unzip to the proper level to paste into the Metatrader program files.
Attached Files
File Type: zip JM HOURLY STACKS 1.zip (11.9 KB, 19 views)
File Type: zip RANDOM HOURLY JM.zip (18.1 KB, 14 views)
File Type: zip RANDOM HOURLY SECOND.zip (8.8 KB, 13 views)
File Type: zip STACKS 5 min JM.zip (13.9 KB, 12 views)
File Type: zip RANDOM JM 5 MINS.zip (16.7 KB, 13 views)
File Type: zip RANDOM 5MIN II.zip (8.1 KB, 13 views)
File Type: zip indicators.zip (730.0 KB, 23 views)
Eric Johnson is offline  
Reply With Quote
The Following User Says Thank You to Eric Johnson For This Useful Post:
minka (11-29-2011)
Old 10-13-2011, 12:52 PM   #7
zdo

Join Date: Nov 2007
Location: boonies
Posts: 1,202
Ignore this user

Thanks: 301
Thanked 308 Times in 220 Posts
Blog Entries: 104



Re: Correlation and Hedging Revisited

Eric,
Are you looking for sets of pairs to spread that are pretty highly correlated on daily ++ timeframes / charts but not so much on less than daily timeframes?
Current example would be GBPUSD and EURGBP...
Thanks.
zdo
zdo is offline  
Reply With Quote
Old 10-14-2011, 04:21 AM   #8

Join Date: Aug 2008
Location: Bangkok
Posts: 131
Ignore this user

Thanks: 4
Thanked 21 Times in 17 Posts



Re: Correlation and Hedging Revisited

I built my general correlations on charts similar to the example of the EUR/USD GBP/USD that I posted previously as an example. It is hourly bars converted into a 2 SMA line chart, overlayed. I am looking for the basic visual confirmation that the pairs tend to travel up and down in similar patterns over months. More importantly, I need to confirm this with the EJV indicator, this lets me know that the pip difference is cycling in a range. I want the range to be consistent enough to base trades upon when the pairs are far separated.
Day bars are not enough intraday detail. I am not looking to trade absolute historical separations a few times a year and hold them for months. I want to be able to reverse strong hourly trends, that have run long and short, on normally correlated pairs. These have the combined factors working to put on the trade in the direction of the spread coming back together.
Highly correlated pairs are best, because the trades pay off quicker. I can trade non correlated pairs also, I just need to see that on my indicator EJV, that the expansion and contraction pip range is consistent and looks tradeable.
I am looking for a few factors for a good trade. I use the line overlay charts as a radar for possible wide spread pairs, that normally cross. I then check them on the EJV to make sure that the distortions on the line overlay charts are not misguiding me. If the EJV histogram looks good for long term range oscillation, I evaluate entering the trade.
On the EJV histogram I look for a few factors. First is the speed or angle of separation. If it is fast and wide, the chances of it coming back together some, are good. I do not trade the histogram back to the zero line, I exit trades at support and resistance lines once I am in the profit. These lines can be on the histogram, or in one of the pairs, but I close both.
The second factor is the historical magnitude of the separation I go back at least 12000 hourly bars and set the histogram (shrink) to fit in the display window. I want to be near my historical extremes, with a recent rapid expansion for ideal trades.
Then I should confirm on the 5 minute EJV histogram that the pairs are also looking separated in the same manner. That confirms that the market is ready for an immediate contraction. These trades are hundreds of pips profit, or drawdown. The precision is necessary.
I will post soon my advanced line overlay charts to make more clear their look, along with more screen shots of the EJV and what I am looking for. For now I will post another line overlay chart. Each color represents a different pair, and you can see how some pairs can be spotted as usefully correlated.
Attached Thumbnails
Correlation and Hedging Revisited-line-overlay.jpg   Correlation and Hedging Revisited-select-pairs-correlate.jpg  

Last edited by Eric Johnson; 10-14-2011 at 04:41 AM.
Eric Johnson is offline  
Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hedging and Speculating Arthur Beginners Forum 2 03-05-2011 01:59 PM
Hedging Against Property Market Decline BlowFish Money Management 24 03-29-2009 11:26 AM
Hedging maildigger Money Management 3 05-31-2008 02:37 PM
Airline Oil Hedging - Interesting GammaJammer Market Analysis 0 05-19-2008 09:55 AM
Correlation indicator ImXotep Coding Forum 1 10-18-2007 12:03 PM

All times are GMT -4. The time now is 05:16 PM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.