Graph Computer / Cases / A changed formula
Change one part of a formula. The change is marked, and so is every result it moves.
The real case
JPMorgan Chase: a spreadsheet divided by a sum where an average was intended.
JPMorgan Chase company’s own report
In 2012 a book of credit derivatives in JPMorgan’s Chief Investment Office lost money on its trades: at least $6.2 billion by the end of the year. US Senate government report In September 2013 the bank agreed to pay about $920 million in penalties in actions by the SEC and three other agencies. SEC court or regulator The loss came from the trades. This page is about something smaller that the bank’s own report found beside them: how the risk of those trades was being measured.
The measure was value-at-risk, or VaR, a daily figure held against a limit. At several points between 16 and 26 January 2012 the office’s figure was over its limit, which put the whole firm over its limit too. On 30 January a new model was authorised, and once it was in use the firm-wide limit was no longer exceeded. JPMorgan Chase company’s own report Senate investigators later wrote that the new model at once lowered the book’s VaR by 50%, and that in May the bank went back to the earlier one. US Senate government report
The bank’s report says the new model “operated through a series of Excel spreadsheets, which had to be completed manually, by a process of copying and pasting data from one spreadsheet to another.” After the bank stopped relying on it, further errors were found in it. This was the most significant: JPMorgan Chase company’s own report
“after subtracting the old rate from the new rate, the spreadsheet divided by their sum instead of their average, as the modeler had intended. This error likely had the effect of muting volatility by a factor of two and of lowering the VaR”
“Spreadsheet-based calculations were conducted with insufficient controls and frequent formula and code changes were made.”
The error made the measured risk look smaller. It did not cause the loss. And the fall of 50% came with the new model as a whole: the bank’s report says it is unclear by exactly what amount this one error lowered the figure. JPMorgan Chase company’s own report
The same report describes a second set of spreadsheets, used to check the traders’ prices. There, adjustments to formulas “which were not subject to an appropriate vetting process, inadvertently introduced two calculation errors”. JPMorgan Chase company’s own report
In October 2003 Fannie Mae reissued its third-quarter earnings release after computational errors, most of them made while it was applying a new accounting standard. Balance sheet figures changed; no income statement item did. Fannie Mae company’s own filing Its quarterly report put the errors down mainly to an incorrect formula in a spreadsheet. Fannie Mae company’s own filing Its regulator later called it “the $1 billion computational error”. OFHEO court or regulator
What companies do about it today
| Who sells a fix | Published price | A formula change kept as a difference between two versions, with its effect on every result |
|---|---|---|
| Microsoft Spreadsheet Compare | No price of its own. It “is only available with Office Professional Plus 2013, Office Professional Plus 2016, Office Professional Plus 2019, or Microsoft 365 Apps for enterprise.” Microsoft Support vendor-published | Compares two saved workbooks: “The results of the comparison appear in a two-pane grid”, and “Changes are highlighted by color, depending on the kind of change.” Its worked example shows a corrected formula, and cells with “a blue-green fill that means the calculated value changed.” Keeping each version itself, and showing the effect of a change before the new version is used: not documented in what we read. Microsoft Support vendor-published |
| PerfectXL Compare | No prices published on the pages we read. The pricing page names its plans and, for single tools, offers “Request a quote”. PerfectXL pricing vendor-published | “Differences between two versions are presented as differences in either data, formulas, structure or VBA.” Cell and formula edits are shown side by side, and the list can be kept: “Log every difference with its details in a new Excel file for a clean audit trail.” Keeping each version itself, and showing the effect of a change before the new version is used: not documented in what we read. PerfectXL walkthrough vendor-publishedPerfectXL vendor-published |
| Mitratech ClusterSeven | No prices published on the pages we read. | “ClusterSeven tracks who makes changes to which files, recording the exact time of creation or modification and the user responsible.” It also describes “the review and approval process for critical cells in high-risk or high-stakes spreadsheets”, and a 2019 Mitratech article lists “Compare multiple versions of a file to identify the changes made.” A changed formula shown beside the version before it, with its effect on results: not documented in what we read. Mitratech vendor-publishedMitratech article vendor-published |
| CIMCON Change Management | No prices published on the pages we read. | Lists “Advanced side-by-side comparison of spreadsheet & code changes”, “Advanced version control & multiple version detection of files across a network” and “Automatically trigger alerts & approval requests for desired changes”. The effect of a formula change on results: not documented in what we read. CIMCON Software vendor-published |
“Not documented” and “none published” mean we did not find it in what the company publishes, read 4 December 2026. They do not mean the product cannot do it.
None of them publishes a time to go live on the pages we read.
What these products do that ours does not: they work on the Excel workbooks a company already has. Spreadsheet Compare and PerfectXL Compare read two saved workbooks and list what differs between them. Microsoft Support vendor-published PerfectXL vendor-published ClusterSeven and CIMCON describe watching files across a company, with alerts, review and approval. Mitratech vendor-published CIMCON Software vendor-published Ours reads no workbook and has no approval step.
Ours has no price of its own. It comes with a HopperLabs membership.
Try it
Computed on your device. The rates and the limit are made up. Nothing is sent.
Version 1 · in use
Divides by the average of the two rates.
Fingerprint
Version 2 · not in use
Divides by the sum of the two rates.
Fingerprint
Version 1 in use.
All 20 results were made by version 1. Volatility 0.418% is over the limit of 0.300%.
| Day | Rate | Version 1in use | Version 2not run | Drawn to one scale |
|---|---|---|---|---|
| Start | 1.0850 | |||
| 1 | 1.0888 | +0.350% | – | |
| 2 | 1.0967 | +0.723% | – | |
| 3 | 1.0937 | −0.274% | – | |
| 4 | 1.0955 | +0.164% | – | |
| 5 | 1.0907 | −0.439% | – | |
| 6 | 1.0902 | −0.046% | – | |
| 7 | 1.0844 | −0.533% | – | |
| 8 | 1.0920 | +0.698% | – | |
| 9 | 1.0920 | 0.000% | – | |
| 10 | 1.0925 | +0.046% | – | |
| 11 | 1.0905 | −0.183% | – | |
| 12 | 1.0957 | +0.476% | – | |
| 13 | 1.0986 | +0.264% | – | |
| 14 | 1.0915 | −0.648% | – | |
| 15 | 1.0985 | +0.639% | – | |
| 16 | 1.0998 | +0.118% | – | |
| 17 | 1.0984 | −0.127% | – | |
| 18 | 1.0965 | −0.173% | – | |
| 19 | 1.1038 | +0.664% | – | |
| 20 | 1.1085 | +0.425% | – | |
| Volatilitystandard deviation of the 20 results | 0.418% | – | ||
Volatility against the limit
0.418% made by version 1
Over the limit
Run fingerprint
What is fingerprinted
Each version of the formula is one line of text with its own fingerprint, so a formula that changes is a new version and cannot pass as the old one. A run is one line of text too: the formula version, every rate, every result and the volatility. Each fingerprint is the SHA-256 of its text, computed by your browser; the first 16 of its 64 characters are shown. Change any part of the text and the fingerprint changes.
{"formula":{"version":1,"text":"(new - old) / ((new + old) / 2)"},"rates":["1.0850","1.0888","1.0967","1.0937","1.0955","1.0907","1.0902","1.0844","1.0920","1.0920","1.0925","1.0905","1.0957","1.0986","1.0915","1.0985","1.0998","1.0984","1.0965","1.1038","1.1085"],"changes":["0.0034961818","0.0072294669","-0.0027392257","0.0016444363","-0.0043911810","-0.0004585263","-0.0053343144","0.0069840103","0.0000000000","0.0004577707","-0.0018323408","0.0047571128","0.0026432120","-0.0064837222","0.0063926941","0.0011827321","-0.0012737694","-0.0017312862","0.0066354588","0.0042489717"],"volatility":"0.0041842652"}This is a demonstration kept in this page. It is not a receipt signed by the engine, and the rates are not a customer’s.
The same two formulas went through the engine on 1,001 made-up rates. That run is recorded below: volatility 0.406% under version 1 and 0.203% under version 2, a ratio of 0.5.
Recorded engine run
| Step | Recorded result |
|---|---|
| Input | 1,001 rows · made-up data1001 made-up daily rates starting at 1.0850, a multiplicative random walk with 0.4% daily standard deviation, rounded to 4 decimals (1000 daily changes) |
| Programs | rates.volatility-report 1.0.0 · bf664524…fde0rates.volatility-report 2.0.0 · 10cbc655…688c |
| Formula v1 (midpoint denominator) | 42.10 ms · run fingerprint 05c793db…b145 · output fingerprint ffbdd99c…2c7bmean -0.000000184184 · n 1,000 · volatility 0.00406308 |
| Formula v2 (sum denominator) | 32.60 ms · run fingerprint 34f7cdce…6eef · output fingerprint c047bda2…8491mean -0.000000092092 · n 1,000 · volatility 0.00203154 |
| Run again from the start | Fingerprint matchedThe engine ran it again from the start on its own. |
| Two versions compared | rates.volatility-report@1.0.0 against rates.volatility-report@2.0.0step changed (engine diff stepDiff.modified): changesteps added: none; removed: noneinputs and outputs unchanged (contractBreaking: false)the changed step now uses a different component: rates.relative-change@1.0.0 (component:0962f3b2c469c520b70f228ea4c3524ba2dcc663eefaf331f451f9667388fc11) -> rates.relative-change@2.0.0 (component:e34c2d6359b06b23facf4a9c9bd006d2df8de8048f49090c0362360a099c9d5e) (read from program.get and program.describe as author) |
Notes recorded with the run
- Both formulas and the volatility step are a small JavaScript kernel that the engine loads only at the fingerprint of its exact bytes; the engine runs and records it but does not prove it correct.
- The ratio of the two volatilities is one division done by the capture script on the two engine results.
- In exact arithmetic the ratio is one half; the recorded ratio is what computer arithmetic gave, shown unrounded.
- The engine replayed both runs from scratch on its own and got the same result fingerprints.
- Times are wall-clock on a shared Mac (load average 23.15 on 10 cores at the start).
What this does not do yet
- It does not read an Excel workbook, and it does not watch one for changes. The products in the table above do.
- It is not a risk model and not a value-at-risk model. It is one calculation of the kind the bank’s report describes, on made-up rates.
- It compares two versions of one formula. A workbook of many formulas that feed one another is not shown on this page.
- There is no approval step. Nothing here stops a new version from being used before someone has agreed to it.
- You cannot run your own formula on our hosted Runner. It is not open to members yet.
- We have no customers for this. The rates above are made up, and the recorded run is our own.
Sources
- company’s own report
JPMorgan Chase. Report of JPMorgan Chase & Co. Management Task Force Regarding 2012 CIO Losses, 16 January 2013 The bank’s own report on the losses, read from an archived copy of the file the bank published. Page numbers are the report’s own.
- government report
US Senate. JPMorgan Chase Whale Trades: A Case History of Derivatives Risks and Abuses, 15 March 2013 Majority and minority staff report of the Permanent Subcommittee on Investigations.
- court or regulator
- company’s own filing
Fannie Mae. Form 8-K/A with the revised earnings release for the third quarter of 2003
- company’s own filing
Fannie Mae. Form 10-Q for the quarter ended 30 September 2003 The page was cut short when we read it on the day above, before the passage. What we say of it is from notes made earlier from the whole filing, and we quote no words from it.
- court or regulator
OFHEO. Report of the Special Examination of Fannie Mae, May 2006 The Office of Federal Housing Enterprise Oversight was Fannie Mae’s regulator. Read from an archived copy.
- vendor-published
Microsoft Support. Basic tasks in Spreadsheet Compare
- vendor-published
PerfectXL. Compare two Excel files and see what really changed
- vendor-published
PerfectXL walkthrough. A comprehensive guide to PerfectXL Compare
- vendor-published
PerfectXL pricing. PerfectXL Pricing: Plans & Services
- vendor-published
Mitratech. Mitratech ClusterSeven
- vendor-published
Mitratech article. The Importance of Auditing A Spreadsheet, 19 June 2019
- vendor-published
CIMCON Software. Change Management