Why don't countries invest?

But if it's so great - why don't countries do it?

Oh sure they do. I think you'll find that many countries that have excess oil wealth have decided to invest. For example, see Government Pension Fund of Norway and other sovereign wealth funds.

Why doesn't every government invest it's money into diversified investments in the stock market or other things?

Not every country is as rich as Norway. They do invest but in such a case the investments are generally to strategically important local companies where government ownership is warranted. For example, bit over half of Fortum is owned by the Finnish government. Finland is a country that has no oil and thus no massive wealth. Thus, the government has wisely decided to direct the investments to strategically important companies instead of investing in an index fund, because then the ownership in companies belonging to the index would probably be below 0.01% -- not that much as for Norway.

Also, it is worth mentioning that Finnish government has large forest ownerships.

Why don't countries invest in shares/indices/gold/foreign property?

Investing in gold might not be such a good idea as an ounce of gold today is an ounce of gold in 100 years. However, a well-picked stock today is worth a lot in 100 years because companies, unlike gold, grow.

However, many central banks do actually have large deposits of gold. Historically it was used as a backing for the currency, but today we have fiat currency that is not backed by gold.

Governments invest in other things besides stocks and bonds.

  • They have natural resources that they then sell the rights to.
  • They have land for parks that is then used for the enjoyment of all.
  • They own infrastructure such as roads, railroads, and airports and the like that is then used by their citizens and businesses.
  • Some nations have a lot of investment tied up in space assets such as weather satellites, and other space probes.
  • They have large science facilities to do all sorts of basic science research.
  • They make it possible for people to attend colleges and universities.

Most people don't buy one of the FAANG stocks because of the amount to Government bonds they own. They buy stocks because the company will generate profits. Nobody wants the government to own a large amount of company stock.

Nations are not companies. Nations do not exist to make money but to improve the life of their citizens. A good life has many aspects but the most important ones are health, social security, basic infrastructure, education, housing, protection against crime, protection against aggressive neighbouring nations. Improvements on those aspects often improve the economic situation of a country as well:

  • Few people dare to do business in a war zone.
  • One cannot do much business without electricity, roads, etc
  • A high-tech economy can only be run if people are well-educated and it can be run easier if people are not required to jump through the hoops of 100 000+ $ student debt

For most countries, fulfilling their obligations on those aspects is already using up all their budget they can get through reasonable taxation. As most countries already borrow a lot of money through government bonds, it simply does not make much sense to deviate money to invest into the stock market. There simply is none left after paying all the bills. The nations that have a sovereign wealth fund and are directly investing, are all in the special situation that they are oil rich and have realized that this oil money will not last forever and they need another source of revenue in the future.

Another factor is time and visibility. A new highway will create a visible sign of your investment and it can be used immediately after completion. It will give people an advantage right now because they can get easier from place A to B. A stock market investment on the other hand is just a number that fluctuates all the time and it will really reap the benefits only after a longer time.

It is also important to note that - even if we assume it would make sense for a country to invest in the stock market - it is very hard to do so. Most government are only elected for a limited time of typically 4 years. A long-term investment therefore needs to span multiple governments and each of them has to resist the temptation to take out money of their investment and spend it on something that increases the ruling party's popularity.