In a time of universal glumness, optimism is a revolutionary act. Perhaps the oddest aspect of our post-referendum politics is that many Remainers have come to regard pessimism as their own.

The very act of being chirpy puts you in the enemy camp. When, for example, the Australian High Commissioner, Alexander Downer, told the Today Programme that people should cheer up, the editor was deluged with complains from bitter Europhiles.

The High Commissioner had not mentioned Brexit; he had simply said that Britain was doing well. But that statement was seen as Eurosceptic propaganda.

I've also been struck by how cheerfulness enrages some EU supporters (not all, obviously). Whenever I point to good news – a rise in manufacturing, say, or a new record high for the stock exchange, or a fall in unemployment – it provokes, not just scepticism, but fury.

And yet, whether over Brexit or, indeed, more generally, optimism is rational. Think of the forecasts that have gone wrong over the years – bird flu, swine flu, the Millennium Bug, asteroid strikes, nuclear obliteration, drugs-resistant bacteria – and you'll see that they all tend to err in the same direction. Things almost always work out better than expected, and Brexit should be no exception.

This is not to say that everything will be perfect. We have made mistakes since the referendum. It made little sense to trigger Article 50, and so start a countdown, before holding a general election and wasting two months. It was, in retrospect, foolish to have called the election at all.

And some of our policies on immigration, such as the insistence on counting overseas students in the numbers and, even more so, the idiotic plan (since dropped, thank Heaven) to make companies declare how many foreigners they employed, smacked of over-compensation by Remain-voting ministers with a grotesque idea of what motivated Leavers.

For all this, though, the logic for both sides pulls toward a mutually advantageous deal. Countries trade with each other from self-interest, not kindness.

On the day Britain leaves, it will become the EU-27's biggest export destination. Quite apart from commercial considerations, both sides have a shared interest in political, security and intelligence co-operation.

It is possible to see the broad outlines of a deal: Britain will withdraw from the EU's political institutions but remain in a free market, participating as an associate in (and, obviously, paying its share for) a number of common programmes, and approaching both the transition and the fiscal settlement in the spirit of wanting a successful and prosperous EU next door.

I may be wrong, of course. If I am, though, it'll be for a rather striking reason, namely that I have too high an opinion of the EU. I'm not expecting Brussels to do Britain any favours; I'm simply expecting it to act in its own interest.

Those who are prophesying catastrophe are arguing, in the last analysis, that the EU will cut off its nose to spite its face – that is, that it will diminish its own prosperity in order to hurt Britain. How odd that the people who love the EU the most expect it to be nastiest.

Sure, it is prudent to be prepared for any eventuality. Being prepared means putting in place the sorts of procedures that we would have evolved over the past 45 years had Brussels not been running our internal affairs.

These are mainly technical arrangements: driving licenses that work abroad; a patenting system that is separately recognised under the international patenting rules; a legal basis for the single energy grid on the island of Ireland; bilateral deals on aviation slots.

Putting these things in place won't be especially expensive, though it will involve a certain amount of administrative work, and that work needs to be undertaken now. If it ends up being unnecessary, so much the better.

EU flags Big Ben
Things almost always work out better than expected, and Brexit should be no exception. Luke MacGregor/Reuters

What about hiring and training lots more immigration and customs officers? Wouldn't that be expensive, and create a sunk costs mentality that makes a no-deal outcome more likely? Actually, it shouldn't be necessary at all. There may be a general case for hiring more immigration officers, given the failings in the system, but there is no reason to do so as a result of Brexit.

There is no realistic scenario where we will start imposing visas on EU visitors. The idea that you could come here visa-free from Nauru, Namibia or Nicaragua but not the Netherlands is too silly for words. What will change is that EU nationals will no longer automatically qualify for National Insurance numbers and the right to work. If anything, that should mean less work than now.

As for customs officers, why on Earth should a post-EU Britain impose tariffs or other restrictions on EU goods? Who is hurt by the absence of such tariffs today? No one. Who would be hurt by their imposition? Everyone, in the sense that we all buy things. It would be crazy to harm ourselves by levying duties on EU imports, regardless of what the EU does.

While there may be delays at some Continental ports – and sensible contingency planning means identifying the ports where there are no such delays, such as Zeebrugge, which says UK exports will be cleared automatically by its computerised system – it would be self-harming to impose equivalent delays at Dover and Southampton.

It bears repeating that making clear preparations for a no-deal outcome makes such an outcome less likely. Neither side wants trade barriers, and the main danger is that the EU, believing that Britain has no option but to accept its terms, overplays its hand. Correcting that misapprehension removes the chief threat to a mutually beneficial outcome.

Provided we do that, there is every reason to be optimistic. Overseas companies plainly think so: investment in Britain has risen since the referendum, despite all the panicky FT headlines. The investment Tiggers, rather than the BBC Eeyores, are calling this one correctly.

Daniel Hannan has been Conservative MEP for the South East of England since 1999, and is Secretary-General of the Alliance of European Conservatives and Reformists. Follow : @danieljhannan