Package tech.nmfin.trend.dai2011
Class Dai2011Solver
- java.lang.Object
-
- tech.nmfin.trend.dai2011.Dai2011Solver
-
public class Dai2011Solver extends Object
Solves the stochastic control problem in the referenced paper to get the two thresholds.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Dai2011Solver.Boundaries
static class
Dai2011Solver.Builder
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Dai2011Solver.Boundaries
solve()
Solves the HJB equations (a nonlinear PDE system) to get the optimal stopping regions, i.e., the buying region (buy threshold) and the selling region (sell threshold).
-
-
-
Method Detail
-
solve
public Dai2011Solver.Boundaries solve()
Solves the HJB equations (a nonlinear PDE system) to get the optimal stopping regions, i.e., the buying region (buy threshold) and the selling region (sell threshold).For solving the non-linear system, (eq. 9), an iterative scheme is needed in each time step. The initial solution of the iterative scheme is solved by taking the non-linear part to be zero. Then iteratively solve the system until convergence. In most cases, it takes few (or one) iterations to converge.
- Returns:
- the optimal buy and sell boundaries
-
-