Serving the Quantitative Finance Community

 
User avatar
EdisonCruise
Topic Author
Posts: 54
Joined: September 15th, 2012, 4:22 am

How to solve this HJB equation more stably?

August 17th, 2023, 6:47 am

For an HJB equation like this,  
$$ \frac{dV(t,x)}{dt}+max(H1(V,x),H2(V,x),H3(V,x))=0 $$
I try to solve it with Euler scheme until the actions becomes steady. I find when x<=x0, the optimal action is H1, but when x>x0, at each integration time step, the optimal action switches between H2 and H3. I also find that the diffirence between H2 and H3 is generally smaller than 1e-14, which seems to be round off error. How to make the selection of optimal action more stable when x>x0?
 
User avatar
Cuchulainn
Posts: 22927
Joined: July 16th, 2004, 7:38 am

Re: How to solve this HJB equation more stably?

August 18th, 2023, 1:33 pm

Hi,
This nonlinear (ODE/PDE?) equation cannot be solved by classical methods in general due to nonlinearity, an infinity of solutions and stuff.

Euler will probably not be a good approach going forward for various well-known reasons. Plan B could be modified Euler (Heun) or evern {Boost C++, Python} ODEINT. Might  be worth a shot:

https://en.wikipedia.org/wiki/Heun%27s_method

But we need monotone, stable and consistent scheme that converges to the viscosity solution. And the solution must  be unique.

A similar idea is UVM model

https://onlinelibrary.wiley.com/doi/epd ... wilm.10014
 
User avatar
Cuchulainn
Posts: 22927
Joined: July 16th, 2004, 7:38 am

Re: How to solve this HJB equation more stably?

August 18th, 2023, 1:40 pm

For an HJB equation like this,  
$$ \frac{dV(t,x)}{dt}+max(H1(V,x),H2(V,x),H3(V,x))=0 $$
If you provide a full spec of this DE I can see if I can have a shot using ODEINT and stuff.
 
User avatar
EdisonCruise
Topic Author
Posts: 54
Joined: September 15th, 2012, 4:22 am

Re: How to solve this HJB equation more stably?

August 25th, 2023, 3:36 am

Thank you so much for your suggestions Cuchulainn. It seems that I can solve the equation below instead.  
$$ \frac{dV(t,x)}{dt}+max(H1(V,x),H2(V,x)-e,H3(V,x))=0 $$
Where e is a very small number like 1e-12.
In practice, action H2 indeed has marginal cost e compared with H3, though e is difficult to quantify. This way helps to suppress numerical oscillations.  
 
User avatar
Cuchulainn
Posts: 22927
Joined: July 16th, 2004, 7:38 am

Re: How to solve this HJB equation more stably?

August 26th, 2023, 9:17 am

Super. You're welcome. Looks like a promising route. 
I am learning stuff like this (mostly, slow osmotic flow :)). A common theme is to regularise/perturb the PDE by a higher order one (like with singular pertirbations). In your case the perturbation seems to be in the zero-order term (or is there an elliptic PDE hiding in there?)

This thesis might be relevant?

https://core.ac.uk/download/pdf/217192471.pdf
Last edited by Cuchulainn on August 26th, 2023, 9:26 am, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 22927
Joined: July 16th, 2004, 7:38 am

Re: How to solve this HJB equation more stably?

August 26th, 2023, 9:26 am

An interesting question is how convergence (monotone) depends on [$]\varepsilon[$].