A quantitative trading model that can traverse bull and bear markets