Xuanyu Cai (蔡炫宇)

Xuanyu Cai (蔡炫宇)

Undergraduate Student

City University of Macau

Research Interests

Econometrics & Causal Inference
Political Economy & Institutions
Environmental & Health Economics
Computational Methods & Software

About

I am a fourth-year undergraduate student in Applied Economics at the Faculty of Finance, City University of Macau, advised by Prof. Wenli Xu.

I am interested in how policies, institutions, and unexpected shocks shape economic and social outcomes. My work sits at the intersection of econometrics, causal inference, and political and environmental economics. I am especially drawn to questions where the answer depends both on the institutional setting and on whether the empirical design can support a credible conclusion.

This interest has led me to work on both applied and methodological projects. In applied research, I study the socioeconomic consequences of climate shocks, public pressure and corporate decarbonization, and the role of institutions in political and household decisions. In methodological work, I develop open-source packages in Stata, R, and Python for difference-in-differences, panel-data methods, and related causal-inference tools. The Software page contains more detail about these projects.

I do not see empirical research and methodological research as separate pursuits. Good methods help us ask sharper questions, while substantive questions show us where existing methods are still incomplete. I am also exploring AI-assisted causal inference and structural modeling as a way to make research workflows more reliable, transparent, and easier for others to use.

I am currently preparing for graduate study and am interested in doctoral programs in econometrics, causal inference, environmental economics, and political economy. I welcome thoughtful feedback, research discussions, and opportunities to collaborate. You can reach me by email.

Selected Publications

View All →

diddesign: Double DID Estimation with Multiple Pre-Treatment Periods in Stata

Xuanyu Cai, Wenli Xu

Under Review at The Stata Journal

A Stata implementation of the double difference-in-differences framework of Egami and Yamauchi (2023) for settings with multiple pre-treatment periods, optimally combining standard and sequential DID moments via GMM, with parallel-trends equivalence testing and multi-core parallel bootstrap inference.

Apathy in the Heatwave: How Climate Shocks Exacerbating Emotional Violence

Xiangxu Chang, Xuanyu Cai, Wenli Xu

Revise & Resubmit at Climate Risk Management

Cross-country evidence that climate shocks (extreme temperatures, droughts, floods, storms) significantly increase intimate partner emotional violence, operating through household isolation, male jealousy, and controlling behavior pathways.

lwdid: A Python Package for Lee–Wooldridge Difference-in-Differences Estimation with Small Samples

Xuanyu Cai, Wenli Xu

SSRN Preprint

A unified Python implementation of the Lee–Wooldridge rolling-transformation approach to DiD, enabling exact small-sample inference for both common timing and staggered adoption designs.

How Does Quality Culture Help Successfully Implement Lean Projects in the Age of Artificial Intelligence? A Moderated Mediation Model

Xuanyu Cai, Kunyu Yang, Yunfan Zhang

China Quality (中国质量)

A moderated mediation model examining how quality culture and AI usage jointly drive lean project success through strategic feedback and learning.

Carrier Status, Cousin Offers, and Observability in Marriage-Market Search

Xuanyu Cai, Mingyu Shu, Fengming Liu

Under Review

How does a positive carrier-screening result change the choice between a confirmed first-cousin offer and unrelated marriage-market search? We depict this choice as a model in which a healthy adult who knows her genotype can surrender a kin offer for a costly search attempt. We derive conditions under which private carrier status raises the reservation cost of leaving the kin option, candidate observability reverses that ordering, and early and late disclosure differ. When candidates infer type from the absence of a signal, disclosure combines rejection with improved beliefs, so its effect on carrier search is ambiguous. We show that the ordering and the monotone disclosure response survive repeated search without recall.

Optimal Block Time with Staking Commitment

Xuanyu Cai, Mingyu Shu, Shun Wang

Under Review

How do protocol rules create commitment in a market where tokens pay no cash flows? We study a Stackelberg game where a staker locks tokens for integer blocks and commits to a deterministic liquidation schedule and a trader reacts to diffusion and jump news under block-dependent execution costs. The trader's unique affine best response makes the staker's schedule the metric projection of a fuel-only benchmark onto a cumulative-sales obstacle, yielding constraint losses and a test of whether the lock-up binds. At a fixed reward rate, every payoff-maximizing block time is strictly interior above a computable threshold. Higher rewards weakly lengthen commitment, while greater belief volatility weakly shortens the optimal block time. Protocol speed and credible commitment are one design problem.

News

2026.8.27

I am a core developer of Co.Metrics, an AI platform for applied econometric research. The platform is currently in closed beta and will launch soon. See the Co.Metrics capability map for an overview of its research tools and workflows.

2026.8.26

Call for papers: The CityUM-FOF Economic and Financial Workshop, hosted by the Faculty of Finance at City University of Macau, welcomes original research papers in economics and finance, in either Chinese or English. Please submit an abstract to [email protected].