TORONTO -- The Toronto stock market closed slightly lower as investors took some profits from four weeks of solid gains and awaited a heavy slate of corporate earnings this week.

Traders also digested earnings from tech giant Apple after the close that beat on earnings and revenue.

The S&P/TSX composite index lost 27.58 points to 13,371.84 amid weak U.S. manufacturing and housing data.

The Canadian dollar rose 0.09 of a cent to 95.74 cents US.

U.S. indexes were also lacklustre amid data showing that U.S. factories barely boosted their output in September, adding to other signs that the economy was slowing even before the government shutdown began on Oct. 1.

The Dow Jones industrials slipped 1.35 points to 15,568.93 as the U.S. Federal Reserve announced that manufacturing production rose only 0.1 per cent in September, down from a 0.5 per cent gain in August.

Overall industrial production increased 0.6 per cent in September, mostly because of a 4.4 per cent jump in utility output.

Other data showed that pending home sales fell 5.6 per cent in September.

The Nasdaq was down 3.23 points to 3,940.13 while the S&P 500 index was ahead 2.34 points to a fresh record close of 1,762.11.

Apple (Nasdaq:AAPL) turned in earnings per share of $8.26, much higher than the $7.96 that analysts had forecast. Revenue of $37.5 billion beat expectations of $36.93. The company's stock was down 3.75 per cent in after-hours trading.

In Canada, traders will be taking in earnings from a variety of resource heavyweights this week, including Suncor Energy (TSX:SU), Canadian Oil Sands (TSX:COS) and First Quantum Resources (TSX:FM) on Wednesday while, Imperial Oil (TSX:IMO) posts results the following day. Transport giant Bombardier (TSX:BBD.B) also reports Thursday.

Last week, strong earnings helped push the TSX up 1.24 per cent, the latest in a string of weekly gains on the TSX which has left the main index ahead seven per cent year-to-date with investors also encouraged by steady economic improvement in China and Europe.

"It's really continuing, I think the strength that we saw since the summer, the TSX also had a very solid third quarter with some of the commodity sectors becoming less oversold," said Norman Raschkowan, North American strategist at Mackenzie Financial.

"It's partly a reflection that people are more constructive in their view of the world economy and I think it's helped commodity prices broadly and that of course is always good for Canada."

The health care sector was the biggest percentage decliner, down 1.24 per cent. Valeant Pharmaceuticals International, Inc. (TSX:VRX) fell $2.26 to $115.34 after it agreed to pay $142.5 million to settle all outstanding disputes with Anacor Pharmaceuticals of Palo Alto, Calif.

Industrials were lower with both of the big railways down after racking up solid gains last week in the wake of better than expected earnings reports. Canadian Pacific Railway (TSX:CP) moved down $1.87 to $148.17 while Canadian National Railways (TSX:CNR) slipped $1.15 to $114.03.

Techs were also weak with CGI Group (TSX:GIB.A) down another 63 cents to $34.96. A subsidiary, CGI Federal, was one of the main contractors for the U.S. government's troubled health-care insurance website and its shares have slid almost nine eight per cent since Oct. 16. A congressional committee was told last week that the government didn't allow enough time to test the system before it went online Oct. 1.

Commodities were mixed and the base metals sector lost 0.75 per cent with December copper unchanged at US$3.27 a pound. Teck Resources (TSX:TCK.B) gave back 60 cents to C$29.67.

The energy sector gave back 0.58 per cent while December crude closed up 83 cents to US$98.68 a barrel. Canadian Natural Resources (TSX:CNQ) declined 63 cents to C$32.69.

Gold stocks led advancers, up about 0.9 per cent while December bullion closed 30 cents lower to US$1,352.20 an ounce. Goldcorp (TSX:G) improved by 33 cents to C$29.31.

Meanwhile, traders also looked to this week's Federal Reserve policy meeting amid speculation on when the Fed will reduce its key monetary stimulus that has kept long term rates low and supported a rally on many stock markets.

The Fed is currently buying $85 billion of U.S. government bonds and other securities but there are low expectations for the Fed doing anything to taper just yet.

"Because of delayed data, the Fed won't have enough information to determine whether the economy is strengthening sufficiently to warrant tapering," said BMO Capital Markets senior economist Sal Guatieri.