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).
Buy a diamond today and sell it tomorrow, and you'll make a loss of 30% or more.
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]
[1] http://en.wikipedia.org/wiki/Diamonds_as_an_investment (yes, it says citation needed, but nevertheless it did work in WW2.)