A semiparametric estimation of the optimal hedge ratio