republic8 commited on
Commit
ce8e1e1
Β·
1 Parent(s): cb772c8

update README

Browse files
Files changed (1) hide show
  1. README.md +171 -7
README.md CHANGED
@@ -1,16 +1,180 @@
1
- # Code for "Limit Order Book Dynamics in Matching Markets"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
- This Space provides the official code link for the paper:
4
 
5
- **Limit Order Book Dynamics in Matching Markets: Microstructure, Spread, and Execution Slippage**
 
 
6
  arXiv: https://arxiv.org/abs/2511.20606
7
 
 
 
 
 
 
 
 
 
 
 
 
8
  ---
9
 
10
- ### πŸ”— Full Implementation (GitHub)
11
- https://github.com/Republic1024/Limit-Order-Matching-Microstructure
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
 
13
  ---
14
 
15
- This Space exists to allow HuggingFace Trending Papers to link the code implementation
16
- after Paper With Code shutdown.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Limit Order Matching Microstructure
3
+ emoji: πŸ“ˆ
4
+ colorFrom: pink
5
+ colorTo: indigo
6
+ sdk: static
7
+ pinned: false
8
+ ---
9
+
10
+ # Limit-Order-Matching-Microstructure
11
+ Paper: https://arxiv.org/abs/2511.20606
12
+ Code: https://github.com/Republic1024/Limit-Order-Matching-Microstructure
13
+ ### Unifying Matching Markets and Limit Order Books through Microstructure Dynamics
14
+ ### Code Release for: *Limit Order Book Dynamics in Matching Markets: Microstructure, Spread, and Execution Slippage*
15
+
16
+ ![simulation_results.png](simulation_results.png)
17
+ ---
18
 
19
+ ## πŸ“Œ Overview
20
 
21
+ This repository contains the full simulation code, experiments, and visualization pipeline for the paper:
22
+
23
+ **β€œLimit Order Book Dynamics in Matching Markets: Microstructure, Spread, and Execution Slippage”**
24
  arXiv: https://arxiv.org/abs/2511.20606
25
 
26
+ The project proposes a unified framework where **matching markets** (e.g., marriage, partner choice, labor matching) are modeled as **limit order books**, with:
27
+
28
+ - **Intrinsic value** β†’ `ask`
29
+ - **Reachability constraint** β†’ `bid-depth / liquidity drought`
30
+ - **Ξ”V gap** β†’ structural **spread**
31
+ - **Compensation C** β†’ imperfect price improvement
32
+ - **Slippage (regret)** β†’ execution shortfall
33
+ - **Settling** β†’ threshold-decay crossing event
34
+
35
+ The framework shows that **linear compensation cannot close structural preference gaps**, unless it triggers a **categorical identity shift** (`Identity Collapse Threshold`).
36
+
37
  ---
38
 
