function [LLF,llk,penalty,sigma_e,K0Q_cP, K1Q_cP] =...
    jsz_like_L_macro_3(parameters,yields, W, mats, dt, innovations,L)
% if max(parameters(1:3))>1
    npar=length(parameters(5:end));
    %parameter restrictions
    lb=[-1;-1;-1;0;-inf*ones(npar,1)];
ub=[0;0;0;0.4*1000;inf*ones(npar,1)];

if any(parameters>ub)||any(parameters<lb)
    LLF=inf;
 
else
    tmp1=parameters(1)+1;
    tmp2=parameters(2)+tmp1;
    tmp3=parameters(3)+tmp2;
    tmp=[tmp1;tmp2;tmp3];
    K1Q_X = diag(tmp-1);
    rinfQ = parameters(4);
    sig_p = veclt(parameters(5:end));
    Sigma_cP = sig_p*sig_p';
  
    [llk, penalty,~, ~, ~, ~, sigma_e,K0Q_cP, K1Q_cP, rho0_cP, rho1_cP, cP, llkP, llkQ] = jszLLK_L_macro(yields, W, K1Q_X, rinfQ, Sigma_cP, mats, dt, innovations,L);
 
    LLF = sum(llk);
end