Desk Reference Cards

Software · Short case

Desk Reference Cards 调参速查

Desk instructions change often. For each session, one trader had them on a single page: every change flagged, every instruction traced to the exact click.

  • Conceived, designed and built by Shuo Huang
  • 19 editions · Jul–Sep 2026
  • 32 memo versions diffed
  • 15 products · 3 exchanges
  • First edition in 22 min
  • 4 mandatory checks per edition

01System architecture

Keep the red ink, diff every version, verify before use.

The source is a Word document whose change log is its formatting: changes are marked in red. The pipeline runs on a standard office PC with nothing installed, so it parses the document’s own XML to keep the red, diffs it against the archived versions before it, joins the result to the exchange’s contract list and to his own tools, and prints through the browser already there. Nothing ships until four checks pass.

Desk instructions

Instruction memo

A Word file per product group. Changes are marked in red text.

Office PC · PowerShell

Format-preserving extractor

Reads the memo’s own XML and keeps color, bold, highlight and strike as inline markers.

Archive

32 versions

Every version is stored, including the ones no card was built for.

Change control

Version diff

New against previous, plus every skipped version, where the context for a change lives. Computed, never eyeballed.

Reference data

Task Guide · Strategy Console

Exact menu paths and field names from his two earlier tools, plus the exchange’s contract list. Re-read at every build.

Single-file HTML

The card

Glance page first, then actions and pitfalls. 4 to 6 A4 pages, up to 93 cross-links.

Before use

Four checks

Zero page overflow, every page looked at, the QA script with zero bugs, links internal only. An empty run is a failure.

Headless browser

PDF edition

Printed by the browser already on the machine. Each link jumps inside the document.

Trading desk

The trader, in session

One page in view, one click to the step behind any cell.

The pipeline as built. The cards themselves hold the desk’s live settings, so no card page is reproduced on this site.

Why read the XML instead of the text?

A plain-text copy of the memo loses its red ink, and red ink is the memo’s change log. The extractor walks the document’s runs and wraps colored, struck or highlighted text in markers, so the card can show the desk’s own emphasis exactly as it was given.

Why diff, if changes are already red?

Because formatting is applied by hand, and a computed diff does not depend on it. A line-by-line diff against the archive finds every difference whatever its color, and it also proves the opposite: what is word for word unchanged, which tells a trader to keep doing exactly what he did yesterday.

Why four checks on a document?

The card drives live trading actions and carries exact spread-order names, where one wrong character is a failure. So the build is a written procedure of seven steps, and every step exists because skipping it once produced a defect.1

02The story

Desk instructions change often. One page for each session, with every change flagged.

A market-making desk runs on written instructions, and they change often, as markets do. Acting on the newest version means knowing exactly what changed since the last one, in a long document, minutes before the open. Three weeks into the job, on his own initiative, Shuo built the fix: a pipeline that reads each new version, compares it line by line with every version before it, and produces a brief for the session ahead. One page to glance at, the exact steps behind every instruction, and a marker on everything that changed.

  1. 01

    The problem

    A market maker keeps buy and sell prices on screen all day in the contracts an exchange assigns to it. How the desk does that on a given day is set in written instructions, one Word document for each product group. They change often, as markets, contract months and exchange calendars do.

    Acting on them at 8:55 in the morning is harder than reading them:

    • The newest version is the one that counts, and it has to be read and acted on before the open.
    • Changes are marked by formatting, in red text, inside a long document.
    • An instruction is not yet an action. Each one still has to be turned into the right window, menu and field.
    • Habit is the hazard. Doing what worked yesterday is only right if today’s instruction says the same.
  2. 02

    What he built

    Nobody asked for it. Three weeks after joining the desk, on his own initiative, Shuo conceived, designed and built a brief for his own trading day and the pipeline that produces it. The first edition was finished 22 minutes after he started, across the 9:00 open.2 The format was his: one at-a-glance reference page up front, since only one page is visible at a time, with a clickable link from every cell to the detail behind it.

    Each edition has three layers:

    • A glance page per product group: one row per product, one column per decision.
    • Action cards: every instruction mapped to the exact steps in the quoting terminal and the strategy engine, using the two tools he had already built, the QWIN Task Guide and Strategy Console.
    • Pitfalls and open questions: what the change implies, and what still has to be asked.

    Think of a pilot’s checklist, rebuilt from the latest revision of the manual, with every changed line flagged and every line traced to the switch it refers to.

  3. 03

    What changed

    Instructions stopped being something to re-read and became something to check. In seven weeks the briefs absorbed 32 instruction versions for 15 products and worked out consequences that no instruction spells out:3

    • a spread order (one exchange order that buys one delivery month and sells another) fills its legs by itself, and those automatic fills count toward an exchange volume allowance;
    • a spread combination that is not listed on the exchange cannot quote, and on screen it looks exactly like a strategy that was never started;
    • the trading terminal’s windows do not all count the same fills, so the card names the window that shows the number an instruction is defined on.

    And one rule was settled at its source. How to park a spread order in the strategy engine had reached him secondhand, and his own strategy editor showed the same reading. He did not act on it. He took the question to the engine team, got the behavior in writing, and corrected three cards and his editor’s confirmation dialogs the same morning. The desk’s later instructions stated the same rule.4

