function[err,F,G,Ga,Fp,Gp,Gap] = comp_ss_omegabar(x,param)
omegabarss = x;
sig = param(1);
miu = param(2);
levss = param(3);
F = normcdf((log(omegabarss))/sig + sig/2);
G = normcdf((log(omegabarss))/sig - sig/2);
Ga = G + omegabarss*(1-F);
Fp = 1/(sig*omegabarss)*normcdf((log(omegabarss))/sig + sig/2);
Gp = 1/(sig*omegabarss)*normcdf((log(omegabarss))/sig - sig/2);
Gap = 1 - F;
err = Gap*(Ga - miu*G)/((1 - Ga) * (Gap -miu*Gp)) - levss + 1;
%当err=0,即可解方程求出omegabar

