Class LinearRegression
java.lang.Object
trade.invision.indicators.indicators.Indicator<LinearRegressionResult>
trade.invision.indicators.indicators.statistical.regression.LinearRegression
LinearRegression is a Num Indicator to provide the statistical best fit using the
least-squares linear regression model over a length of values.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class trade.invision.indicators.indicators.Indicator
Indicator.CacheSeries -
Field Summary
Fields inherited from class trade.invision.indicators.indicators.Indicator
cachedAddCallCount, cachedIndex, cachedValue, cacheSeries, minimumStableIndex, series -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedLinearRegression(Indicator<Num> indicator, Set<LinearRegressionResultType> resultTypes, int length) -
Method Summary
Modifier and TypeMethodDescriptionprotected LinearRegressionResultcalculate(long index) Performs the calculation of thisIndicatorat the givenindex.static LinearRegressionlinearRegression(Indicator<Num> indicator, Set<LinearRegressionResultType> resultTypes, int length) Gets aLinearRegression.linearRegressionIntercept(Indicator<Num> indicator, int length) linearRegressionNextY(Indicator<Num> indicator, int length) linearRegressionR2(Indicator<Num> indicator, int length) linearRegressionRss(Indicator<Num> indicator, int length) linearRegressionSlope(Indicator<Num> indicator, int length) linearRegressionTss(Indicator<Num> indicator, int length) linearRegressionY(Indicator<Num> indicator, int length) Methods inherited from class trade.invision.indicators.indicators.Indicator
caching, getMinimumStableIndex, getSeries, getValue, isCaching, numOf, numOf, numOf, numOf, numOfEight, numOfFive, numOfFour, numOfHalf, numOfHundred, numOfHundredth, numOfNegativeOne, numOfNine, numOfOne, numOfSeven, numOfSix, numOfTen, numOfTenth, numOfThousand, numOfThousandth, numOfThree, numOfTwo, numOfZero, purgeCache
-
Constructor Details
-
LinearRegression
protected LinearRegression(Indicator<Num> indicator, Set<LinearRegressionResultType> resultTypes, int length)
-
-
Method Details
-
linearRegressionSlope
-
linearRegressionIntercept
-
linearRegressionY
-
linearRegressionNextY
-
linearRegressionRss
-
linearRegressionTss
-
linearRegressionR2
-
linearRegression
public static LinearRegression linearRegression(Indicator<Num> indicator, Set<LinearRegressionResultType> resultTypes, int length) Gets aLinearRegression.- Parameters:
indicator- theIndicatorresultTypes- theLinearRegressionResultTypeSetlength- the number of values to look back at
-
calculate
Description copied from class:IndicatorPerforms the calculation of thisIndicatorat the givenindex.- Specified by:
calculatein classIndicator<LinearRegressionResult>- Parameters:
index- the index- Returns:
- the result (never
null)
-