Class KagiModel
- java.lang.Object
-
- tech.nmfin.meanreversion.hvolatility.KagiModel
-
public class KagiModel extends Object
Maintains the states of a KAGI model.
-
-
Constructor Summary
Constructors Constructor Description KagiModel(double H)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
H()
double
maxZ()
double
minZ()
int
state()
UP trend is -ve; DOWN trend is +ve.String
toString()
Kagi.Trend
trend()
boolean
update(double z)
-
-
-
Method Detail
-
update
public boolean update(double z)
- Parameters:
z
-- Returns:
true
if the state changes sign
-
H
public double H()
-
state
public int state()
UP trend is -ve; DOWN trend is +ve.- Returns:
- -1 if a min is found (UP trend); +1 is a max is found (DOWN trend)
-
trend
public Kagi.Trend trend()
-
minZ
public double minZ()
-
maxZ
public double maxZ()
-
-