What does PPP Distortions and Multi-Currency Price Endings conclude, in numbers, about “Rolling Out the Southeast Asia–Taiwan–Japan Pricing Matrix: Four Product Classes, Update Rhythm and the Calculator Specification”?
Answer: Avoid rule: if a market sets avoid, drop the lattice points whose whole part contains any of those digits. Golden slices (to be compared item by item with the slices p70 prints): USD between 40 and 70 is 49.00, 49.90, 49.99, 59.00, 59.90, 59.99, 69.00, 69.90, 69.99; MYR between 120 and 160 is 129.00, 129.90, 139.00, 139.90, 149.00, 149.90, 159.00, 159.90; TWD from 980 to 1,299 is 980, 988, 990, 999, 1,080, 1,088, 1,090, 1,099, 1,180, 1,188, 1,190, 1,199, 1,280, 1,288, 1,290, 1,299; JPY between 4,980 and 6,000 has one 80-ending point per hundred, from 4,980 to 5,980; the round MYR points run from 900.00 to 1,200.00 in steps of 50; the round JPY points run from 30,000 to 40,000 in steps of 1,000.
Scope of the numbers: Exchange rates and price levels in the book are stated sample assumptions, not live data; taxes, display rules and the law on price discrimination are described only in general terms, not as legal or tax advice. Marked boxes separate published evidence, runnable calculations, sources and the author's hypotheses, each stating what would refute it.
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: 1080, 1088, 1090, 1099, 1180, 1188
| sample FX, PLI, fees, costs and tax parameters are assumptions, not live data or tax advice | |
| == deck: P0 49.00 USD, everyday lattice, beta 0.6, margin floor 0.55, fee 0.084, band 0.03 x + 12.00 + 3.00 | |
| mkt cur hard FX tier floor PRICE USD equiv margin edge code | |
| US USD | 49.00 49.00 33.72 49.00 49.00 0.690 0.4531 TIER/EXACT |
| MY MYR | 216.58 130.53 91.15 149.00 33.71 0.725 0.0212 BAND/UP |
| SG SGD | 65.17 59.53 37.59 59.90 45.04 0.718 0.5935 TIER/UP |
| TW TWD | 1,548.40 1,045.89 970.39 1,080 34.18 0.596 0.1130 TIER/UP |
| JP JPY | 7,301.00 5,585.86 5,457.72 5,580 37.45 0.560 0.0224 TIER/DOWN |
| USD-equivalent spread: max - min | 15.29, max / min = 1.454 |
| == report: P0 29.00 USD, everyday lattice, beta 0.8, margin floor 0.55, fee 0.084, band 0.03 x + 0 + 8.00 | |
| mkt cur hard FX tier floor PRICE USD equiv margin edge code | |
| US USD | 29.00 29.00 1.21 29.00 29.00 0.981 22.9076 TIER/EXACT |
| MY MYR | 128.18 65.25 5.83 99.00 22.40 0.973 0.0819 BAND/UP |
| SG SGD | 38.57 34.19 1.77 39.00 29.32 0.980 20.9951 TIER/UP |
| TW TWD | 916.40 543.11 40.43 680 21.52 0.973 0.0395 BAND/UP |
| JP JPY | 4,321.00 3,023.63 200.65 3,180 21.34 0.972 0.0309 BAND/UP |
| USD-equivalent spread: max - min | 7.98, max / min = 1.374 |
| == course: P0 199.00 USD, everyday lattice, beta 0.8, margin floor 0.55, fee 0.084, band 0.03 x + 0 + 15.00 | |
| mkt cur hard FX tier floor PRICE USD equiv margin edge code | |
| US USD | 199.00 199.00 29.11 199.00 199.00 0.934 5.8357 TIER/EXACT |
| MY MYR | 879.58 447.76 140.00 789.90 178.71 0.920 0.0004 BAND/UP WARN_KNIFE_EDGE |
| SG SGD | 264.67 234.59 42.56 239.00 179.70 0.920 4.6163 TIER/UP |
| TW TWD | 6,288.40 3,726.86 970.39 5,680 179.75 0.923 0.0062 BAND/UP WARN_KNIFE_EDGE |
| JP JPY | 29,651.00 20,748.34 4,815.63 26,680 179.06 0.919 0.0023 BAND/UP WARN_KNIFE_EDGE |
| USD-equivalent spread: max - min | 20.29, max / min = 1.114 |
| == collector: P0 280 USD, round lattice, beta 0.6, margin floor 0.65, fee 0.084, band 0.03 x + 25.00 + 3.00 | |
| mkt cur hard FX tier floor PRICE USD equiv margin edge code | |
| US USD | 280.00 280.00 237.06 280.00 280.00 0.704 0.1812 TIER/EXACT |
Show the full program
# Chapter 7. p70: Reference run of the multi-currency pricing engine (matrix spec v1.0), four product classes.
# FX, PLI, fees, costs and tax rates are SAMPLE ASSUMPTIONS shared with chapters 1 and 8 (assumed, not
# live data, not tax advice; check the latest official notices before any real use).
# Engine for one product over the markets US, MY, SG, TW, JP (US is the anchor market):
# 1 tier T = P0 * fx * F(pli ** beta).limit_denominator(10^9) (a display price)
# 2 lattice nearest lattice point to T by |ln(p / T)|, ties to the lower point
# 3 floor incl: R = p / (1 + t) - phi p excl: R = p - phi p (1 + t) (phi = payment + platform)
# margin = (R - cost) / R >= M -> floor = cost (1 + s) / (1 - M) / den,
# den = 1 / (1 + t) - phi (incl) or 1 - phi (1 + t) (excl); den <= 0 -> REJECT_FEE_STACK
# cost = (unit cost USD + fixed fee USD) * fx; s = optional FX stress (default 0)
# if p < floor: p = smallest lattice point >= floor
# 4 band u = p / fx; a pair (a, b) breaches when u_a - u_b > sigma * u_b + parcel + hours;
# take the pair with the largest excess, raise the lower market b to the smallest lattice
# point >= (u_a - parcel - hours) / (1 + sigma) * fx_b * (1 + s); repeat until no breach.
# Never raise the anchor (-> REJECT_BAND_ANCHOR); if the raised b ends above a in USD
# (lattice too coarse) -> REJECT_BAND_OVERSHOOT.
# Lattices: everyday USD x9.00 x9.90 x9.99 | MYR, SGD x9.00 x9.90 | TWD last two digits 80 88 90 99 |
# JPY last two digits 80; round multiples of USD 10, SGD 10, MYR 50, TWD 100, JPY 1,000.
# a market's optional 'avoid' drops points whose whole part contains any of its digits.
# Units: smallest unit 0.01 for USD, SGD, MYR and 1 for TWD, JPY; WARN_KNIFE_EDGE when edge < 0.01.
import hashlib
import math
from fractions import Fraction as F
ROUND_STEP = {"USD": F(10), "SGD": F(10), "MYR": F(50), "TWD": F(100), "JPY": F(1000)}
QUANT = {"USD": F(1, 100), "SGD": F(1, 100), "MYR": F(1, 100), "TWD": F(1), "JPY": F(1)}
MARKETS = ("US", "MY", "SG", "TW", "JP")
CUR = {"US": "USD", "MY": "MYR", "SG": "SGD", "TW": "TWD", "JP": "JPY"}
FX = {"US": "1", "MY": "4.42", "SG": "1.33", "TW": "31.6", "JP": "149.0"} # SAMPLE, not live
PLI = {"US": "1.00", "MY": "0.43", "SG": "0.86", "TW": "0.52", "JP": "0.64"} # SAMPLE, US = 1
MODE = {"US": "excl", "MY": "incl", "SG": "incl", "TW": "incl", "JP": "incl"}
SHIP = {"US": "6.50", "MY": "1.10", "SG": "3.20", "TW": "4.60", "JP": "6.20"} # USD per unit, sample
BOX_SHIP = {"US": "14.00", "MY": "3.00", "SG": "6.00", "TW": "8.00", "JP": "10.00"} # insured, sample
GOODS_TAX = {"US": "0", "MY": "0", "SG": "0.09", "TW": "0.05", "JP": "0.10"} # sample parameters
DIGITAL_TAX = {"US": "0", "MY": "0.08", "SG": "0.09", "TW": "0.05", "JP": "0.10"}
def fmt(cur, v):
return "{:,.2f}".format(float(v)) if QUANT[cur] < 1 else "{:,}".format(int(v))
def lattice(cur, family, hi, avoid=""):
pts = set()
if family == "round":
step = ROUND_STEP[cur]
pts |= {step * j for j in range(1, int(hi / step) + 2)}
elif cur in ("USD", "MYR", "SGD"):
for t in range(0, int(hi) // 10 + 2):
pts |= {F(10 * t + 9), F(10 * t + 9) + F("0.90")}
if cur == "USD":
pts.add(F(10 * t + 9) + F("0.99"))
elif cur == "TWD":
for h in range(0, int(hi) // 100 + 2):
pts |= {F(100 * h + e) for e in (80, 88, 90, 99)}
else:
for h in range(0, int(hi) // 100 + 2):
pts.add(F(100 * h + 80))
return sorted(p for p in pts if 0 < p <= max(hi, 10) and not any(d in str(int(p)) for d in avoid))
def nearest(cur, family, x, avoid=""):
pts = lattice(cur, family, 3 * x, avoid)
return min(pts, key=lambda p: (abs(math.log(p / x)), p)) if pts else None
def up_from(cur, family, x, avoid=""):
pts = [p for p in lattice(cur, family, 3 * x, avoid) if p >= x]
return min(pts) if pts else None
def run(prod, mk):
"""prod: product dict; mk: {market: dict(fx, pli, tax, mode, cost_usd)}. Returns {market: result}."""
try:
p0, beta, m, phi = F(prod["p0"]), float(prod["beta"]), F(prod["floor"]), F(prod["fee"])
sig, parcel, hours = F(prod["spread"]), F(prod["parcel"]), F(prod["hours"])
s, fam = F(prod.get("stress", "0")), prod["family"]
rows = {k: (CUR[k], F(v["fx"]), float(v["pli"]), F(v["tax"]), v["mode"],
F(v["cost_usd"]) + F(prod.get("fixed_usd", "0"))) for k, v in mk.items()}
avoids = {k: v.get("avoid", "") for k, v in mk.items()}
except (KeyError, ValueError, ZeroDivisionError):
return {"*": {"code": "REJECT_INPUT"}}
if (p0 <= 0 or not 0 <= beta <= 1 or not 0 <= m < 1 or phi < 0 or min(sig, parcel, hours) < 0
or not 0 <= s < 1 or fam not in ("everyday", "round") or "US" not in rows
or any(e <= 0 or lv <= 0 or t < 0 or md not in ("incl", "excl") or c < 0
for _, e, lv, t, md, c in rows.values())):
return {"*": {"code": "REJECT_INPUT"}}
out = {}
for k, (cur, e, lv, t, md, c) in rows.items():
tier = p0 * e * F(lv ** beta).limit_denominator(10 ** 9)
den = (1 / (1 + t) - phi) if md == "incl" else (1 - phi * (1 + t))
if den <= 0:
return {k: {"code": "REJECT_FEE_STACK"}}
floor = c * e * (1 + s) / (1 - m) / den
p = nearest(cur, fam, tier, avoids[k])
why = "TIER"
if p is not None and p < floor:
p, why = up_from(cur, fam, floor, avoids[k]), "FLOOR"
if p is None:
return {k: {"code": "REJECT_NO_LATTICE"}}
out[k] = {"cur": cur, "fx": e, "tax": t, "mode": md, "cost": c * e, "tier": tier,
"floor": floor, "price": p, "why": why, "need": F(0)}
for _ in range(4 * len(out)):
usd = {k: r["price"] / r["fx"] for k, r in out.items()}
breach = sorted(((usd[a] - usd[b] - sig * usd[b] - parcel - hours, a, b) for a in out for b in out
if usd[a] - usd[b] > sig * usd[b] + parcel + hours), reverse=True)
if not breach:
break
excess, a, b = breach[0]
if b == "US":
return {b: {"code": "REJECT_BAND_ANCHOR", "excess": excess, "pair": a + ">" + b}}
need = (usd[a] - parcel - hours) / (1 + sig) * out[b]["fx"] * (1 + s)
new = up_from(out[b]["cur"], fam, need, avoids[b])
if new is None:
return {b: {"code": "REJECT_NO_LATTICE"}}
if new / out[b]["fx"] > usd[a]:
return {b: {"code": "REJECT_BAND_OVERSHOOT", "pair": a + ">" + b}}
out[b].update(price=new, why="BAND", need=need)
for k, r in out.items():
p, t = r["price"], r["tax"]
n, pay = (p / (1 + t), p) if r["mode"] == "incl" else (p, p * (1 + t))
rev = n - phi * pay
r["margin"] = (rev - r["cost"]) / rev
r["usd"] = p / r["fx"]
r["edge"] = p / max(r["floor"], r["need"]) - 1
r["code"] = r["why"] + "/" + ("EXACT" if p == r["tier"] else ("UP" if p > r["tier"] else "DOWN"))
return out
def markets(tax, cost_usd, **over):
mk = {k: {"fx": FX[k], "pli": PLI[k], "tax": tax[k], "mode": MODE[k], "cost_usd": cost_usd[k]}
for k in MARKETS}
for key, val in over.items(): # e.g. JP_fx="160"
k, f = key.split("_", 1)
mk[k][f] = val
return mk
PRODUCTS = { # sample, fictional brand Mistharbor; deck = the chapter 8 everyday deck
"deck": ({"p0": "49.00", "family": "everyday", "beta": "0.6", "floor": "0.55", "fee": "0.084",
"spread": "0.03", "parcel": "12.00", "hours": "3.00"},
GOODS_TAX, {k: str(F("7.40") + F(SHIP[k])) for k in MARKETS}),
"report": ({"p0": "29.00", "family": "everyday", "beta": "0.8", "floor": "0.55", "fee": "0.084",
"spread": "0.03", "parcel": "0", "hours": "8.00"},
DIGITAL_TAX, dict.fromkeys(MARKETS, "0.50")),
"course": ({"p0": "199.00", "family": "everyday", "beta": "0.8", "floor": "0.55", "fee": "0.084",
"spread": "0.03", "parcel": "0", "hours": "15.00"},
DIGITAL_TAX, dict.fromkeys(MARKETS, "12.00")),
"collector": ({"p0": "280", "family": "round", "beta": "0.6", "floor": "0.65", "fee": "0.084",
"spread": "0.03", "parcel": "25.00", "hours": "3.00"},
GOODS_TAX, {k: str(F("62.00") + F(BOX_SHIP[k])) for k in MARKETS}),
}
def product_run(name, prod_over=None, **mk_over):
prod, tax, cost = PRODUCTS[name]
prod = dict(prod, **(prod_over or {}))
return run(prod, markets(tax, cost, **mk_over))
if __name__ == "__main__":
print("sample FX, PLI, fees, costs and tax parameters are assumptions, not live data or tax advice")
canon = []
for name, (prod, _, _) in PRODUCTS.items():
print("== {}: P0 {} USD, {} lattice, beta {}, margin floor {}, fee {}, band {} x + {} + {}".format(
name, prod["p0"], prod["family"], prod["beta"], prod["floor"], prod["fee"], prod["spread"],
prod["parcel"], prod["hours"]))
print(" mkt cur hard FX tier floor PRICE USD equiv margin edge code")
res = product_run(name)
for k in MARKETS:
r = res[k]
canon.append("{}|{}|{}".format(name, k, fmt(r["cur"], r["price"])))
print(" {} {} {:>11} {:>11} {:>11} {:>11} {:>10.2f} {:>7.3f} {:>7.4f} {}{}".format(
k, r["cur"], "{:,.2f}".format(float(F(prod["p0"]) * r["fx"])),
"{:,.2f}".format(float(r["tier"])), "{:,.2f}".format(float(r["floor"])),
fmt(r["cur"], r["price"]), float(r["usd"]), float(r["margin"]), float(r["edge"]),
r["code"], " WARN_KNIFE_EDGE" if r["edge"] < F(1, 100) else ""))
u = [float(r["usd"]) for r in res.values()]
print(" USD-equivalent spread: max - min = {:.2f}, max / min = {:.3f}".format(
max(u) - min(u), max(u) / min(u)))
digest = hashlib.sha256("\n".join(canon).encode("ascii")).hexdigest()[:16]
print("golden matrix fingerprint (sha256 of class|market|price lines, first 16 hex): " + digest)
print("lattice golden slices:")
for cur, fam, a, b in (("USD", "everyday", 40, 70), ("MYR", "everyday", 120, 160),
("SGD", "everyday", 50, 70), ("TWD", "everyday", 980, 1300),
("JPY", "everyday", 4980, 6000), ("MYR", "round", 900, 1200),
("JPY", "round", 30000, 40000)):
pts = [fmt(cur, v) for v in lattice(cur, fam, b) if a <= v <= b]
for i in range(0, len(pts), 10):
print(" {} {:<8} ".format(cur, fam) + " ".join(pts[i:i + 10]))Single source and citation
Fan, Y. (2026). Purchasing-Power-Parity Distortions, Multi-Currency Psychological Price Endings and the Southeast Asia–Taiwan–Japan Pricing Matrix (Version 0.1.0), Chapter 7: Rolling Out the Southeast Asia–Taiwan–Japan Pricing Matrix: Four Product Classes, Update Rhythm and the Calculator Specification. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-134 · v0.1.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026134,
author = {Fan, Yafu},
title = {Purchasing-Power-Parity Distortions, Multi-Currency Psychological Price Endings and the Southeast Asia–Taiwan–Japan Pricing Matrix},
year = {2026},
publisher = {5D Library},
edition = {0.1.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · Method: The Hard-Conversion Trap, Purchasing-Power Parity and Psychological Endings
- Chapter 2 · Anchors of Six Currencies: Denominations, Small Change, Endings and Tax-Inclusive Labels
- Chapter 3 · Purchasing-Power-Parity Distortions: Why Hard Conversion Is a Price Rise in Low-Price-Level Markets
- Chapter 4 · Ending Lattices: Landing a Tier Price on a Number Local Buyers Recognise
- Chapter 5 · Arbitrage Bands: How Wide a Price Gap Can Hold, and What Holds It
- Chapter 6 · Tax-Inclusive Display, Fees and Exchange-Rate Drift: How Endings Wear Down Before and After Checkout
- Chapter 8 · Practice: Mistharbor Cards Launches in Five Markets, from One Dollar Price through the Four Steps