vendredi 3 avril 2015

Trend basket by linear regression of uncorrelated pairs

I've been thinking about baskets lately and came up with an idea for using non-correlated pairs to create a trending basket. Below is my idea and process used to create the basket. Comments / questions / feedback is appreciated.



1) First, download 1 year of hourly data of the 25 most commonly traded pairs.



2) Next calculate the correlation of all pairs, and eliminate most of the correlated pairs. This leaves us with 12 pairs with the below correlations:









This basket has the following currencies used this many times:



AUD 4

CAD 4

GBP 4

NZD 4

EUR 4

USD 3



3) Create a trend line to mimick the returns we want to have:









4) Run a linear regression of all of the pairs on this trendline. We then get the following coefficients (lot sizes):









5) If you plot a predicted linear regression line using these coefficients, you get this:









6) If you draw a linear regression channel on this basket, you can buy the basket when at the bottom of the channel (or draw an EMA of the basket, and buy when the basket crosses the EMA of the basket from below to above). If you have a broker like Oanda , you can buy/sell exactly the lot size as determined by the coefficients. Otherwise you need to approximate lot sizes. One can also just buy the basket and hold for the long term (but adjust lot sizes -- see below).



7) This linear regression uses 1 yr of hourly data, so the regression coefficients should be relatively the same for the next week (or weeks). The regression should be re-ran every week or so with new data to recalculate the coefficients (as these will change).



Regards,

EZcurrecy

Trend basket by linear regression of uncorrelated pairs

0 commentaires:

Enregistrer un commentaire