19

dated editions in seven weeks, each rebuilt from the newest instructions for the session it served5

32

instruction versions archived and compared line by line, so no change is missed6

15

futures products on three exchanges in one cross-linked brief7

22min

from start to the first finished edition, across the 9:00 open2

03Evidence

Nineteen editions in seven weeks

Each week of the series: how many editions of the brief Shuo built. An edition was rebuilt from the newest instructions whenever they had changed, and every version in between was read in its diff.

Editions built, by week

19 editions in seven weeks, each rebuilt from the newest instructions for the session it served.

Show the dataHide the data
Data: Editions built, by week
Week of the series, Jul to Sep 2026Editions
Week 13
Week 24
Week 32
Week 44
Week 51
Week 62
Week 72
Week 81
Counted from Shuo’s 19 edition files, each in the week of the instructions it answers. Weeks 1 and 8 are part weeks. The chart counts his own output, not the desk’s instructions.5

04Functions

Everything it does, in the order a user meets it.

The cards hold the desk’s live parameters, so their pages are not reproduced here. What each layer does is described instead.8

A

One page answers “what do I do today?”

The first page of each product group puts a product’s whole day in a single row.

  • A day timeline strip: evening shift, the open, after the open, calm markets, the mid-morning break, before the close
  • One row per product, one column per decision the session asks for
  • A banner naming the day’s biggest change, and a link from every cell to the step behind it

B

Every instruction, down to the click

An instruction such as “close quoting and flatten” is only useful if you know which window, which menu and which field.

  • Each action card gives the exact path in the quoting terminal, by task name from the QWIN Task Guide
  • Engine steps name the exact fields in Strategy Console, and which state to set
  • Spread-order names are reproduced character for character, with a pre-open tick list of what to switch on and what to re-check

C

Every change flagged, two ways

Two markers separate the desk’s own emphasis from the computed difference, so nothing depends on spotting red text.

  • 🔴 marks text that was red in the memo itself: the desk’s own emphasis, preserved
  • ▲ marks anything that differs from the previous card, computed by diffing the archived versions
  • “Unchanged” is stated too: it means keep doing exactly what you did yesterday

D

What an instruction implies

Each edition reads the instructions against the exchange’s rules and the desk’s own tools, and writes down the consequence that follows.

  • Limits: an exchange volume allowance is counted per day, and a spread order’s automatic leg fills count toward it
  • Traps: which window of the terminal shows the number an instruction is defined on
  • Open questions to ask the desk, listed on the card until answered

E

Checked before it is trusted

Every edition passes four checks before it is trusted, and the checker itself fails loudly when it has nothing to check.9

  • Zero overflow on every page, and every page rendered and looked at, with small glyphs magnified 4 to 6 times
  • A QA script: duplicate anchors, dangling links, section labels that point at the wrong card, tables wider than the printable page
  • The PDF regenerated and counted: pages, links, and zero links that leave the document

05Under the hood

The parsing, the change control and the checks, for the technical reader.

Under the hoodFormat-preserving document parsing, change detection across 32 versions, a derived exchange constraint and fail-closed QA

For the technical reader: this is a document-processing pipeline with change control. It does structured extraction from a semi-structured source (Word documents whose change log is formatting), version-to-version change detection over a full archive, a join against reference data that derives what the source does not spell out, and an automated validation gate that fails closed. It runs on a standard office PC with nothing installed: two PowerShell scripts, 174 lines together, with no dependency beyond .NET. The sections below cover how changes are detected, what the brief derives, how one rule was verified at its source, and how each check traces back to a failure met or caught during a build.

Format-preserving extraction

A .docx file is a zip archive; the text lives in word/document.xml as runs, each with optional run properties. The extractor opens the archive with .NET’s System.IO.Compression, loads the XML with whitespace preserved, and walks paragraphs and table cells in document order by XPath. It emits plain text in which any run that carries a non-default color, a highlight, bold or strike is wrapped in an inline marker. Tracked deletions are kept with a marker of their own. Tables are flattened to one line per row, so a table cell diffs like any other line.

