A runnable six-layer model of the dollar index, and a measurement of something the original model cannot express: the hole that stays behind after a closed loop returns to where it started.
Three self-contained pages. Nothing to install, no server, no build step — they run entirely in your browser.
The six sheets in 3D. All 78 variables as sliders grouped by sheet, a knife you can open and close, and a toggle between two memory models. Fire two shocks in either order and watch for a scar.
open →The same 78 variables, placed by geometric role rather than by which equation they are a coefficient of. Position, tangent, curvature, amplitude.
open →Drive the six layers directly and watch the three-block decomposition respond. Eleven scenarios built in, five of them historical case studies.
open →The panel interface is in Vietnamese. Variable names, Greek symbols and numbers are not language-specific, and each sheet group is labelled Σ₀ … Σ₅.
Three quantities that are all exactly zero in the original model — not small, zero, and zero for a structural reason.
| τ ≡ 0 | hysteresis · τ = 0.294 | fatigue · τ = 0.122 | |
|---|---|---|---|
| commutator ‖[L₄, L₅]‖ | 0.000e+00 | 0.000e+00 | 1.720e-02 |
| holonomy H(γ) | +0.000e+00 | −7.318e-02 | −4.056e-02 |
| residue after unwinding | +0.000000 | +0.027931 | +0.011078 |
The original model's layer E9 is a function of the current state and carries no history, so two paths reaching the same state must produce the same output. It is not missing a term — it sits in a function class that cannot express "the hole that stays behind."
That turns into an empirical question, and it does not need a long sample:
Does the order of two shocks change the permanent level, when the final state is identical?
Yes → fatigue. No → hysteresis.
Note the hysteresis commutator is zero by the definition of the operator: it takes a running maximum over history, and two orderings traverse the same state set. Holonomy and residue are non-zero in both. A closed loop returns to the starting state; the scar remains.
The relationship between them is the interesting part.
| package | what it is | imports amr? |
|---|---|---|
| amr | the book's model — six layers at standard form, with boundary checks | — |
| amr2 | a different model: the book's errors corrected, fitted to real FRED data, with out-of-sample backtests | no, by design |
| amr3 | the same model re-read in geometric coordinates: sheets, scars, path dependence | yes, runs it inside |
amr2 stands apart because it is a rival model and has to be
comparable. amr3 nests amr because it is the same
model in different coordinates, and the way you prove a re-reading is faithful
is to run the original inside it:
τ ≡ 0 → no overrides → ln DXY identical to amr, difference 0.000e+00
amr3 adds exactly one parameter and no new edges
— the edge set is taken unchanged from the gamma field of
amr/registry.py.
Python 3.9+. No dependencies at all — standard library only.
git clone https://github.com/vinhatson/amr-engine.git cd amr-engine python -m amr check # structural constraints, with the slack on each python -m amr list # the scenarios, and what the book says about each python -m amr run narrative # a full qualitative reading python -m amr audit # every scenario against the book's own numbers python -m amr2 # book model vs corrected model, same exam python -m amr3 # the atlas, three measurements, the τ sweep python tests/test_engine.py # amr python tests/test_amr2.py # amr2 python tests/test_amr3.py # amr3
All three suites pass on Python 3.12 across Windows, macOS and Linux. They
check structure, not just output:
test_atlas_covers_every_amr_variable_exactly_once asserts 78 of
78, nothing added and nothing dropped.
amr is qualitative: it produces an arrow scale and a three-block
decomposition, not a calibrated point forecast.narrative_vi(); there is no narrative_en() yet.
Everything structured — numbers, arrow scale, block attribution,
evidence_mix — is language neutral, and the registry carries a
name_en field. An English renderer is the most useful
contribution anyone could make.row.cpi_imputed
is True there.Một mô hình sáu tầng chạy được của chỉ số đô la, và một phép đo cho thứ mà mô hình gốc không diễn đạt nổi: cái lỗ còn lại sau khi một vòng kín đã quay về đúng nơi nó bắt đầu.
Ba trang tự chứa. Không phải cài gì, không cần server, không cần build — chúng chạy hoàn toàn trong trình duyệt của bạn.
Sáu tấm trong không gian 3D. Cả 78 biến dưới dạng slider nhóm theo tấm, một con dao bạn mở đóng được, và một công tắc chuyển giữa hai mô hình trí nhớ. Bắn hai cú sốc theo hai thứ tự rồi xem có vết sẹo nào không.
mở →Cùng 78 biến đó, xếp theo vai hình học thay vì theo việc chúng là hệ số của phương trình nào: vị trí, tiếp tuyến, độ cong, biên độ.
mở →Điều khiển trực tiếp sáu tầng và xem phân rã ba khối phản ứng. Mười một kịch bản có sẵn, năm trong số đó là nghiên cứu tình huống lịch sử.
mở →Ba đại lượng mà cả ba bằng đúng 0 trong mô hình gốc — không phải nhỏ, mà là 0, và 0 vì một lý do cấu trúc.
| τ ≡ 0 | trễ · τ = 0,294 | mỏi · τ = 0,122 | |
|---|---|---|---|
| giao hoán tử ‖[L₄, L₅]‖ | 0,000e+00 | 0,000e+00 | 1,720e-02 |
| holonomy H(γ) | +0,000e+00 | −7,318e-02 | −4,056e-02 |
| dư âm sau khi gỡ sốc | +0,000000 | +0,027931 | +0,011078 |
Tầng E9 của mô hình gốc là một hàm của trạng thái hiện tại và không mang theo lịch sử nào, nên hai đường đi tới cùng một trạng thái bắt buộc cho cùng một đầu ra. Nó không thiếu một số hạng — nó nằm trong một lớp hàm không thể diễn đạt nổi "cái lỗ còn lại".
Điều đó biến thành một câu hỏi thực nghiệm, và câu này không cần đợt dữ liệu dài:
Thứ tự hai cú sốc có đổi mức thường trực không, khi trạng thái cuối giữ nguyên?
Có → mỏi. Không → trễ.
Lưu ý giao hoán tử của dạng trễ bằng 0 theo đúng định nghĩa của toán tử: nó lấy cực đại theo lịch sử, và hai thứ tự đi qua cùng tập trạng thái. Holonomy và dư âm thì khác 0 ở cả hai. Vòng kín quay về đúng trạng thái đầu; vết sẹo thì ở lại.
Quan hệ giữa chúng mới là phần thú vị.
| package | là gì | có nhập amr? |
|---|---|---|
| amr | mô hình của sách — sáu tầng ở dạng chuẩn, có kiểm tra biên | — |
| amr2 | một mô hình KHÁC: sửa các lỗi của sách, khớp với dữ liệu FRED thật, có backtest ngoài mẫu | không, có chủ đích |
| amr3 | CÙNG mô hình, đọc lại trong hệ toạ độ hình học: tấm, vết sẹo, phụ thuộc đường đi | có, chạy nó ở bên trong |
amr2 đứng riêng vì nó là mô hình đối thủ, phải so sánh được.
amr3 lồng amr vào trong vì nó là cùng mô hình trong
hệ toạ độ khác, và cách chứng minh một lối đọc là trung thực chính là chạy bản
gốc ở trong nó:
τ ≡ 0 → overrides rỗng → ln DXY trùng khít amr, chênh lệch 0.000e+00
amr3 thêm đúng một tham số và không thêm cạnh
nào — tập cạnh lấy nguyên từ trường gamma trong
amr/registry.py.
Python 3.9+. Không phụ thuộc gì cả — chỉ thư viện chuẩn.
git clone https://github.com/vinhatson/amr-engine.git cd amr-engine python -m amr check # ràng buộc cấu trúc, kèm độ dư từng cái python -m amr list # các kịch bản, kèm điều sách nói về từng cái python -m amr run narrative # một bản đọc định tính đầy đủ python -m amr audit # mọi kịch bản, đối chiếu số liệu sách python -m amr2 # mô hình sách đối đầu mô hình đã sửa python -m amr3 # bản đồ, ba phép đo, quét τ python tests/test_engine.py # amr python tests/test_amr2.py # amr2 python tests/test_amr3.py # amr3
Cả ba bộ test pass trên Python 3.12, trên Windows, macOS và Linux. Chúng
kiểm cấu trúc, không chỉ kiểm output:
test_atlas_covers_every_amr_variable_exactly_once khẳng định
78/78, không thêm không bớt.
amr là định tính: nó cho ra thang mũi tên và phân rã ba khối,
không phải một dự báo điểm đã hiệu chỉnh.row.cpi_imputed bật True.