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 doubleH()doublemaxZ()doubleminZ()intstate()UP trend is -ve; DOWN trend is +ve.StringtoString()Kagi.Trendtrend()booleanupdate(double z)
-
-
-
Method Detail
-
update
public boolean update(double z)
- Parameters:
z-- Returns:
trueif 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()
-
-