In British politics a strange, dark political battle is taking shape. A significant number of Conservative MPs sense the next election is as good as lost, arguing openly it is almost impossible for them to win, and even if victory were achievable the current leadership would blow it as they did last time. Logically, if one side is down the other should feel buoyant, but in an odd twist a lot of Labour MPs are also gloomy about their prospects. They regard their party's poll lead as hopelessly fragile and view Ed Miliband as a weak leader. Both sides in the battle think they are going to lose.

As part of the strange topsy-turvy dynamic it is some Conservative MPs who see Miliband as formidable. The most striking compliments about Miliband that I have heard recently came in a BBC interview with the former shadow home secretary, David Davis. He was not merely making mischief. In private, too, Davis has been known to outline Miliband's strengths. Conversely, I spoke to one shadow Cabinet member and a senior Labour adviser this week who both regard David Cameron as the Conservatives' biggest electoral asset, and yearn for more of the same leader-like qualities in Miliband.

From week to week, the pessimism barometer varies. In recent days I sensed a rise in pessimism in Labour's ranks and a fall in Conservative gloom. But there is not much in it, and it takes little to generate a swing in the opposite direction.

The dark mood has many causes. One of the most significant, perhaps pointing to a lasting change in our political culture, is the character of the 2010 intake of Conservative and Labour MPs. On both sides there are independent-minded characters who feel a greater loyalty to their constituents than to their leaders. Some of the newer MPs are less bothered about securing the approval of Cameron or Miliband than they are in fighting local causes or speaking out on issues. In some cases they would almost prefer to lose if their causes would be better served by such an outcome.

A few Labour MPs wonder whether victory in such a dismal economic context is worth the titanic effort required to win, and have doubts whether the current leadership could rise to the challenge of power. Some Tories yearn for a leader unequivocally opposed to pulling out of Europe, and assume they will get one if Cameron were to lose. When they speak to journalists, Labour and Tory MPs, including those that ache to win, express doubts about their parties' prospects. Journalists report the doubts and the pessimism on each side feeds on itself.

The broader context fuels the insurrectionary despondency. In a hung parliament there are more MPs who won their seats by a close margin. In order to retain them, some conclude that they must play to the anti-politics mood and stress that they are different to their leaders, whom voters regard as being all part of the same failing establishment.

The fixed-term parliament of five years also plays its part. Miliband and Ed Balls are wary of making big, detailed policy announcements in case they have to change them by 2015, still a long way off. Labour MPs take a different view and despair about the lack of policy clarity. On the other side of the gloomy divide Tory MPs make mischief, knowing that the election is still two years away. I spoke to one on Thursday who told me cheerfully he was preparing what he called a wheeze that would trouble the leadership in the next week or so. He was enjoying himself. But I doubt if he would be planning so many wheezes if an election he fears his party will lose were due next year.

We are not used to this. In the 1980s Conservatives were fairly confident of winning elections. From the mid-1990s most Labour MPs assumed they would win the three elections that followed. There should be space in the current fearful pessimism for a formidable, self-confident leader to offer some vision and hope. After all, if one party thinks it is going to lose the other could at least affect inspiring confidence. But both leaderships respond to the pessimism defensively.

Labour agonises over what to do about a referendum on Europe and speaks less robustly about an alternative economic policy, having concluded it must be perceived to be "tough" as the Tories on the economy and welfare, even though the Conservatives assume they are heading for defeat. Cameron gave up long ago articulating his self-described progressive agenda and moved to the right in a bid to reassure his assertive pessimists.

In their insecurity both leaderships turn for inspiration to election campaigns their parties won in the past, and when they were serving their political apprenticeships. Cameron and George Osborne look to 1992. Miliband and Balls turn increasingly to Labour's techniques in 1997.

But the nearest parallel to the current situation is the build-up to the election in February 1974 when, according to diaries and memoirs from that era, significant sections of both big parties expected defeat. Sure enough, they both failed to win. The pessimism becomes self-fulfilling. There will be many twists and turns over the next two years, but if neither party thinks they can win, neither will win.