LINEAR REGRESSION
Introduction
Linear regression is a method of organizing data. Sometimes it is appropriate to show data as points on a graph, then try to draw a straight line through the data. Linear regression is an algorithm for drawing such a line. Linear regression typically uses the least squares method to determine which line best fits the data. R-Squared is a measure of how well the data points match the resulting line.
Many trading strategies assume that the way a stock moves during a specific time of day can be used to predict the way a stock will move later in the day. How would you verify or automate such a strategy? Start by recording historical values. Each day, record the size and direction of the change in the first period, and the direction and size of the second change, later in the day. One point on a graph will represent each day's data. If the original idea was correct, these points should look like a line. If this is the case, a trader can look at the size of a move in the morning, and guess what the second move that day will look like.
Linear regression provides a deterministic way to this. First, linear regression will provide an R-Squared value for the historical data. If this value is too small, the data is not linear, so the original assumptions must change. If R-Squared is large enough, then the linear regression will provide the best prediction of the second move each day based on the first move.
Imagine that the six points on the graph below represent the historical data that we collected above. A common way to look at this is to say that the trend is obvious from five of the points, and the sixth point must be a mistake. This type of reasoning leads to traders who are very successful right up until the day they loose it all. The least squares method provides a more appropriate way to view the data, because it incorporates all of the points. In this case it is clear that the strategy is risky, and requires more work.
Quadratic regression models are often used in economics areas such as utility function , forecasting, cost-befit analysis, etc. This JavaScript provides parabola regression model. This site also presents useful information about the characteristics of the fitted quadratic function.
Prior to using this JavaScript it is necessary to construct the scatter-diagram for your data.
If by visual inspection of the scatter-diagram, you cannot reject a "parabola shape", then you may use this JavaScript. Otherwise, visual inspection of the scatter-diagram enables you to determine what degree of polynomial regression models is the most appropriate for fitting to your data.
Below are some example of these regressions:-
that is all about the regression that i known this far..as now the mid break is begin..let's all enjoy our holiday!!!
Hepi hOLIDAy!!!!!! xD
Hepi hOLIDAy!!!!!! xD