Stock markets in Toronto and New York barely moved Thursday ahead of a highly-anticipated speech by the head of the U.S. Federal Reserve.

On Bay Street, the S&P/TSX composite index was ahead by a mere 4.48 points at 14,630.72, lifted by gains in gold and materials stocks.

The loonie was also barely changed, up 0.02 of a cent to 77.36 cents US against a weakened U.S. dollar.

In New York, the Dow Jones industrial average fell 33.07 points at 18,448.41, while the broader S&P 500 composite index faded 2.97 points to 2,172.47. The tech-heavy Nasdaq composite lost 5.50 points to 5,212.20.

Markets analyst Scott Smith said traders are refusing to make any major bets in the stock markets ahead of Fed chairwoman Janet Yellen's speech Friday.

She is expected to make comments at the central bank's annual summer symposium in Jackson Hole, Wyo.

"Given the price action in the markets and the squaring of positions, traders are just making sure they don't take too much risk in any one direction," said Smith, the regional director of hedging solutions at Cambridge Global Payments.

"There is a little bit of caution in regards to what Yellen is going to say tomorrow."

Most analysts will be closely watching to see if the chairwoman will give any indication on when the bank will hike interest rates, which are currently at historic lows.

Some anticipate such a move can happen as early as September, while others don't foresee it until the new year.

In recent days, several regional Fed presidents have made hawkish comments about a rise being imminent and injecting some volatility into North American stock indices.

"The Fed knows that they are under the gun to some extent because they need to continue to normalize rates because if there is another recession or downturn in the economy, they don't have wiggle room or buffer with interest rates to insulate markets," Smith said.

"Along with the fact that... there are not many excuses left to hold off on the normalization of policy."

Even still, Smith said the regional Fed presidents' comments may be aimed at "setting market expectations" about a hike potentially coming sooner than expected.

The Fed last raised its key policy rate for the first time in nearly a decade in December, pushing the rate from a record low near zero to a range of 0.25 per cent to 0.5 per cent.

Meanwhile, commodities were also trading in a narrow range for most of the day, with the October crude contract gaining 56 cents to US$47.33 per barrel.

Oil prices have been fickle in recent sessions as hopes of an upcoming production freeze or cut at OPEC's next meeting in September grew, and then faded on various media reports.

October natural gas was up five cents at US$2.89 per mmBTU, while the December gold contract fell $5.10 to US$1,324.60 an ounce.

September copper contracts were unchanged at US$2.08 a pound.