Time-varying rational expectations models: Solutions, stability, numerical implementation