This page offers an interesting explanation of the phrase ‘in the nick of time’, but what I found most delightful was — in a side note — the brilliant imagery behind what I had previously thought were two very dull words: ‘stocks’ and ‘shares’. Apparently these words ‘refer to the splitting of such sticks (stocks) along their length and sharing the two matching halves as a record of a deal.’ Wikipedia offers a more detailed explanation:
The split tally was a technique which became common in medieval Europe, which was constantly short of money (coins) and predominantly illiterate, in order to record bilateral exchange and debts. A stick (squared hazelwood sticks were most common) was marked with a system of notches and then split lengthwise. This way the two halves both record the same notches and each party to the transaction received one half of the marked stick as proof.
Later this technique was refined in various ways and became virtually tamper proof. One of the refinements was to make the two halves of the stick of different lengths. The longer part was called stock and was given to the party which had advanced money (or other items) to the receiver. The shorter portion of the stick was called foil and was given to the party which had received the funds or goods. Using this technique each of the parties had an identifiable record of the transaction. The natural irregularities in the surfaces of the tallies where they were split would mean that only the original two halves would fit back together perfectly, and so would verify that they were matching halves of the same transaction. If one party tried to unilaterally change the value of his half of the tally stick by adding more notches, those notches would not be on the other tally stick and would be revealed as an attempted forgery.
The split tally was accepted as legal proof in medieval courts and the Napoleonic Code (1804) still makes reference to the tally stick in Article 1333. Along the Danube and in Switzerland the tally was still used in the 20th century in rural economies.
Better than today’s anti-fraud technology! (Wiki)