Expectation formation and regime switches