SAN FRANCISCO (MarketWatch) -- Canadian stocks traded higher Thursday, extending gains into a fourth straight session on moderately positive economic data. The S&P/TSX Composite Index CA:$ISPTX +0.29% added 39 points, or 0.3%, to 12,231.06. The S&P/TSX Capped Energy Index XX:TTEN +0.75% led gainers, up 0.9% as crude oil futures CL1Q +0.37% moved higher. Nexen Inc. CA:NXY +2.46% gained 2.3%. The materials sector capped gains in the benchmark. The S&P/TSX Capped Materials Index XX:TTMT -0.47% lost 0.8% as gold prices GC1Q -0.18% declined. Statistics Canada released data showing real gross domestic product was unchanged in April. The market consensus was to see a dip of 0.1%, according to BNY Mellon. The country's currency strengthened, one Canadian dollar USDCAD -0.59% bought $1.0379, up 0.5%.