% ssvar2.m

function z = ssvar(N1,N2,alpha,K)
%function z = ssvar(N1,N2,alpha,K, khat)
% Computes steady state variance of the worst shock scenario
% for the Muth filter (2x1 model)
% Input:
%  N1 first component of optimal feedback rule for worst shock (state)
%  N2 second component of optimal feedback rule for worst shock (signal)
%  alpha - signal to noise ratio
%  K - trial filter value
%  khat - optimal robust filter value (found elsewhere)
%  References: Hansen-Sargent "Robust Filtering and Control in
%	Macroeconomics,"  chapter 4 'Dual filtering problem'


z = (alpha^2+K^2)/(1-(1-K-alpha*N1-K*N2)^2);