Optimal investment policy in the time consistent mean–variance formulation