Leading shares recorded their best monthly performance since June despite a last minute wobble, helped by optimism over the eurozone crisis and America's current budget discussions.

The FTSE 100 finished 3.48 points lower at 5866.82, but that still made a 1.45% gain for November, its biggest rise since the 4.7% increase six months ago. Investor hopes have been raised by this week's Greek debt deal, although some obstacles still remain, not least the details of a proposed Greek bond repurchasing scheme. Spain's banks saw a €37bn restructuring package approved by the European Commission, while across the Atlantic there were signs of progress in discussions over the US fiscal cliff, the tax rises and spending cuts due to come into force early next year. A series of positive economic figures, including UK and US GDP figures and an upbeat Chicago purchasing manager's survey, also helped sentiment.

Angus Campbell, head of market analysis at Capital Spreads, said:

It's been a roller coaster ride of a month but in the end the bulls have won hands down by pushing the index to one of its best monthly gains of the year. Buyers have once again pushed us higher as investors rush into equities ahead of December, historically a bullish month for stocks and one that has seen 23 rises out of the past 28 years for the month of December. Investors have rushed into equities in the past few days in the fear that they might miss out on the usual Christmas rally, but it isn't just early festive cheer that's attracting the buyers as the fundamentals have improved too.

Things in the eurozone have quietened down since the new debt deal on Greece was agreed and today the German parliament formally approved their aid package. Since then the borrowing costs for some of the more worrisome countries, namely Spain and Italy, have declined and remain well below their recent highs. This has done a great deal to sentiment and allowed indices to gradually continue their rally throughout the week.

There is also ongoing optimism regarding the other elephant in the room, namely the US fiscal cliff, which is expected to be thrashed out and addressed by US politicians before too long, but there's certainly a good proportion of people who'd like to see the discussions concluded sooner rather than later.

BP's shares edged up 0.55p to 431.6p, and Credit Suisse analysts issued an outperform rating despite cutting their earnings forecasts by 6% to reflect asset sales such as BP's proposed sale of its Russian joint venture stake to Rosneft. The company announced it had completed the $5.5bn sale of a number of fields in the Gulf of Mexico to Texas-based Plains Exploration. Credit Suisse said:

This will be the opportunity for BP to present a long-term outlook in its upstream business for the first time – current targets only extend to 2014. Since 2010, BP's operational performance has been somewhat overshadowed by the Macondo litigation overhang and turmoil in Russia. BP is making good progress on resolving its strategic uncertainties with the Rosneft agreement announced in October and the Department of Justice settlement on criminal liabilities in November. The "return to normal" on the Eastern and Western fronts should allow the market to focus its attention back to BP's upstream strategy. The key for BP will be to convince investors on improving momentum after three years of under-earning in upstream, and on the quality of its [projects] and growth opportunities.

Among the retailers, Kingfisher closed 1p lower at 278p in the wake of Thursday's disappointing update. It reported a 6% drop in third quarter profits, and warned the outlook was uncertain in both its key markets, with consumer confidence in France hit by uncertainty over the government's budget proposals.

A number of analysts cut their recommendations following the figures, with UBS moving from buy to neutral.

But Dixons Retail jumped 1.73p to 27.49p following news its UK and Ireland businesses were back in profit, although this was offset by continuing problems in Europe. The company said it expected to benefit from the demise of rival Comet.

With little corporate news, a number of brokers' notes had a real influence. Johnson Matthey jumped 11p to £23.99 and Croda climbed 30p to £23.81 as Credit Suisse upgraded both companies, saying:

Following third quarter results, we have upgraded Croda from underperform to neutral and Johnson Matthey from neutral to outperform. Both stocks had disappointing guidance and strongly negative share price reactions. We felt negative short-term fundamentals were thus fairly reflected in the share price.

Intertek, the testing company, added 31p to £30.90 as Berenberg moved from hold to buy.

Elsewhere Wood Group slipped 3p to 777p following this week's sale of a 4.4% stake in the energy services business by the Wood family trust.

Royal Bank of Scotland lost ground after the collapse of a deal to sell its Indian operations to HSBC.

RBS agreed to dispose of its retail and commercial business in the country - which is profitable with 400,000 customers and assets of £190m - in 2010. But the two sides failed to reach agreement by a Friday deadline. HSBC said:

The long stop date of 30 November has been reached without all conditions required to close the transaction being satisfied.

HSBC remains committed to pursuing growth in India, a key strategic market for the group, through its existing operations.

On the future of the RBS business in India, the bank said:

Consistent with the strategy to reduce or exit non-core assets and businesses, [RBS] will begin to wind down its retail and commercial banking business in India, whilst meeting all customer obligations.

