Learning to forecast, risk aversion, and microstructural aspects of financial stability