Start Trading Now Get Started
Table of Contents
Affiliate Disclosure
Affiliate Disclosure DailyForex.com adheres to strict guidelines to preserve editorial integrity to help you make decisions with confidence. Some of the reviews and content we feature on this site are supported by affiliate partnerships from which this website may receive money. This may impact how, where and which companies / services we review and write about. Our team of experts work to continually re-evaluate the reviews and information we provide on all the top Forex / CFD brokerages featured here. Our research focuses heavily on the broker’s custody of client deposits and the breadth of its client offering. Safety is evaluated by quality and length of the broker's track record, plus the scope of regulatory standing. Major factors in determining the quality of a broker’s offer include the cost of trading, the range of instruments available to trade, and general ease of use regarding execution and market information.

Filtering Trends with Linear Regression Analysis

By Adam Lemon

Adam Lemon began his role at DailyForex in 2013 when he was brought in as an in-house Chief Analyst. Adam trades Forex, stocks and other instruments in his own account. Adam believes that it is very possible for retail traders/investors to secure a positive return over time provided they limit their risks, follow trends, and persevere through short-term losing streaks – provided only reputable brokerages are used. He has previously worked within financial markets over a 12-year period, including 6 years with Merrill Lynch.

Please don’t be intimidated by the headline – I promise it’s a lot easier than the title sounds! Some time ago I wrote an article about indicators you can use to filter trends. This means that you identify when the price of something has been moving up or down over some time. The article researched using a few filters and found that major breakouts and the ADX indicator could improve the raw trend results. There is another filter I overlooked, and I want to cover this today: linear regression analysis. What is it and how does it work? Trend Lines

Linear regression is just a mathematic model that plots the line that most closely fits the prices in a chart. The line drawn is straight. From this line two important metrics can be calculated: the slope of the line, which can tell you the direction and exact angle of the trend, and “R squared”, which tells you how closely the prices fit to the line running most directly through the trend. For here is a curious fact: trends are usually more reliable when the price “hugs” the trend line, if the price moves wildly with mots of deviation from the average, the trend is less likely to keep moving. This means that when you are trading a trend, the more “orderly” the trend looks, the better your odds of success should be. We can illustrate this with some research.

I took historical daily prices of the EUR/USD currency pair from 2001 until a few weeks ago. The average daily directional price movement was 0.00%. I then applied a 20-day linear regression and went long each day there was a meaningfully positive slope and short each day there was a meaningfully negative slope. This covers trend direction, although it needs to be noted that 20 days is very short. This gave results that were a little worse than random! Finally, I added a filter to the slope, where the R squared value had to be in the top half of its potential range (between 0 and 1, so 0.5 or greater). This improved the results, producing an average daily win of 0.01%, and a win rate of about 51.30%. These numbers are small, but using over 4000 days as a large sample over 16 years, does mean that the result is significant.

Most charting software includes a linear regression analysis which will plot the line on the chart, showing standard deviations either side (which you can customize), as well as values for the slope and R Squared.

Adam Lemon
About Adam Lemon

Adam Lemon began his role at DailyForex in 2013 when he was brought in as an in-house Chief Analyst. Adam trades Forex, stocks and other instruments in his own account. Adam believes that it is very possible for retail traders/investors to secure a positive return over time provided they limit their risks, follow trends, and persevere through short-term losing streaks – provided only reputable brokerages are used. He has previously worked within financial markets over a 12-year period, including 6 years with Merrill Lynch.

 

Most Visited Forex Broker Reviews