filter stocks before running optimization