Shares of sports automaker Porsche gained about 5% on the first day of trading after parent company Volkswagen priced the long-awaited IPO at the top of its expected range the night before.