function [LLF,llk,penalty] = jsz_like(parameters,yields, W, mats, dt, K0P_cP, K1P_cP)
% if max(parameters(1:3))>1
    
    %parameter restrictions
    lb=[-0.6+1;-0.6+1;-0.6+1;0;-inf*ones(6,1)];
ub=[-.0001+1;-.0001+1;-.0001+1;0.4;inf*ones(6,1)];
A = [[1 -1 0; 0 1 -1] zeros(2,7)];
b = [0;0];
if any(parameters>ub)||any(parameters<lb)||any(A*parameters<b)
    LLF=100000;
 
else
    K1Q_X = diag(parameters(1:3)-1);
    rinfQ = parameters(4);
    sig_p = veclt(parameters(5:end));
    Sigma_cP = sig_p*sig_p';
    if nargin < 6
        [llk, penalty] = jszLLK(yields, W, K1Q_X, rinfQ, Sigma_cP, mats, dt);
    else
    [llk, penalty] = jszLLK(yields, W, K1Q_X, rinfQ, Sigma_cP, mats, dt, K0P_cP, K1P_cP);
    end
    LLF = sum(llk);
end