What does FX Spreads, DCC Traps and Residency Days conclude, in numbers, about “How Much to Take Out of the ATM: The Economic Order Quantity”?

Answer: Chapter 3 uses the economic order quantity: with a fee of 25 the best withdrawal is 10954, and when leftovers are changed back at 0.06 the best is 12000, not the maximum.

Scope of the numbers: Its exchange rates, fees and itineraries are illustrative models; all calculations are generated by its programs; the book is not tax, immigration, legal or investment advice. Marked boxes separate published evidence, runnable Python calculations (16 programs), classical sources and the author's hypotheses.

中文版

Data table

The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 10954, 25

fee FQ*withdrawalscost at Q*cost at capcost at 2,000
25109542.19109.5109.5310.0
50154921.55154.9154.9610.0
100219091.10219.1220.01210.0
Show the full program
# Chapter 3. p05: How much cash to take out of the ATM at a time? The
# Baumol-Tobin rule: a trip needs D = 24,000 of local cash over L = 10
# days; each withdrawal costs a fixed F; cash held loses theta = 0.001
# of its value per day (loss, theft, the cost of guarding it). Holding
# Q/2 on average for L days costs theta L Q / 2, so the best amount is
# Q* = sqrt(2 F D / (theta L)). Many ATMs cap a withdrawal at 20,000.
# No sampling.
from math import sqrt

D, L, THETA, CAP = 24000.0, 10.0, 0.001, 20000.0

def cost(q, f):
    return f * D / q + THETA * L * q / 2

if __name__ == "__main__":
    print("   fee F   Q*       withdrawals   cost at Q*   cost at cap"
          "   cost at 2,000")
    for f in (25.0, 50.0, 100.0):
        q = sqrt(2 * f * D / (THETA * L))
        print("   {:5.0f}   {:6.0f}   {:11.2f}   {:10.1f}   {:11.1f}"
              "   {:13.1f}".format(f, q, D / q, cost(q, f),
                                   cost(min(q, CAP), f), cost(2000.0, f)))

Single source and citation

Fan, Y. (2026). Multicurrency FX Spread Microstructure, Dynamic Currency Conversion Traps and Tax-Residency Day-Counting Thresholds (Version 1.0.0), Chapter 3: How Much to Take Out of the ATM: The Economic Order Quantity. 5D Library. DOI pending

DOI pending · monograph page goes live after publication · 5DL-B-108 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026108,
  author    = {Fan, Yafu},
  title     = {Multicurrency FX Spread Microstructure, Dynamic Currency Conversion Traps and Tax-Residency Day-Counting Thresholds},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book