what is the least squares method 
the least squares method is a form of mathematical regression analysis used to determine the line of best fit for a set of data providing a visual demonstration of the relationship between the data points each point of data represents the relationship between a known independent variable and an unknown dependent variable this method is commonly used by statisticians and traders who want to identify trading opportunities and trends understanding the least squares methodthe least squares method is a form of regression analysis that provides the overall rationale for the placement of the line of best fit among the data points being studied it begins with a set of data points using two variables which are plotted on a graph along the x and y axis traders and analysts can use this as a tool to pinpoint bullish and bearish trends in the market along with potential trading opportunities the most common application of this method is sometimes referred to as linear or ordinary it aims to create a straight line that minimizes the sum of squares of the errors generated by the results of the associated equations such as the squared residuals resulting from differences in the observed value and the value anticipated based on that model for instance an analyst may use the least squares method to generate a line of best fit that explains the potential relationship between independent and dependent variables the line of best fit determined from the least squares method has an equation that highlights the relationship between the data points if the data shows a lean relationship between two variables it results in a least squares regression line this minimizes the vertical distance from the data points to the regression line the term least squares is used because it is the smallest sum of squares of errors which is also called the variance a non linear least squares problem on the other hand has no closed solution and is generally solved by iteration dependent variables are illustrated on the vertical y axis while independent variables are illustrated on the horizontal x axis in regression analysis these designations form the equation for the line of best fit which is determined from the least squares method advantages and disadvantages of the least squares methodthe best way to find the line of best fit is by using the least squares method but traders and analysts may come across some issues as this isn t always a fool proof way to do so some of the pros and cons of using this method are listed below one of the main benefits of using this method is that it is easy to apply and understand that s because it only uses two variables one that is shown along the x axis and the other on the y axis while highlighting the best relationship between them investors and analysts can use the least square method by analyzing past performance and making predictions about future trends in the economy and stock markets as such it can be used as a decision making tool the primary disadvantage of the least square method lies in the data used it can only highlight the relationship between two variables as such it doesn t take any others into account and if there are any outliers the results become skewed easy to apply and understandhighlights relationship between two variablescan be used to make predictions about future performanceonly highlights relationship between two variables