Home > Technical analysis > Indicators and oscillators > Linear Regression

# Linear Regression

The relationship among two or more than two sets of data can be measured with **regression analysis**. The purpose of the Linear regression is to show the relationship through a straight line describing the data and then to show possible values by stretching this line.

The method of least squares is the most spread method of using a regression line. Taking the sum of the squares of the vertical deviations from each data point to the line down to minimal values is the way this method calculates the most suitable line for the certain data. The vertical deviation of the point can be considered as 0 if it is located directly on the fitted line. As far as deviations squared and added after that negative or positive, do not have a considerable sense. The smallest sum or "error" of the line is reached when the line fits to the data points as close as possible.

This line can be considered as a description of an "equilibrium" price. In this case, any fluctuations upward or downward from the line can show excessively zealous sellers or buyers. There are also a number of possibilities of using the regression line. One of them is called price forecasting. The strengthen line can be considered as a price forecast, so that you can trade following its direction. It is much more effective when used at quite long time periods. However, it should still be used carefully as there can be considerable losses due to prices fluctuations. You can create a channel using this line and two parallel lines over and under it. For further information, see the entries for Linear Regression Channel.