RBS fell 3.8p to 295.2p while HSBC was 6.1p higher at 637.7p. Ian Gordon at Investec kept his sell recommendation on RBS and said:

It is easy to suggest that another failed disposal represents a pattern of careless behaviour, but such a conclusion would be harsh. The deal has collapsed, but to put this into perspective, it is not another Santander, and incremental wind-down costs should be modest.

In October, Santander walked away from its agreement to acquire 316 UK branches, following protracted difficulties with technology transfer. However, while RBS remains bound by the European Commission's requirement to sell the assets as part of its state aid sanctions, we see little prospect of an alternative purchaser coming close to matching the original terms, and here we expect RBS to crystalise a loss on disposal of around £500m in due course.

[Thursday's] Bank of England financial stability report may have prompted fresh concerns in relation to RBS' capital and/or sub-optimal measures that might be "encouraged" by fresh regulatory scrutiny. We do not share these worries. RBS has over-delivered in terms of non-core run-off and balance sheet repair. The problem is earnings. After 5 years of losses, we expect a slow recovery in return on equity to just 6% by 2015.

A number of bid tales did the rounds during this week, with BAE Systems, up 0.5p at 327.3p, said to be in the sights of US group Lockheed Martin. Renewed speculation lifted hedge fund group Man by 0.25p to 76.8p. But BG lost 8p to £10.70 as bid froth faded, despite analysts at Exane BNP Paribas saying earlier in the week:

Given recent guidance disappointment, we see growing M&A appeal in BG.

Burberry lost 30p to £12.87 after sparking into life earlier in the week on excited gossip about a possible £20 a share offer.

Direct Line, the insurer spun out of Royal Bank of Scotland, dipped 0.25p to 202.75p it continued its £100m cost cutting programme. The group, Britain's biggest motor insurer, is on course to join the FTSE 100 at the next index review on 12 December. Other possible promotions include Tui Travel, up 1.8p to 271.3p, and Easyjet, 6.5p better at 715.5p.

Those in danger of relegation from the leading index include Pennon, down 5.5p at 619p, Melrose, up 0.4p at 213.1p, and Serco, 1.5p lower at 547p. Serco was this week told it would lose its contract to run the National Physical Laboratory in April 2014. Citigroup said the contract accounted for around 1.5% of sales and cut its earnings forecast for 2014 by 2% as a result of the loss. But it kept a buy rating and 670p target:

Serco remains one of our European business services sector picks for its cyclical resilience, organic growth re-acceleration and exposure to austerity-based outsourcing.

Arm recovered 11.5p to 774p after earlier weakness following reports that Microsoft's recently launched Surface tablet, which uses the UK company's chip architecture, had made a disappointing start.

Invensys added 10.5p to 315.5p, still benefiting from Wednesday's news it was selling its rail division to Siemens for £1.7bn, a much higher price than analysts had put on the business. Traders believe the rest of the company could be vulnerable to a predator such as Emerson, which had previously made an approach to the group. UBS said:

[The sale price] represents a sum that not even the most bullish would likely have thought possible. On a stand-alone basis, the remaining operations management and controls business is only semi-appealing, but as Rail has proved, it may be worth more to someone else, with Emerson a potential contender for operations management. Assuming only a modest re-rating in the remaining business, we think Invensys might now be worth 300p.

Finally, specialist electronics group Acal fell 6.5p to 157.75p after it said it was seeing a recovery in its key UK, German and French markets but this was coming through more slowly than expected. It cut its earnings growth forecast for next year by 8% but still expects a rise of 20%.

Half year profits fell from £4.1m to £3.2m or from £1.9m to £700,000 after the costs of cutting back a year ago - including reducing its presence in Spain and axing 40 jobs - as well as investment in a marketing website to attract new customers, which will cost a total of £1.5m.

Chief executive Nick Jefferies said the situation had now stabilised in Europe, and in October and November Acal's orders grew by 7%. The company has improved its margins by moving from distributing standardised products to more customised equipment such as specialised controls for heat exchange equipment. Some 87% of its sales are now customised products. "We've gone from being a Sainsbury's to becoming a specialised delicatessen," said Jefferies.

With £2m of cash in the bank and debt facilities of up to £40m, the company is on the lookout for acquisitions, particularly in its key markets. If necessary, the company would be prepared to issue equity for the right purchase.

Peel Hunt reduced its price target from 220p to 200p but said:

The outlook is clearly tough, but the company is winning market share from smaller competitors and we anticipate further profit progression next year. We do not believe that the current rating reflects the improving margins, strong balance sheet or the opportunity for significant growth once the economic backdrop improves. We are reducing our price target to reflect the downgrade to earnings, but are reassured of the long-term opportunity.