Economies constantly evolve as new technologies, innovation or changes in consumer tastes drive new trends and lead to new sectors and industries. The pace of change often reflects external factors and changes in the global economy.

However, we know that institutions also matter crucially in determining the path of the economy. Government decisions can also lead to significant changes over time. For instance the UK economy went through a significant period of restructuring during the 1980s which was linked to choices about industrial strategy and the macroeconomic policy mix. The UK’s entry to the European Economic Community boosted UK trade and arguably allowed our productivity growth to match that of our European neighbours post-1973.

The outcome of the EU Referendum has the potential to be a significant shock to the economy but also a transformational change in how we operate across a range of sectors.

Two months after the Leave vote, I find it curious that some pro-Brexit commentators think that the economy has dealt reasonably well with the economic fall-out of the referendum. It’s worth reminding ourselves that Brexit has not happened yet. In the short run the main impact from the Leave vote is that the uncertainty it has generated could depress consumer and business confidence and hence slow down the UK and Scottish economy. Once this initial macroeconomic shock has been absorbed (and it may in part be alleviated by the depreciation of Sterling), the real risks still lie ahead, in our long-term economic prospects after Brexit.

Arguably the long term implications for Scotland’s economy of the UK adopting an alternative relationship with the EU represents one of the most important questions facing us. Our membership of the EU has been an important driver of economic growth. As a rule, the smaller your economy, the more important is your trade access.

The EU not only provides Scottish companies with unfettered access to EU markets and enables our citizens and those of all other EU countries to live, study and work wherever in the EU they choose. It is also an important factor for foreign companies considering where to invest and grow their businesses. This point is particularly important for inward investment to Scotland as EU access allows them to service this market from Scotland.

Through these channels EU membership provides Scottish companies with an opportunity to expand their operations, move into new markets and in turn create jobs. It also provides access to the workers that companies need to grow their businesses. The latter has also been important in arresting the demographic challenge facing Scotland with the influx of new migrants reversing the projected declines in the Scottish population predicted to occur during the early 2000s.

More generally being an open trading economy linked into other markets facilitates the adoption of new technologies, management practices and innovation which will underpin future productivity growth across the economy.

An example from my own sector illustrates these positive effects. Scotland is highly successful at attracting EU-wide university research. Scotland’s universities receive £88.8million of research funding a year from EU sources, 13% of our total income. This not only leads to the collaboration and exchange of scientific research which allows us to be global leaders, but also supports jobs and drives new ideas and innovation across Scotland. We attract some of the best talent in the world: 23% of our research-only staff come from other EU countries. This type of finance for long term investment is a key benefit of the EU, and is the bedrock on which future Scottish innovation and growth can be built.

Of course, EU membership is not the only factor which will influence Scotland’s long-run economic performance. Levels of educational attainment and skills, the quality of public infrastructure, and investment in research and development to name but a few are key drivers of economic growth.

However, most economists agree that a looser relationship with the EU – such as membership of the European Economic Area or a bilateral free trade agreement – is likely to reduce future economic performance compared to full EU membership. The scale of this risk is clearly uncertain given the number of factors at play. Nevertheless, most research suggests that the effect could be material. This growth has also been important to Scottish and UK public finances. This is one of the reasons why the UK government is re-thinking its fiscal targets and its economic strategy.

As an illustration, the respected National Institute for Economic and Social Research, suggests that leaving the EU could ultimately result in UK GDP being between 1.8% and 7.8% lower by 2030 than it would otherwise have been.

The impact on Scotland will depend on a range of factors, including differences in the structures of the Scottish and UK economies and our trading patterns. However, illustrative analysis by the Scottish Government suggests that by 2030, Scottish GDP could be between £1.7 billion and £11.2 billion lower than if the UK remained in the EU.

In the long-run, winners and losers in the world economy are determined in part by good supply-side policies which encourage innovation, investment and productivity growth. But that alone is not enough. For an open economy getting the trade arrangements right is also crucial. If Brexit means erecting additional barriers to trade and if it hampers Scotland’s ability to attract skills, foreign investment and talent then it will seriously constrain our long-term economic prospects.

Professor Anton Muscatelli is principal of the University of Glasgow and chair of the Scottish Government Standing Council on the EU. He is writing in a personal capacity