The red markers decide the 🔴 flags. A plain-text dump would produce a card that looks complete and silently stops flagging the desk’s own emphasis, so the marked-up extraction is the only accepted input. The memo is copied before it is read: a file open in Word once left an empty stub over a stored version.

Pseudo-code
def render_run(run):
    marks = []
    color = run.property("color")
    if color and color not in ("auto", BLACK):
        marks.append("color=" + color)
    if run.property("strike"):
        marks.append("strike")
    # highlight and bold follow the same pattern
    if marks:
        return open_marker(marks) + run.text + close_marker()
    return run.text
Pseudo-code. The run-property test, simplified: a run of text keeps its color and strike as an inline marker.

Change detection across every version

Each extraction is stored, including versions no card was built for, so every flag on every edition can be reproduced from the archive. The ▲ markers come from a line diff (Compare-Object) between the stored versions, taken across the whole gap since the last card, not only between its two ends (the formula below). There mk is the k-th archived version, p the version the previous card was built from and t the newest.

Reading every intermediate diff matters for two reasons. The context for a change usually sits in an intermediate version: a line that is simply absent from the newest version may have carried its reason one version earlier, which turns an open question on the card into a cited answer. And a diff of the two ends nets out everything in between: a line that was edited and later restored does not appear in it at all. The chart below runs both diffs on a made-up document.

Two rules keep the diff honest. A changed number or contract name is always re-read in the new extraction, because the diff’s side indicators are easy to invert and inverting them flips a threshold. And the card states what is unchanged as well as what changed: “unchanged” is an instruction too.

Chained diff against endpoint diff

On a made-up 40-line document over 5 versions, the chained diff flags 10 lines; comparing only the first and last versions shows 7. The 3 it cannot show were edited and later restored.

Show the dataHide the data
Data: Chained diff against endpoint diff
DiffLines flagged
Version 0 → 13
Version 1 → 25
Version 2 → 33
Version 3 → 43
Chained: union of all10
Endpoints only7
Synthetic data. Illustrative values, generated to show the effect: a made-up 40-line document, 4 seeded rounds of edits, every diff computed with a standard line diff. The method is as built; the desk’s instructions are confidential, and no count in this chart comes from them.10
Δt=⋃k=p+1tdiff(mk−1,mk)
The change set shown on card t: the union of the line diffs over every version since the last carded one.

Deriving what an instruction implies

The brief is more than a reformat because it joins the day’s instructions to constraints that live elsewhere. The clearest example is an exchange volume allowance. Exchanges reduce fees on market-making volume within limits, and those limits are counted per day.

An exchange spread order fills both of its legs by itself. Those leg fills count toward the allowance without anyone entering an order, so a day’s instructions that add a spread order also change how much room is left (the check is written out below). The card looks up each leg of every spread order in the exchange’s contract list and puts the result at the top of the page.3

The same join produces the other checks: a spread combination his own backtests had found unlisted is flagged, because an unlisted pair cannot quote; and a number an instruction is defined on is tied to the window that shows it, because the terminal’s windows do not all count the same fills.

Ventered+Vlegs≤A
The derived check in general form: the volume that counts toward an allowance A is the volume a trader enters plus the leg fills that spread orders generate by themselves. The allowance and its terms are the exchange’s and are not given here.
The kinds of derived check, in general form. No contract names, parameter values or instruction text are reproduced.
What an instruction saysWhat the brief adds
Spread orders are addedTheir automatic leg fills count toward an exchange volume allowance: each leg is looked up in the exchange’s contract list
A spread combination is namedIt is checked against what his own backtests found listed: an unlisted pair cannot quote, and looks exactly like a strategy that was never started
An action depends on a numberThe window and field where that number is read, since the terminal’s windows do not all count the same fills
A line is word for word unchanged“Unchanged”, stated on the card: keep doing exactly what you did yesterday

The engine rule: verify at the source

The strategy engine gives each strategy a state: run, pause, stop or cancel-only. Stop tries to flatten with fill-and-kill orders, which exchanges reject for spread contracts, so a spread has to be parked another way, and the trader has to know what that leaves open.

An early card carried a reading of that rule which Shuo had picked up secondhand. His own Strategy Console printed the same reading in its confirmation dialogs, and it matched what he remembered being told. Three agreeing secondhand sources are still one unverified claim. Instead of inferring the behavior from his editor’s code, he put the question to the engine team and got the answer in writing. It differed from all three, on the point that matters most: whether a parked spread’s position is still open.

