function parameter=calibration
sigma = 0.3;
chi = 1;
eta = 1/3;
beta = 0.9928;
xi = 0.65;
rho_u = 0.9;
alpha = 0.9;
phi = 0.5;
rho_p = 0.7;
gamma_1 = 0.35;
gamma_2 = 0.5;
gamma_3 = 0.15;
rho_d = 0.8;
delta = 0.025;
iota = 0.2; %%93 2
nu = 0.9728;
theta = 0.75;
epsilon = 11;
rho_x = 0.65;
tau = 5;
rho_R = 0.95;
kappa_pi = 1.5;
kappa_y = 0.125;
kappa_e = 0.05;
upsilon = 1;
rho_pstar = 0.7;
rho_Y = 0.95;
psi_R = 0.05;
psi_D = 0.15;

A_us = 1;
A_ds = 1.5;

Rs = 1/beta;
Rstars = 1/beta;
rstars = 1/beta;
pistars = 1;

xs = 1;
qs = 1;

pstars = 1;
Ystars = 1;

pi_us = 1;
pi_ds = 1;
pi_ustars = 1;
pi_dstars = 1;

z_us = 1;
z_ds = 1;

mc_us = (epsilon-1)/epsilon;
mc_ds = (epsilon-1)/epsilon;

fs = 1/nu;
rKs = fs-1+delta;

R_fstars = 1.005;
bstars = log(beta*R_fstars)/psi_R;

p_Xstartildes = 1;

es = exchange_rate_steadystate(sigma,chi,epsilon,gamma_1,gamma_2,gamma_3,nu,delta,A_ds,phi,rstars,bstars,alpha,xi,upsilon,eta);

p_Xstars = es*p_Xstartildes;

EXs = (1/(es*pstars))^(-upsilon)*Ystars;
IMs = EXs+es*rstars*bstars-es*bstars;
XIMs = IMs/p_Xstars;

Y_us = XIMs/(1-alpha)*(mc_us/p_Xstars)^(1/(phi-1));

Ms = Y_us/z_us;
Y_ds = Ms/gamma_3;

K_ds = mc_ds*gamma_1*Y_ds/rKs;

ns = (beta/nu)^(-1/iota)*K_ds;

L_ds = (Y_ds/(A_ds*K_ds^gamma_1*Ms^gamma_3))^(1/gamma_2);

ws = mc_ds*gamma_2*Y_ds/L_ds;

XDs = ((Y_us^phi-(1-alpha)^(1-phi)*XIMs^phi)/(alpha^(1-phi)))^(1/phi);

p_Xs = mc_us*alpha^(1-phi)*(XDs/Y_us)^(phi-1);

K_us = p_Xs*xi*XDs/rKs;
L_us = p_Xs*(1-xi)*XDs/ws;

Ks = K_us+K_ds;
Ls = L_us+L_ds;

Is = delta*Ks;

Cs = Y_ds/z_ds-Is-EXs;

lambdas = Cs^(-sigma);

g_u1s = lambdas*mc_us*Y_us/(1-beta*theta);
g_u2s = lambdas*Y_us/(1-beta*theta);
g_d1s = lambdas*mc_ds*Y_ds/(1-beta*theta);
g_d2s = lambdas*Y_ds/(1-beta*theta);

parameter = [sigma chi eta beta xi rho_u alpha phi rho_p gamma_1 gamma_2 gamma_3 rho_d delta iota nu theta epsilon rho_x tau rho_R kappa_pi kappa_y kappa_e upsilon rho_pstar rho_Y psi_R psi_D A_us A_ds Rs Rstars rstars pistars xs qs pstars Ystars pi_us pi_ds pi_ustars pi_dstars z_us z_ds mc_us mc_ds fs rKs R_fstars bstars p_Xstartildes es p_Xstars EXs IMs XIMs Y_us Ms Y_ds K_ds ns L_ds ws XDs p_Xs K_us L_us Ks Ls Is Cs lambdas g_u1s g_u2s g_d1s g_d2s];
end