Learning to manage losses (Risk control)