computeTPTOPIndex

open fun computeTPTOPIndex(historicalValues: ArrayList<Double>, lastValue: Double, intervalDays: Int, offsetRange: Double): Double
open fun computeTPTOPIndex(historicalValues: Array<Double>, lastValue: Double, intervalDays: Int, offsetRange: Double): Double

Method to get forecast of an asset in base of days gap inserted

Return

forecast value as a double e.g. 8 or -8

Parameters

historicalValues

: previous values of asset used to compute forecast

lastValue

: last value of the asset to compare and fetch forecast

intervalDays

: days gap for the forecast range

offsetRange

: tolerance for select similar value compared to lastValue inserted

Throws

if lastValue is negative or intervalDays are less or equal to 0


open fun computeTPTOPIndex(historicalValues: ArrayList<Double>, lastValue: Double, intervalDays: Int, offsetRange: Double, decimalDigits: Int): Double
open fun computeTPTOPIndex(historicalValues: Array<Double>, lastValue: Double, intervalDays: Int, offsetRange: Double, decimalDigits: Int): Double

Method to get forecast of an asset in base of days gap inserted and round it

Return

forecast value as a double e.g. 8 or -8

Parameters

historicalValues

: previous values of asset used to compute forecast

lastValue

: last value of the asset to compare and fetch forecast

intervalDays

: days gap for the forecast range

offsetRange

: tolerance for select similar value compared to lastValue inserted

decimalDigits

: number of digits to round final forecast value

Throws

if lastValue is negative or intervalDays are less or equal to 0