The Sensex edged lower on Monday due to caution over the US fiscal cliff’ talks, but ended 2012 with its best gains in three years, as strong foreign inflows and the government's fiscal and economic reforms outweighed worries about the domestic economy. Foreign investors have pumped in over $24.2 billion this year, marking the biggest inflows since a record $29.36 billion in 2010, on the back of cheaper valuations and government measures to further open up the retail and aviation sector. Stocks could gain further next year due to expected interest rate cuts from the Reserve Bank of India and on improved earnings, while investors are also gearing up for a potential revival in initial public offerings. However, challenges remain, including over-leveraged banking and corporate sectors as well as the prospect of a sovereign ratings downgrade should the government fail to get its finances under control. The benchmark BSE index fell 0.09 per cent, or 18.13 points, to end at 19,426.71 points, but surged 25.7 per cent for the year to mark its biggest gain since 2009.