Multi-period mean–variance portfolio selection with regime switching and a stochastic cash flow · Study