Optimal pair-trading strategy over long/short/square positions—empirical study