What was at stake is a trader who believes a position has been closed walking away from one that is still open. The correction went into three cards, the confirmation dialogs of both editions of Strategy Console, its documentation and the Task Guide’s knowledge list the same morning, and the build procedure gained a line: for engine behavior, ask the engine’s owners; do not infer it from an editor’s code or comments.4

A QA script that fails loudly

The QA script runs over every card and prints one block per file. Six checks can each raise a bug: duplicate anchor ids, links to anchors that do not exist, link labels whose section number does not match the card they point at (easy to break when cards are renumbered), column widths that sum past the 277 mm printable width, unescaped ampersands, and the glyph rule below.

The opening lines are a failure mode engineered out. The script once carried a fixed folder; on the first build after a change of PC it found no files, checked nothing and exited 0. A check that passes because it checked nothing is the worst kind of pass. The missing output block was noticed inside the same build. The folder now comes from the script’s own location, and an empty folder is a fatal error with a non-zero exit code. The re-run checked 20 files and reported zero bugs; no edition went out unchecked.

The script catches stale numbers, not stale prose: a superseded rule once survived in a step label of a flow ribbon after its card body had been fixed. So when a rule changes, the procedure adds a sweep of every label, chip, header and footer for the old wording. The table lists each guard and the failure it closes.

Pseudo-code
cards = list_cards(folder_of(this_script))
if not cards:
    fail("QA did not run: no cards found")    # non-zero exit, never a silent pass

for card in cards:
    ids = anchor_ids(card)
    for name in duplicates(ids):
        report_bug("duplicate id", name)

    for target in internal_link_targets(card):
        if target not in ids:
            report_bug("dangling link", target)

    style = product_letter_style(card)
    if style.italic and not style.serif:
        report_bug("italic l reads as a slash")
    elif style.monospace and not style.italic:
        report_bug("upright l reads as the digit 1")
Pseudo-code. The QA pass, simplified: it refuses to run on nothing, then checks anchors, links and the glyph rule on every card.
From the written build procedure. Each guard was added after the failure was met or caught during a build.
Failure modeGuard in the build
The memo is open in Word: the read fails and leaves an empty file over an archived versionCopy the memo first; extract from the copy
A plain-text copy drops the red ink, and the brief silently stops flagging the desk’s own changesOnly the marked-up XML extraction is accepted as input
The diff’s two sides are read the wrong way round, which flips a thresholdEvery changed number and contract name is re-read in the new extraction
A rule text read earlier in a long build has since been superseded (it reached one edition)The tools’ rule text and task names are re-read at every build
A cloned card keeps yesterday’s ▲ markers (five were found on one edition)Search every freshness marker in the clone and re-date each hit
A superseded rule survives in a step label after the card body is fixedWhen a rule changes, sweep labels, chips, headers and footers for the old wording
A longer date wraps the title without tripping the overflow measureEvery page is rendered and looked at, small glyphs at 4 to 6 times
The QA script finds no files and still exits 0Folder taken from the script’s own location; no files is fatal, with a non-zero exit code
The letter l reads as the digit 1, then as a slashSerif bold italic for product letters, enforced by the QA script
A link opens a browser instead of jumping inside the PDFExternal links are counted in the PDF and must be zero

The letter l

The card’s job includes spread-order names that must be typed exactly, and one product’s code is the single letter l. In the monospace face first used for contract names, l2610 read as 12610, which is not a contract. Product letters were restyled in bold italic, and the next morning Shuo caught that the italic l now read as a slash.

Nine font treatments were then rendered and compared at 4 to 6 times magnification on a test sheet. Of the nine, only serif bold italic gave a letterform distinct from both the digit and the slash. The choice is enforced by the QA script, which reports a bug if the product-letter style is italic without a serif family or upright monospace.

Why not something simpler?

Every obvious shortcut would have needed an install, had already failed once, or could not carry the detail.

Each row traces to the build procedure, an edition’s change notes or the original design brief.
AlternativeWhy it was rejected
Read the memo and scan for red textFormatting is applied by hand. A computed diff does not depend on it, and it also proves what is word for word unchanged.
Dump the memo to plain text and diff thatLoses the red ink, which is the memo’s change log, so the brief could no longer show the desk’s own emphasis.
A document converter or a Python stackEither would have to be installed. PowerShell, .NET and the browser are already on the machine, so the pipeline has no dependencies.
Diff only the newest memo against the last one cardedShows what changed but not why: the context usually sits in a skipped version, and a diff of the two ends nets out everything in between.
Infer engine behavior from the editor’s code and commentsThe editor’s own dialogs carried a secondhand reading. For engine behavior the procedure now says: ask the engine’s owners.
A one-page posterNo room for the steps behind each instruction. Hence one glance page per product group, plus a link from every cell.
Trust a green QA runA run that checks nothing also looks green. The script now fails when it has nothing to check.

