The length of time the Federal Reserve keeps its key interest rate near zero will depend on how far the U.S. economy remains from the central bank's employment and inflation goals, and how long it will likely take to meet them, Fed Chair Janet Yellen said on Wednesday.
Yellen, in her second public speech as Fed chair, largely restated the central bank's stance, stressed that it would respond to shifting economic conditions as it judges when to finally tighten monetary policy.
Read MoreRising rates may sting consumers
The stock market held onto most of the session's gains following Yellen's dovish remarks, with the Nasdaq flirting with a 1-percent rise. Treasurys ticked slightly lower. The five-year Treasury note saw buying ahead of Yellen's speech. Following it, thought, yields spiked as prices fell.
The central bank, frustrated with the slow U.S. recovery from recession, aims for maximum sustainable employment and a rise in inflation from just above 1 percent now to 2 percent.
"I hope it's completely clear that while monetary policy is very accommodating at this point, and I focused on the need to keep it so or to adjust it to make sure the recovery remains on track," Yellen said during a question-and-answer session at the Economic Club of New York. "As the recovery proceeds and healing occurs, it's obvious that we will need to tighten monetary policy to avoid overshooting our target."
She added that the Fed remains focused on removing accommodation when the time is right and that the central bank has learned that overshooting its target can be "very costly to reverse."
"The larger the shortfall of employment or inflation from their respective objectives, and the slower the projected progress toward those objectives, the longer the current target range for the federal funds rate is likely to be maintained," she said. "This approach underscores the continuing commitment of the (Fed's policy-setting committee) FOMC to maintain the appropriate degree of accommodation to support the recovery."
"The new guidance also reaffirms the FOMC's view that decisions about liftoff should not be based on any one indicator, but that it will take into account a wide range of information on the labor market, inflation, and financial developments."