By the beginning of the 13th century, there was a fully functioning market in government debt. One that came about as a result of a very simple technological innovation: namely the use of the Tally Stick.
After William the Conker had clocked us all and our land holdings and property and chikkins and wotnot in the Doomsday book, he was in a much better position to levy tax from us all and had the requisite paramilitary inland revenue force to do it. Or else!
Thereafter, the king could agree, with John O' Gaunt say, that Lancashire would pay £1000 tax to the realm and it would fall due on April 1st. Then they would get a stick, any old stick, and carve notches on it indicating the amount owed, who from etc and then split the stick in two. A handle would be carved on the stick and this was called the stock - hence stock market.
["the distance between the tip of the forefinger and the thumb when fully extended ... The manner of cutting is as follows. At the top of the tally a cut is made, the thickness of the palm of the hand, to represent a thousand pounds; then a hundred pounds by a cut the breadth of a thumb; twenty pounds, the breadth of the little finger; a single pound, the width of a swollen barleycorn; a shilling rather narrower than a penny is marked by a single cut without removing any wood".]
The king kept one half and our John the other. When time came for payment the two halves of the stick were brought together - tallied up - and the debt settled. The king usually couldn't wait for April 1st though as he had a pressing need to go and trash the French, or the Scottish [again], and he needed instant cash to pay his army and provide them with Bovril and so forth.
What to do?
He could sell his half of the tally stick to someone in return for the cash he needed immediately. This is how a whole market in government debt was built up and the market got pretty good at trading in, and working out a market 'value' for it. The value might be dependent on when the debt fell due, how far away it was to go and collect it, and the liklihood (confidence) in how probable it was that this debt would be honoured and reliably paid up. If it didn't look too promising, the debt could be 'discounted' or written down in value.
So, Tally sticks formed the basis of the money markets we know today. They were in use up until 1826, but then withdrawn and stored in the Palace of Westminster. By 1834 there was a mountain of sticks to be got rid of, but instead of being sensible and giving them to the poor to burn as firewood, they stuffed the whole lot into the Palace furnaces and the flues got sooooo hot they set the whole building alight and burnt it to the ground. Turner witnessed the event on 16th October 1834 and immortalised it in this famous painting.
You couldn't make this stuff up, could you?
The point is that this market came about as a [possibly] unintended consequence of the application of technology to manipulating finance. Which brings us to what the digital age is going to further do to money, given that it's already well on the way to doing away with cash.