Layout, output and numbers

Each card is one self-contained HTML file with no dependencies: A4 landscape, a fixed page box, anchors on every card. Opened with a query flag, the page measures itself and reports the overflow of every page, which must be zero; a longer date in the title can wrap without overflowing, so every page is also rendered and looked at. The installed browser, in headless mode, prints the PDF, turning each anchor link into an internal jump; the build then counts pages and link annotations and requires zero external links.

Recounted from the 19 HTML and PDF files, the two scripts and the build timestamps.
MeasureValue
Editions19, built Jul 23 to Sep 8, 2026
Instruction versions archived and diffed32
Products covered15 (9 Shanghai and energy, 6 Dalian)
Pipeline code2 PowerShell scripts, 174 lines, no dependency beyond .NET
Pages per edition4 to 6, A4 landscape
Cross-links per edition37 to 93 in the HTML; 40 to 97 link annotations in the PDF
External links, all 19 PDFs0
First card22 minutes from start to finished PDF, 53 internal links
Typical build9 to 15 minutes from start to verified PDF; the two largest rewrites took 28 and 45
Automated QA checks per card6, plus the page-overflow measure and the PDF link count
Last full QA run20 files checked (19 cards and the glyph test sheet), 0 bugs
Steps in the written build procedure7, each traced to a defect it closes

Built with

  • PowerShell
  • .NET (System.IO.Compression, System.Xml)
  • Office Open XML parsing · XPath
  • Version diffing and change control
  • Regular expressions
  • Automated QA gate (fail-closed)
  • HTML/CSS print layout
  • Headless-browser PDF generation
  • Data pipeline
  • Market-making operations

06Releases

Shipped in versions, like a product.

  1. First editionShanghai and energy products. Four pages and 53 internal links, finished 22 minutes after he started.
  2. Second editionThe Dalian products get their own glance page; the two groups are combined into one brief from the next edition.
  3. Spread-status rule settledConfirmed in writing with the engine team; three cards and Strategy Console’s confirmation dialogs corrected the same morning.
  4. Glyph rule and written procedureNine font treatments tested for the letter l; the QA script is written and enforces the result, and the build procedure is set down step by step.
  5. 19th and last editionAdds the evening shift beside the day session. The QA script now refuses to pass when it finds no cards to check.
  1. 1The written build procedure has seven steps; each records the defect that led to it.
  2. 2Jul 23, 2026: started at 08:40, finished four-page PDF with 53 internal links at 09:02. Typical later builds took 9 to 15 minutes from start to verified PDF; the two largest rewrites took 28 and 45.
  3. 3Consequences flagged by the briefs, taken from each edition’s change notes. No avoided loss or prevented error was measured, and none is claimed.
  4. 4The engine belongs to the desk’s IT team and is described here only in general terms; the cards and the Strategy Console editor are Shuo’s.
  5. 519 editions built on 19 trading days between Jul 23 and Sep 8, 2026. An edition was built when the instructions had changed, not on a fixed schedule; gaps were covered by reading every skipped version. Built for Shuo’s own trading day.
  6. 632 extracted instruction versions in Shuo’s archive, including versions for which no card was built.
  7. 7Nine products on the Shanghai Futures Exchange and Shanghai International Energy Exchange and six on the Dalian Commodity Exchange, counted across the series; the first two editions covered one product group each. 18 of the 19 editions cover the day session; the last adds the evening shift.
  8. 8Each card holds the desk’s live settings, which are confidential, so this page describes the cards and shows none.
  9. 9Zero page overflow, a rendered review of every page, the QA script with zero bug lines, and a regenerated PDF whose links are all internal. The four checks are written into the build procedure as mandatory for every edition. The QA script and the written procedure date from Jul 30, 2026, a week after the first card; every run of the script since re-checks all editions, the earlier ones included.
  10. 10Charts, figure data and screenshots on this page are synthetic, illustrative or public market data. Methods and outcomes are described as they happened; the desk’s own figures are confidential and do not appear here. The editions chart counts Shuo’s own work.
Previous
Previous

Options Ranking Probability

Next
Next

Spread Liquidity Study