This Python repository contains the implementation of the finite difference method for solving the Hamilton-Jacobi-Bellman (HJB) equation associated to the importance sampling (IS) problem of diffusion processes.
Consider the stochastic process in
We aim to estimate the following expectation value by doing importance sampling
where
Every control
It is well known that the quantity that we want to estimate satisfies the following BVP on the domain
where
- Finite difference method for the 1d and 2d cases where the original stochastic dynamics follow the overdamped langevin equation with double well potential.
- clone the repo
git clone git@github.com:riberaborrell/sde-hjb-solver.git
- move inside the directory, create virtual environment and install required packages
cd sde-hjb-solver
make venv
- activate venv
source venv/bin/activate
- create config.py file and edit it
cp src/sde_hjb_solver/config_template.py src/sde_hjb_solver/config.py
in step 2) also install developement packages
make develop
Overdamped langevin dynamics with the 1-dimensional double well potential and the momgent generating function (MGF) setting
for
$ python src/sde_hjb_solver/compute_hjb_solution_1d_st.py --setting mgf --alpha-i 1 --beta 1 --h 0.001 --plot
O. l. dynamics with the asymmetric 2-dimensional double well potential,
$ python src/sde_hjb_solver/compute_hjb_solution_2d_st.py --setting mgf --beta 1 --h 0.05 --plot
O. l. dynamics with the 2-dimensional triple well potential and the committor setting: