CV

Education

City University of Macau, B.A. in Applied Economics, Faculty of Finance, Sep 2023 – Aug 2027 (Expected)

  • GPA: 3.82 / 4.00 | Rank: 8 / 264 (2024–2025)
  • Research Assistant to Prof. Wenli Xu, Faculty of Finance, Sep 2024 – Present
  • Relevant Coursework: Econometrics (A+), Time Series Analysis (A+), Quantitative Methods Analysis (A+), Business Mathematics and Statistics (A+), Introductory Calculus (A–), Introductory Linear Algebra (A)

Research Interests

Causal Inference and Computational Econometrics · Political Economy and Institutional Design · Health and Household Economics

Research Experience

Applied Micro Empirics (2024–2026)

  • Climate political pressure. Designed the empirical strategy (IV construction, continuous DiD) and conducted all Stata estimation; contributed to robustness checks, mechanism analysis, and manuscript writing.
  • Climate shocks and intimate partner violence. Cleaned 17-country DHS surveys, implemented two-way fixed-effects estimation, and conducted heterogeneity analysis by income group; contributed to manuscript writing.
  • Catastrophic health expenditure. Co-designed the study; estimated the full conditional distribution of out-of-pocket spending with quantile regression forests on CHARLS 2011–2018 and compared predicted risk across insurance schemes.

Causal Inference Software Development (2024–Present)

  • Derived rolling-transformation algebra for the Lee–Wooldridge estimator; implemented an exact permutation inference engine and designed the public API in Python and R.
  • Contributed the Lee–Wooldridge estimator to diff-diff (Isaac Gerber), a Python library aggregating most modern DiD estimators; implementation validated against the reference lwdid package.
  • Implemented the double DID framework with K-DID GMM extension and multi-core parallel inference in Stata.
  • Adapted the StatsClaw 8-agent framework from Claude Code to OpenAI Codex, preserving the multi-agent architecture and adversarial verification design.

Applied Theory: Incentives, Information, and Institutions (2026)

  • Built game-theoretic models of institutions under information and observability frictions—promotion-tournament contests, dynamic Stackelberg commitment, search-and-matching with Bayesian updating, and psychological games—deriving their equilibria and comparative statics, and the performance-metric, audit, and disclosure rules that realign incentives.

Working Papers & Publications

† Co-first author and corresponding author.

Working Papers

  • Xuanyu Cai and Wenli Xu. "lwdid: A Python Package for Lee–Wooldridge Difference-in-Differences Estimation with Small Samples." 2025. [SSRN · GitHub]
  • Xuanyu Cai and Wenli Xu. "diddesign: Double DID Estimation with Multiple Pre-Treatment Periods in Stata." Under Review at The Stata Journal, 2026. [SSRN · GitHub]
  • Xuanyu Cai and Mingyu Shu. "Carrier Status, Cousin Offers, and Observability in Marriage-Market Search." Under Review, 2026.
  • Xuanyu Cai, Mingyu Shu, and Shun Wang. "Optimal Block Time with Staking Commitment." Under Review, 2026.
  • Xuanyu Cai, Mingyu Shu, and Mingda Wang. "Constitutional Choice before Residence." Submitted, 2026.
  • Xuanyu Cai and Mingyu Shu. "Political Incentives and Ecological Tipping Points." Work in Progress, 2026.
  • Xuanyu Cai, Mingyu Shu, and Zichen Wang. "Health Insurance in China." Working Paper, 2026.
  • Xuanyu Cai, Mingyu Shu, and Fengming Liu. "Confidence under Audit: When Does Verification Help?" Under Review, 2026.
  • Mingyu Shu, Mingda Wang, and Xuanyu Cai. "Vaccination and the Evolution of Genetic Susceptibility." Working Paper, 2026.
  • Xuanyu Cai and Mingyu Shu. "Transparency, Species Visibility, and the Allocation of Biodiversity Conservation." Under Review, 2026.
  • Xiangxu Chang, Xuanyu Cai, and Wenli Xu. "Apathy in the Heatwave: How Climate Shocks Exacerbating Emotional Violence." Revise & Resubmit at Climate Risk Management, 2025. [SSRN]
  • Wenli Xu, Xuanyu Cai†, and Xiangxu Chang. "How Does Climate Political Pressure Affect Corporate Decarbonization? Evidence from China's 'Message Board for Leaders'." Working Paper, 2025. [SSRN]
  • Xuanyu Cai, Mingyu Shu, and Zichen Wang. "Silent Scandals: Polarization, Attention, and Accountability." Work in Progress, 2026.
  • Xuanyu Cai, Mingyu Shu, and Zichen Wang. "Why Is AI Lazy?" Work in Progress, 2026.
  • Xuanyu Cai, Mingyu Shu, and Fengsheng Xu. "The Missing Men." Work in Progress, 2026.
  • Xuanyu Cai, Lyu Bing, Yanxin Zhang, and Mingyu Shu. "Economic Recessions and Heterogeneous Aging." Work in Progress, 2026.
  • Xuanyu Cai, Mingyu Shu, and Zichen Wang. "Medical Procurement and Surgical Outcomes in China." Work in Progress, 2026.

