IF we want to learn from history we have to speculate about ''might-have-beens''. But our speculation is futile unless we try to form a balanced view of all the issues and what we could have done about them.

The election discussion on the ''viability'' of the Scottish economy, conducted mainly between Mr Jim Stevens, of the Fraser of Allander Institute, and the Labour Party, Mr Alex Salmond and SNP sympathisers, and the Conservatives and their favoured consultants at PIEDA, has not done this.

After exhausting us with the issues of ''subsidy'' and oil revenues, its narrowness has led to no conclusion.

Sadly, even the Financial Times yesterday focused on the oil and government issues, and retailed graphs from the politically-inspired Government Expenditures and Revenues in Scotland report.xxxxxxx

While I accept that the latest figures are fairly compiled by Scotland's under- resourced official statisticians, the taste remains of the first Government Expenditure and Revenue estimates for Scotland, conveniently produced by Ministerial order just in time for the 1992 General Election.xxxxxxxxxxxxxxxxxx

The viability of an economy hangs on a lot more than a percent or two of government deficit, which we can quickly screw up and down if we want to pay the cost. While the oil would have been nice to have historically, Scotland's future viability will now have little to do with a largely spent natural resource.

Twenty years ago, our British/Scottish oil reserves were twice Norway's. After two decades of immoderate depletion - to fund a Government deficit and cosmetic tax cuts - we have only half as much oil left as the Norwegians.

Their production is still rising, but even with new fields west of Shetland, ours must inevitably fall.

More than oil, and preferences in public finance, Scotland's economic viability hangs on our ability to pay our way in tomorrow's world, and to adapt our behaviour and policies flexibly to the situations we face. What history can usefully tell us is how flexible we can be, and how we may need to prepare for different situations.

As the General Election campaign was beginning, I completed a first set of comprehensive accounts - social accounting matrices - for Scotland. Although they show predilections and tendencies in Scottish economic behaviour over a generation, there is evidence of the structural rigor mortis proclaimed by Mr Stevens, and there is plenty of evidence that the best policies for Scotland were quite different from those that were actually followed.xxxxxxxxxxx

The Scottish accounts leave no doubt about viability, showing that Scotland's economy is more diverse than most other sub-national regions, and as diverse as the Scandinavian economies. They show that most of Scotland's economy is as dynamic as other small economies, and that our economy has great resilience.

For example, Scotland has a persistent trade surplus with the world outwith Britain. Under the Conservatives in the fifties, Labour in the sixties, and both in the seventies, the UK as a whole went through foreign payments crises.

We all were subject to delibitating and demeaning stop-go policies. Through this period, Scotland's foreign account was in balance or earning a small, but steadily growing surplus, until it came to an unseemly end when the exchange rate floated off in the late 1970s.

With monetary policy lashed to the mast under Mrs Thatcher (and Captain Healey before her), and with North Sea revenues flooding the currency markets, our traditional engineering industries were sunk. Our ability to earn money from abroad went under. But within five minutes we were heading back towards the surface.

Preliminary estimates for 1996 suggest our heads are now above water, buoyed up by the new information-based industries which are here because Scotland presents the most amenable face of Europe.

To those that call the Government deficit a ''subsidy'', let us pose the question: ''If Scots are being subsidised by the English, what are they subsidised to do?''

Answer: ''Create jobs in England''.

Since the beginning of post-war consumerism, Scotland has had a large, cyclical deficit in its trade with the rest of the UK.

Simply put, Scots spend a third of their national income in England, but the rest of the UK spends less than 5% of its income here. We buy their products, they don't buy ours.

Of course, a country that runs a higher-than-comfortable government deficit has to finance it.

''What is Scotland doing about that?''

Answer: ''Exercising prudence and generosity''.

Public-sector deficits, in a balanced economy, have to be financed by a private-sector surplus.

Individuals must save if government and industry are to spend. Scots are exemplary at this. In the fifties, and since 1971, Scottish savings have been persistently 50% higher than the rest of the UK.

Of course oil is relevant. In the early eighties we had, on top of policies with no support in Scotland, the worst of both worlds on oil management.

Scotland bore the brunt of oil inflation on prices and costs, hitting not just our exports and metals industries, but quite demonstrably our construction industry and thus investment as well. Yet we received less than our population share of the tax rebates and other ameliorations. Despite such treatment, the Scottish economy survived.

Notwithstanding our penchant to buy from our neighbours, we have restructured our economy three times in the past generation. We have geared up to exploit a natural resource faster than any nation before.

We have laid to rest one of the great engines of the industrial revolution, seized a share of the global information industry, and remained prudent and generous.

Is our economy viable? Can it face new challenges? How can we best find out?

Professor Hervey Gibson, Chief Executive of Cogent Strategies International and former Head of Economics at Scottish Enterprise.