Dear Readers,

I owe you an apology. I made a mistake. I am writing this letter in the first person, because I made the mistake.

Let me explain what happened. I wrote software to calculate the gold basis and cobasis (and of course silver too). The app does not just calculate the near contract. It calculates the basis for many contracts out in the distance, so I can see the whole picture. I developed a model for the fundamental price, based on the basis. My software calculates this, too (spoiler alert: the reported fundamental prices were high).

I have long since debugged it. It works reliably. So reliably, that every day I pored over the results, but I no longer checked the inputs and intermediate steps of the calculation. Now, in retrospect, I realize that I should have.

The root cause is simple. For as far back as I have ever seen, the symbol for a future has been a two-letter code for the commodity + a one letter for the month and one digit for the year. For example, gold is GC. December is Z. And 2017 is 7. So the December gold contract is “GC Z7”. Silver is SI, so December silver is “SI Z7”.

I did not expect my realtime quote provider to change year codes for contracts in 2018 and beyond. No longer is it one digit for year—8 in this case. Now it requires two digits. So the December 2018 gold contract is “GC Z18”. Even now that I have looked, I do not find any announcement of this change. I am not even sure it is an official COMEX change, or just a quirk of one quote provider.

This error was compounded because my software was not programmed to notify me of a problem. In software, the only thing worse than a failure in a system that is used in production is a silent failure that goes unnoticed, and hence goes uncorrected. This failure was unnoticed.

Before I get to the impact, I want to discuss how we will make sure this does not happen again.

My team and I have been working hard on a new website, and the centerpiece will be our ongoing data science work in the precious metals markets. We will publish about 45 graphs, with daily updates. Obviously, this is driven by a much more sophisticated software system than my humble application.

The new software is developed by one of the best coders in the world (not me, I’m rusty after not coding full-time in almost 15 years). Rudy Mathieu worked for my last company, a software company called DiamondWare.

Rudy has built a hardened, enterprise-grade software system (now undergoing extensive testing), and when it encounters an error, it does not fail silently. It is constantly checking the status of all key components, and has a dashboard so we can monitor how the software and the server running it are doing. It emails us if anything goes wrong. It will instantly detect problems, such as a change in the year code or even the Spanish Inquisition, which nobody expects (sorry, just a bit of humor).

Print Friendly, PDF & Email