TORONTO — The Toronto stock market closed higher Friday as traders shook off the geopolitical worries that had roiled markets the previous session and refocused on corporate earnings reports.The S&P/TSX composite index recovered from early losses to advance 62.09 points to 15,266.57.Concern over possible fallout from the shooting down of a Malaysian Airlines jetliner over Ukraine had cast a shadow over markets on ThursdayUkraine accused pro-Russian separatists of bringing down the airliner with 298 people aboard with a surface-to-air missile, sharply escalating the crisis in the region.“Yes, it’s tragic but the market is shaking it off — gold, oil, everything is coming off,” said Wes Mills, chief investment officer Scotia Private Client Group.“You could see these events are now fully known, unlike the other Malaysian plane we worried about what form of terrorism it might be. At least in this case, we know, it’s probably the Russian rebels and we know where the plane is.”Markets were also focused on the Middle East as Israel launched a ground offensive in Gaza aimed at destroying militants’ tunnels and rocket launcher sites.The Canadian dollar was resilient, up 0.19 of a cent at 93.14 cents US as the latest data showed rising inflation. The consumer price index rose 0.1% in June versus expectations for a slight decline. That translated into an annualized gain of 2.4% against the 2.3% advance that economists had forecast.U.S. indexes were higher after racking up sharp losses on Thursday as the Dow Jones industrials moved ahead 123.37 points to 17,100.18, the Nasdaq rose 68.7 points to 4,432.15 and the S&P 500 index gained 20.1 points to 1,978.22.The industrials sector was the leading TSX gainer, up 1.7% as Canadian Pacific Railway (TSX:CP) climbed $6.76 or 3.34% to $209.09 on top of Thursday’s 2.25% gain that followed the release of a strong quarterly earnings report. Canadian National Railways (TSX:CNR) advanced $1.31 to $73.08 ahead of earnings coming out on Monday.“These rails are just phenomenal — CP in particular far exceeded my expectations and they’ve delivered,” Mills said. “They’ve got everything working for them.”The energy sector gained 1.05% with August crude on the New York Mercantile Exchange down six cents at US$103.13 after two days of strong gains that followed the release of data showing a sharp drawdown of crude inventories in the U.S. last week. The metals and mining group lost 1.2% as September copper declined four cents to US$3.18 a pound.The gold sector gave back about 0.6% as gold prices backed off after running up $17 on Thursday with the August contract down $7.50 to US$1,309.40 an ounce.In other earnings news, General Electric shares were down 0.56% to US$26.46 after the industrial conglomerate reported earnings that rose by 13% in its second quarter to US$3.55 billion, or 35 cents per share. Ex-items, earnings were 39 cents a share, which met expectations. General Electric also said that it is targeting late July for the initial public offering of its credit card business, named Synchrony Financial.The strong railway gains helped push the TSX up 141 points or 0.93% this week. A generally strong run of earnings reports pushed the Dow up 156 points or 0.92%.