Trend basket by linear regression of unc
I've been thinking about baskets lately and came up with the idea of using unrelated pairings to create trending baskets. Below are the ideas and process I used to create the basket. Thanks for the comments/questions/feedback.
1) First, download 1 year of hourly data for the 25 most commonly traded currency pairs.
2) Next calculate the correlation of all pairs and eliminate most of the relevant pairs. This leaves us with 12 pairs with the following correlations:
http://i.imgur.com/qH7ebkC.png
The basket contains the following currencies that are used multiple times:
AUD 4
CAD 4
£4
NZ$4
4 euros
$3
3) Create a trendline to simulate our desired return:
http://i.imgur.com/0hScls5.png
4) Perform a linear regression on all currency pairs on this trend line. Then we get the following coefficients (number of lots):
http://i.imgur.com/8uShMhg.png
5) If you plot a predictive linear regression line using these coefficients, you will get:
http://i.imgur.com/7eBfZ7e.png
6) If you draw a linear regression channel on this basket, you can buy the basket 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 bottom to top). If you have a broker like Oanda , you can buy/sell exactly the number of lots determined by the coefficient. Otherwise, you need to estimate the batch size. One can also buy just one basket and hold it for the long term (but adjust the lot size - see below).
7) This linear regression uses 1 year of hourly data, so the regression coefficients for the next week (or weeks) should be relatively the same. You should rerun the regression with new data every week or so to recalculate the coefficients (because they will change).
greeting,
EZ Currency
1) First, download 1 year of hourly data for the 25 most commonly traded currency pairs.
2) Next calculate the correlation of all pairs and eliminate most of the relevant pairs. This leaves us with 12 pairs with the following correlations:
http://i.imgur.com/qH7ebkC.png
The basket contains the following currencies that are used multiple times:
AUD 4
CAD 4
£4
NZ$4
4 euros
$3
3) Create a trendline to simulate our desired return:
http://i.imgur.com/0hScls5.png
4) Perform a linear regression on all currency pairs on this trend line. Then we get the following coefficients (number of lots):
http://i.imgur.com/8uShMhg.png
5) If you plot a predictive linear regression line using these coefficients, you will get:
http://i.imgur.com/7eBfZ7e.png
6) If you draw a linear regression channel on this basket, you can buy the basket 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 bottom to top). If you have a broker like Oanda , you can buy/sell exactly the number of lots determined by the coefficient. Otherwise, you need to estimate the batch size. One can also buy just one basket and hold it for the long term (but adjust the lot size - see below).
7) This linear regression uses 1 year of hourly data, so the regression coefficients for the next week (or weeks) should be relatively the same. You should rerun the regression with new data every week or so to recalculate the coefficients (because they will change).
greeting,
EZ Currency
























📦 Summary of post attachments (1)
Below are all the files shared in the reply (1).
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •