Investing for resilience