How to manage market shocks with an algorithmic strategy?