Each of the investment funds available to federal employees through their 401(k)-style retirement savings program posted gains in 2012, with three stock-oriented funds leading the way.

The Thrift Savings Plan reported Wednesday that a fund tracking an international stock index gained 18.62 percent for the year, slightly above an index of small U.S. company stocks that rose 18.57 percent. Meanwhile, the fund tracking the S&P 500 index of large U.S. company stocks gained 16.07 percent.

TSP also reported that a bond fund rose 4.29 percent and a government securities fund finished up 1.47 percent

The TSP also offers five “lifecycle” funds that mix shares of the other funds in differing ratios depending on the expected withdrawal date. The most aggressive of those funds, with a 2050 target withdrawal date, gained 15.85 percent. The target date 2040 fund was up 14.27 percent; the 2030 fund, 12.61 percent; and the 2020 fund, 10.42 percent.

An income fund geared toward those already taking withdrawals or who expect to do so soon was up 4.77 percent.

For 2013, the standard investment limit in the TSP is rising from $17,000 to $17,500. Investments of up to an additional $5,500 are allowed for those 50 or older during the year. Those are the same limits applying to similar savings plans elsewhere.

Participants may invest through a traditional pretax design, a Roth after-tax design or both, up to the dollar limit. The TSP is open to federal and postal employees and uniformed military personnel. Those who have separated for retirement or other reasons may leave their accounts in place but may not make new investments.