Publications

  • Xuanyu Cai, Kunyu Yang, and Yunfan Zhang. "How Does Quality Culture Help Successfully Implement Lean Projects in the Age of Artificial Intelligence? A Moderated Mediation Model." China Quality (中国质量), 2025(03). [DOI]

Open-Source Software

Author of 15 open-source econometrics packages spanning difference-in-differences, panel treatment effects, and economic data science. Contributor to diff-diff. Documentation: xuanyucai.com; repositories: github.com/gorgeousfish.

Difference-in-Differences

  • diff-diff (Python) — Contributor. Implemented the Lee–Wooldridge rolling-transformation DiD estimator (9 modules, 222 tests) in Isaac Gerber's library aggregating most modern DiD estimators. [GitHub · PyPI]
  • lwdid (Python / R) — Lee–Wooldridge DiD with small-sample inference. [GitHub · PyPI]
  • diddesign (Python / Stata) — Double DiD via GMM. [GitHub · PyPI · SSC]
  • Further DiD tools: contdid (continuous treatment), hddid (high-dimensional covariates), didhetero (CATT confidence bands), equitrends & pretest (pre-trend testing), semiparddd (triple differences).

Beyond DiD: RD, Synthetic Control & Structural Breaks

Weighting, Balancing & Panel Treatment Effects

  • TROP (triply robust panel estimator, SSC), wfe (weighted fixed effects), CBPS (covariate balancing propensity score via GMM).

AI-Assisted Development

  • StatsClaw for Codex — Multi-agent AI system for automated statistical software development. [GitHub]
  • R Journal Skill — AI skill for writing R Journal econometrics papers. [GitHub]

Conference Presentations

  • "How Does Climate Political Pressure Affect Corporate Decarbonization?" The 9th China Green and Low-Carbon Development Forum, Chinese Academy of Social Sciences, November 2025.
  • 2025 Hong Kong, Macao and Mainland Higher Education Faculty–Student Exchange Program (presented on behalf of City University of Macau), December 2025.

Academic Service & Leadership

  • Referee: International Review of Economics and Finance, 2026.
  • Workshop Co-organizer: CityUM-FOF Economic and Financial Workshop, Faculty of Finance, City University of Macau, 2024 – Present.
  • Community Leader: Founded and managed an econometrics study community with 1,000+ members; facilitated discussions on causal inference methods and recent research.
  • Research Outreach: Author of 绚鱼gorgeous fish, a WeChat public account dedicated to popularizing econometric methods and causal inference research.

Internship Experience

SDIC Securities Co., Ltd. | Shantou, China — Wealth Management Intern, Jun 2025 – Jul 2025

  • Assisted in client asset analysis and quantitative asset allocation strategy construction.

Agricultural Bank of China | Shantou, China — General Business Rotation Intern, Jun 2024 – Aug 2024

  • Rotated across branch operations including compliance, lending, and customer service.

Awards & Honors

  • Macau International Bank Scholarship, 2024–2025
  • Dean's List, City University of Macau, 2024–2025

Skills

  • Programming: Stata · R · Python · LaTeX · Markdown
  • AI Tools: Claude Code · OpenAI Codex · Cursor, etc.
  • Languages: Chinese (Native) · English · Japanese (JLPT N2)