Code

Open-source implementations accompanying my research papers.

YadhHafsi/Policy-Gradient-Learning-for-Distributionally-Robust-OptimizationPython
Reference implementation of Algorithm 1 of the paper. Reproduces all figures across four benchmarks: coin toss, inventory control, self-exciting bandits, and robust linear-quadratic control under Wasserstein ambiguity.
Wasserstein radius ε = 0.35
Interactive: grow the ambiguity ball and watch the adversary shift the model — the robust policy optimizes against the worst case P*.
murex/deep-mkv-genPython
Official implementation of the Deep McKean–Vlasov generative model: learning generative dynamics for financial time series with soft law constraints via forward–backward SDEs.
time t = 0.40
Interactive: particles generated by the McKean–Vlasov dynamics — with law constraints on, the marginals are pinned to the prescribed law along the whole path, not just at the terminal time.
TomasEspana/qrm_optimal_executionJupyter Notebook
Implementation of the reinforcement-learning approach to optimal execution in a queue-reactive limit order book model, including the market simulator and training notebooks.
Interactive: a queue-reactive limit order book — arrival intensities depend on queue sizes; empty a best queue (or hit "sell") and the mid price moves.
YadhHafsi/Optimal-Execution-under-Incomplete-InformationJupyter Notebook
Numerical solvers and simulation experiments supporting the paper: optimal execution with partial information on liquidity, via stochastic filtering and control.
Interactive: a self-exciting order flow whose baseline intensity switches with a hidden liquidity regime — the execution problem is solved under this partial information.