If we've come to the point where you're fleeing the country from Nazis with only what you can carry in your hand, the only thing that's going to be sustainable is investment in _yourself_ through massive education. That way you're up and working and earning from the moment you're safely away.
It makes a lot of sense to try and carry as much value with you as possible. Conditions during the course of your escape are likely to be difficult and the ability to pay for thing (=bribe your way out of trouble) is likely to be much more useful than knowledge of advanced mathematics or Python minutea.
(Of course, the most useful way to carry value in an escape scenario is gemstones, not gold, since it is much easier to hide during transport).
Gemstones are not a good value store at all, since there is no liquid market for them and the first-sale price is artificially inflated through marketing.
Buy a diamond today and sell it tomorrow, and you'll make a loss of 30% or more.
In the "government collapse and you need to run from nazis" scenario, if you somehow manage to only lose 30% of your value you are doing well.
I'd note that Wikipedia says:
A high quality diamond weighing as little as 2 or 3 grams could be worth as much as 100 kilos of gold. This extremely condensed value and portability does bestow diamonds as a form of emergency funding. People and populations displaced by war or extreme upheaval have utilised this portable asset successfully.[1]