39
+ ## πŸ” Core Concepts
40
+
41
+ ### **1. Unconditional vs. Reachable Maximum**
42
+ - `V_uncond_max`: Best perceived partner that exists in the population.
43
+ - `V_reach_max`: Best partner currently reachable under social liquidity constraints.
44
+ - `Ξ”V = V_uncond_max - V_reach_max`:
45
+ β†’ The **structural preference gap**, analogous to a *bid-ask spread*.
46
+
47
+ ### **2. Theorem 1 β€” Compensation Clipping & Identity Collapse**
48
+ If compensation utility is:
49
+
50
+ ```
51
+
52
+ h(C) = min(Ξ΅C, C_max)
53
+
54
+ ```
55
+
56
+ Then:
57
+
58
+ - If `Ξ΅C < C_max` β†’ **Compensation is ineffective**: Ξ”V persists
59
+ - If `Ξ΅C β‰₯ C_max` β†’ **Identity Collapse**: category shift occurs
60
+
61
+ This mirrors slippage-bounded execution in microstructure.
62
+
63
+ ### **3. Threshold Dynamics (Settling)**
64
+ Commitment occurs when:
65
+
66
+ ```
67
+
68
+ ΞΈ = U_effective / V_uncond_max β‰₯ T(t)
69
+
70
+ ```
71
+
72
+ Where `T(t)` is a decaying liquidity threshold (similar to urgency-driven execution).
73
+
74
+ ---
75
+
76
+ ## πŸ“ Repository Structure
77
+
78
+ ```
79
+
80
+ Limit-Order-Matching-Microstructure/
81
+ β”‚
82
+ β”œβ”€β”€ exp1-5.py # Main experiments (Sections 4.2–4.6)
83
+ β”œβ”€β”€ exp1-5-Chinese.py # Chinese commented version
84
+ β”œβ”€β”€ simulation_results.png # Fig 5 replication
85
+ β”œβ”€β”€ simulation_results2.png # Slippage + Clipping + Settling plots
86
+ β”œβ”€β”€ data/ # (Empty / Ignored) placeholder for datasets
87
+ β”œβ”€β”€ img1.jpg # Paper figure assets
88
+ β”œβ”€β”€ img2.jpg
89
+ β”œβ”€β”€ img3.jpg
90
+ β”œβ”€β”€ .gitignore
91
+ └── README.md
92
+
93
+ ```
94
 
95
  ---
96
 
97
+ ## πŸ“Š Experiments Included (Sections 4.2–4.6)
98
+
99
+ ### **Experiment 1 β€” Compensation Failure**
100
+ Shows why compensation cannot close Ξ”V under clipping.
101
+
102
+ ### **Experiment 2 β€” Settling Dynamics**
103
+ Implements the threshold-decay commitment model.
104
+
105
+ ### **Experiment 3 β€” Instant Commitment**
106
+ High-tier reachable candidate β†’ immediate match.
107
+
108
+ ### **Experiment 4 β€” Regional Differences**
109
+ Despite different compensation norms (Jiangsu vs Guangdong),
110
+ **ranking is invariant** β†’ structural gaps dominate.
111
+
112
+ ### **Experiment 5 β€” Regret Prediction**
113
+ Shock to `V_uncond_max` yields post-match ΞΈ decline β†’ slippage regret.
114
+
115
+ ---
116
+
117
+ ## 🎨 Visualization
118
+
119
+ `generate_academic_plots()` reproduces Figures:
120
+
121
+ - Settling curve `T(t)` vs ΞΈ
122
+ - Compensation utility clipping (Theorem 1)
123
+ - Structural slippage bars
124
+
125
+ Outputs:
126
+
127
+ ```
128
+
129
+ simulation_results2.png
130
+
131
+ ```
132
+
133
+ ---
134
+
135
+ ## ▢️ How to Run
136
+
137
+ ### **1. Install dependencies**
138
+ ```
139
+
140
+ pip install numpy pandas matplotlib
141
+
142
+ ```
143
+
144
+ ### **2. Run the experiments**
145
+ ```
146
+
147
+ python exp1-5.py
148
+
149
+ ```
150
+
151
+ ### **3. Generate visualizations**
152
+ (automatically triggered at the end)
153
+
154
+ ---
155
+
156
+ ## πŸ“š Citation
157
+
158
+ If you use this framework, please cite:
159
+
160
+ ```
161
+
162
+ Wu, Y. (2025). Limit Order Book Dynamics in Matching Markets:
163
+ Microstructure, Spread, and Execution Slippage.
164
+ arXiv:2511.20606.
165
+
166
+ ```
167
+
168
+ ---
169
+
170
+ ## 🧠 Philosophy Behind the Model (Short)
171
+
172
+ This project formalizes a fundamental principle:
173
+
174
+ > **Compensation cannot close structural gaps.
175
+ > Only identity shifts can.**
176
+
177
+ This emerges naturally from the microstructure mapping between
178
+ Ξ”V β†’ spread,
179
+ C β†’ bounded price improvement,
180
+ and slippage β†’ structural regret.