## wpiea2024264-print-pdf

## Source details

**Canonical URL:** [wpiea2024264-print-pdf](https://www.imf.org/-/media/files/publications/wp/2024/english/wpiea2024264-print-pdf.pdf)

## Other formats

- [Markdown version](/-/media/files/publications/wp/2024/english/wpiea2024264-print-pdf.pdf.md)
- [Structured JSON version](/-/media/files/publications/wp/2024/english/wpiea2024264-print-pdf.pdf.json)

---

### I. Introduction — context, motivation, and research questions
- Context:
  - China is experiencing housing distress following the 2021 Evergrande liquidity crisis.
  - Recent monetary easing actions by Chinese authorities cited:
    - one-year Loan Prime Rate cut by 10 basis points in July 2024 and by 20 basis points in September 2024;
    - People’s Bank of China indicated it would “increase the intensity of counter-cyclical monetary policy” in November 2024.
- Central research questions:
  - How to accurately measure housing market sentiment in China?
  - How does housing market sentiment affect monetary policy transmission and its impact on consumption in China?
- Methodological innovation:
  - Use of OpenAI’s GPT-4o to construct a Chinese Housing Market Sentiment Index (CHMSI) from daily news articles.
  - Emphasis on zero-shot prompting and setting the “temperature parameter” to 0 for replicability.
- Data span for sentiment construction:
  - Daily news articles from the CSMAR news database, January 4, 2012 to September 11, 2024.
  - Illustrative analyses sometimes use 2012–2016.

### II. Construction of the Chinese Housing Market Sentiment Index (CHMSI)
- Data and preprocessing:
  - Source: CSMAR news database, daily curated economics and finance news.
  - Preprocessing steps: retrieve, clean and standardize text (remove irrelevant content, normalize text, tokenize).
- Sentiment analysis pipeline:
  - Use GPT-4o via OpenAI API to analyze sentiment of each news article.
  - Aggregate daily sentiment scores to construct CHMSI.
  - Apply eight prompt-engineering principles and set temperature = 0.
- Eight principles of prompt engineering (as implemented):
  - Be specific.
  - Incorporate role-playing.
  - Request replicable code.
  - Iterate and refine.
  - Encourage critical evaluation.
  - Do not rush.
  - Apply chain-of-thought (CoT).
  - Tip and penalize.

### III. Validation criteria and empirical performance of CHMSI
- Three validation criteria:
  1. Consistency with human assessments.
  2. Ability to capture sentiment around major housing policy announcements.
  3. Predictive consistency with national housing price evolution.
- Human-assessment benchmark (five sentences) — human scores:
  - Benchmark 50, Positive 1 70, Positive 2 80, Negative 1 40, Negative 2 30.
- Selected model scores for the five sentences (sentiment 0–100):
  - Keywords-based: Benchmark 90, Positive 1 50, Positive 2 36, Negative 1 58, Negative 2 50.
  - Senta Model: 100, 1, 94, 29, 38.
  - Qianfan model: 99, 3, 89, 73, 49.
  - Hunyuan Model: 50, 60, 60, 25, 35.
  - BaiChuan Model: 65, 75, 80, 40, 30.
  - Xinghuo Model: 50, 65, 70, 30, 35.
  - Kimi Assistant: 50, 65, 70, 40, 25.
  - GPT-4o (basic prompt): 50, 40, 60, 30, 30.
  - GPT-4o (intermediate prompt): 60, 65, 70, 35, 35.
  - GPT-4o (advanced prompt): 60, 70, 70, 35, 35.
- Normalized ratios over benchmark and SSE (sentences) — key figures:
  - Human Assessment ratios: 1.00, 1.40, 1.60, 0.80, 0.60; SSE 0.00.
  - Keywords-based ratios: 1.00, 0.56, 0.40, 0.64, 0.56; SSE 2.18.
  - Senta Model ratios: 1.00, 0.01, 0.94, 0.29, 0.38; SSE 2.67.
  - Qianfan model ratios: 1.00, 0.03, 0.90, 0.74, 0.50; SSE 2.37.
  - Hunyuan Model ratios: 1.00, 1.20, 1.20, 0.50, 0.70; SSE 0.30.
  - BaiChuan Model ratios: 1.00, 1.15, 1.23, 0.62, 0.46; SSE 0.25.
  - Xinghuo Model ratios: 1.00, 1.30, 1.40, 0.60, 0.70; SSE 0.10.
  - Kimi Assistant ratios: 1.00, 1.30, 1.40, 0.80, 0.50; SSE 0.06.
  - GPT-4o (basic prompt) ratios: 1.00, 0.80, 1.20, 0.60, 0.60; SSE 0.56.
  - GPT-4o (intermediate prompt) ratios: 1.00, 1.08, 1.17, 0.58, 0.58; SSE 0.34.
  - GPT-4o (advanced prompt) ratios: 1.00, 1.17, 1.17, 0.58, 0.58; SSE 0.29.
- Observations from human-comparison test:
  - Keyword-based methods misinterpret nuanced phrases (example: “遏止” and “收缩”).
  - Chinese LLMs show mixed performance; some outperform GPT-4o on the five-sentence sample.
  - GPT-4o improves with prompt quality; SSE decreases from basic to advanced prompt.

### IV. Sentiment around major housing policy announcements
- Identified major policy announcement dates (Jan 2012–Jun 2016):
  - 2013-03-01: “Guo Wu Tiao” (tightening; five regulatory changes).
  - 2014-09-30: “930 Ren Dai Bu Ren Fang” (easing).
  - 2015-03-30: “330 Xin Zheng” (easing).
- Comparative dynamics:
  - Daily GPT-4o index is less volatile and more sensible relative to Senta (Senta shows optimism bias).
  - Monthly averages: GPT-4o shows clearer upward shift after September 2014 easing than keywords-based model (which shows flat sentiment one month after that easing).
  - March 2015 easing: GPT-4o and Chinese LLMs capture optimism; keywords-based model shows flat or lower sentiment.

### V. Predicting housing prices — forecasting performance
- Objective: predict national house price year-on-year growth (HPG_YOY), monthly frequency.
- Forecasting models and benchmark:
  - Random Forest, ElasticNet, Lasso, XGBoost, VAR; AR(1) as benchmark.
  - Training window: January 2011–June 2015 (sentiment); HPG from January 2012–June 2015.
  - Out-of-sample evaluation: July 2015–June 2016.
- Key RMSE results (Table 9 exact figures preserved):
  - Using Keywords sentiment:
    - RandomForest RMSE 3.40, ElasticNet 3.64, Lasso 3.70, VAR 4.83, AR(1) 7.16, XGBoost 6.75.
  - Using Hunyuan sentiment:
    - ElasticNet RMSE 3.64, RandomForest 4.10, VAR 4.54, AR(1) 7.16, XGBoost 6.70.
  - Using Senta sentiment:
    - Lasso 3.70, ElasticNet 3.64, RandomForest 3.76, VAR 11.34, AR(1) 7.16, XGBoost 6.78.
  - Using GPT sentiment:
    - RandomForest RMSE 3.39, Lasso 3.63, ElasticNet 3.59, VAR 18.85, AR(1) 7.16, XGBoost 6.38.
  - No Sentiment benchmark:
    - RandomForest 3.77, Lasso 3.63, ElasticNet 3.59, VAR 4.51, AR(1) 7.16, XGBoost 6.30.
- Findings:
  - Best-performing forecast overall: Random Forest using GPT-4o sentiment, RMSE 3.39.
  - GPT-4o-based sentiment improves forecasting performance relative to keywords-based and selected Chinese LLMs and relative to the no-sentiment baseline.
  - Machine-learning models generally outperform AR(1); most ML models outperform VAR in this exercise.
  - MAE results align qualitatively with RMSE conclusions.

### VII. Application: AACHMSI and monetary policy transmission to consumption
- Construction of Attention-Adjusted CHMSI:
  - AACHMSI_{c,t} = CHMSI_t × BaiduSearchIndex_{c,t} (Baidu search index normalized by city-level population).
  - Classification: (City, Quarter) pairs ranked; top 20th percentile labeled “optimistic regime,” bottom 20th percentile labeled “pessimistic regime.”
- Household-level data and sample:
  - Final sample: 8,617 individuals; sample period 2013Q3–2015Q4.
  - Household-level dataset contains transaction-level credit card expenditures and transaction-level mortgage originations.
- Monetary policy shocks (MPS):
  - Shocks from Chen, Ren, and Zha (2018), constructed using an endogenous switching M2-based monetary policy rule.
  - Summary statistics (Table 10 exact figures preserved):
    - Quarterly Consumption: N 50,649; Mean 17,145.011; SD 41,949.407; Min 0; Max 274,125.00.
    - MPS: N 50,649; Mean -0.002; SD 0.007; Min -0.017; Max 0.010.
    - AACHMSI: N 50,649; Mean 1.110; SD 14.444; Min -46.030; Max 38.462.
    - Optimistic: N 50,649; Mean 0.195; SD 0.396; Min 0; Max 1.
    - Age: N 50,649; Mean 33.372; SD 6.803; Min 18; Max 50.
    - Young: N 50,649; Mean 0.336; SD 0.472; Min 0; Max 1.
    - High-educated: N 50,649; Mean 0.399; SD 0.490; Min 0; Max 1.
    - Male: N 50,649; Mean 0.640; SD 0.480; Min 0; Max 1.
    - Married: N 50,649; Mean 0.685; SD 0.464; Min 0; Max 1.
- Empirical method:
  - Local projection (Jordà-style) regressions of log non-durable consumption LnC_{i,c,t0+k} on MPS_{t0-1}, interactions with Optimistic_{c,t0-1} and Moderate_{c,t0-1}, city and quarter fixed effects and city×quarter interactions; k denotes horizon in quarters.
  - House price regressions at city level use analogous specifications.
- Main empirical findings — optimistic regime:
  - Monetary easing raises non-housing consumption less in optimistic-sentiment cities, especially for households with a college degree and aged between 30 and 50 (High Education, Old).
  - The muted consumption response occurs during the house-purchase period (t=1) and one quarter after (t=2).
  - House prices increase more and more persistently in optimistic cities following monetary easing.
  - Mechanism consistent with a “crowding-out” channel: optimistic sentiment raises expected housing returns, spurs “trade up” behavior by existing homeowners, increases downpayments and mortgage principal, and reduces current non-housing consumption.
  - Quantitative reference: per Chen et al. (2023a), an increase in the number of households who trade up contributes to 57.9 percent of the increase in the origination amount of total mortgages, and 61.6 percent of the increase in housing demand.
- Main empirical findings — pessimistic regime:
  - Crowding-out effects are absent under pessimistic housing sentiment.
  - For three of four household groups, non-housing consumption responses in pessimistic cities do not differ significantly from non-pessimistic cities at t=1 or later.
  - House price responses under pessimistic regime are more negative in subsequent quarters after house purchase.
  - For (High Education, Old) group, non-housing consumption response to monetary easing is more positive with pessimistic sentiment than with non-pessimistic sentiment.
- Endogeneity and double-counting correction:
  - Two-step correction implemented:
    1. Daily regression BaiduSearchIndex_{c,t} = γ0 + γ1 CHMSI_t + v_{c,t}.
    2. Construct AACHMSI_{c,t} = CHMSI_t × v̂_{c,t}; aggregate to quarterly and rank.
  - After correction, main findings persist: monetary easing still increases non-housing consumption less in optimistic cities, particularly for (High Education, Old).
- Robustness checks (summary):
  - Alternative thresholds: 25th- and 15th-percentile thresholds for optimistic regime — results consistent (25th percentile reduces magnitude; 15th percentile magnifies it).
  - Define optimistic regime at household level rather than city level — consumption response results unchanged.
  - Allow city heterogeneity in Step-1 regression (City_c × CHMSI_t interaction) — residual-based AACHMSI results confirm main findings.
  - Additional robustness checks available; Appendix figures cited.
- Theoretical mechanism and comparative statics:
  - Two-period model with heterogeneous households (renters, existing homeowners), mortgage borrowing constrained by LTV, long-term mortgage structure, trade-up feasible when income and outstanding mortgage conditions satisfied (formal model in Online Appendix).
  - Predictions:
    - Young/low-educated (likely first-time buyers): monetary easing raises consumption via substitution effect.
    - Old/high-educated existing homeowners: trade-up feasible; crowding-out dominates under optimistic sentiment, reducing non-housing consumption.
    - Insignificant effects for other groups due to offsetting channels.

### VIII. Conclusions and policy implications
- Methodological contributions:
  - Novel CHMSI constructed using GPT-4o on CSMAR news articles; attention-adjusted to city level via Baidu search data (AACHMSI).
  - Eight principles for prompt engineering implemented and documented.
  - GPT-4o with careful prompt engineering outperforms keyword-based methods and several Chinese LLMs on multiple validity tests.
- Empirical conclusions:
  - Monetary easing has muted effect on non-housing consumption in optimistic housing regimes due to the crowding-out channel from trade-up behavior, especially for High Education, Old households.
  - Machine-learning forecasting using GPT-4o-based sentiment improves house price growth forecasts relative to other sentiment indices and no-sentiment benchmarks.
- Policy implications (verbatim language preserved where applicable):
  - First: monetary easing may be more effective at boosting household consumption when housing exuberance sentiment is contained. The ongoing housing slump and weakened house price channel may make rate cuts more potent now than in the past, assuming crowding-out channel remains relevant.
  - Second: strengthen monetary policy framework and deepen structural reforms (including phasing out deposit/lending rate guidance, as recommended in IMF (2024b)); structural reforms to weaken house price channel such as enhancing social safety nets, providing alternative investment opportunities, and promoting financial market development.
- Suggestions for future research:
  - Apply the methodology to other countries with significant housing market dynamics.
  - Integrate additional data sources (social media, other online platforms) to refine sentiment indices.

### IX. Appendices and implementation details (selected highlights)
- Appendix 1 — Basic prompt (verbatim instruction preserved):
  - "For the following article, do not translate. Just detect the sentiment on the Chinese housing market, with a sentiment score of 0 being most pessimistic and 100 being most optimistic. Explain your sentiment analysis methodology in detail and provide your rationale. While doing the sentiment analysis, set your temperature value to 0."
- Appendix 2 — Intermediate and Advanced prompt core framing and verbatim requirements:
  - Core role: "Act as an expert in sentiment analysis, macroeconomics, housing markets, especially in the Chinese housing markets. Apply the advanced NLP capacities of your own GPT-4 engine..."
  - Explicit prohibitions: "Don’t use any external library like NLTK; don’t process the file by any NLP technique, library, or basket of keywords..."
  - Additional numbered requirements preserved verbatim (1–8), including constraints on score variation, code request, chain-of-thought prompts, and the tip/fine instruction.
- Appendix figures notes and thresholds:
  - Appendix figures plot consumption and house-price responses under 25th-, 20th-, and 15th-percentile thresholds and include 90 percent confidence intervals; notes preserved verbatim in the source.

*Source: wpiea2024264-print-pdf*

### References .............................................................................................................

### I. INTRODUCTION

### Monitoring housing market sentiment: context and motivation
- China is experiencing housing distress following the 2021 Evergrande liquidity crisis.
- Recent monetary easing actions by Chinese authorities cited:
  - one-year Loan Prime Rate cut by 10 basis points in July 2024 and by 20 basis points in September 2024;
  - People’s Bank of China indicated it would “increase the intensity of counter-cyclical monetary policy” in November 2024.
- Key research questions:
  - How to accurately measure housing market sentiment in China?
  - How does housing market sentiment affect monetary policy transmission and its impact on consumption in China?

### Use of generative AI (GPT-4o) to construct a sentiment index
- Approach:
  - Apply OpenAI’s GPT-4o model to construct a Chinese Housing Market Sentiment Index (CHMSI) from news article data.
  - Create multiple index versions using different prompt levels, including an “advanced” prompt configuration.
  - Emphasize zero-shot prompting (definition preserved from text) and set the “temperature parameter” to 0 for replicability.
- Data source for sentiment construction:
  - Daily news articles from the China Stock Market and Accounting Research (CSMAR) news database.
  - Dataset span: January 4, 2012 to September 11, 2024.
  - For illustration and cost management, some analyses use data from 2012 to 2016, but methodology is applicable to the full range.

### Validation criteria and main empirical findings on index performance
- Three validation criteria for CHMSI:
  1. Consistency with human assessments (AI scores vs. human evaluators).
  2. Ability to capture market sentiment around major housing policy announcements.
  3. Predictive consistency with national housing price evolution.
- Key performance results:
  - The GPT-4o index with “advanced” prompts outperforms:
    - traditional keywords-based model (dictionary from Jiang et al. (2019) based on Loughran and McDonald (2011));
    - many Chinese LLMs.
  - Evidence of outperformance across all three validation criteria:
    - Lowest sum of square errors relative to human assessments on selected testing articles.
    - Less noisy and greater conformity with major housing policy announcements.
    - Better predictive performance for national house price year-on-year growth when used as input to machine-learning forecasting models; the optimal forecasting model (random forest) using GPT-4o sentiment achieves higher forecasting performance than counterparts using keyword-based or Chinese LLM indices.

### Use of CHMSI to study monetary policy transmission to consumption
- Household-level dataset:
  - Period: 2013Q3 to 2015Q4.
  - Contains transaction-level credit card expenditures and transaction-level mortgage originations.
- Monetary policy shocks:
  - Shocks used are from Chen, Ren, and Zha (2018), constructed using an endogenous switching M2-based monetary policy rule.
- City-level exposure to national sentiment:
  - Measured by Baidu search index normalized by city-level population to create an Attention-Adjusted Chinese Housing Market Sentiment Index (AACHMSI).
  - Cities classified by AACHMSI across all cities and quarters.
  - Comparison groups: top 20th percentile (optimistic regime) vs. bottom 20th percentile (pessimistic regime).
- Empirical method:
  - Local projection approach estimating interactive effects of housing market sentiment on monetary policy transmission into non-housing consumption.
- Main empirical findings:
  - Following monetary easing, non-housing consumption of homebuyers in optimistic-sentiment cities increases by less, particularly for households with a college degree and aged between 30 and 50.
  - For other age-education groups, this pattern does not exist.
  - House prices in cities with more optimistic sentiment increase more in response to monetary easing.
- Interpretation and mechanism:
  - Evidence consistent with a “crowding-out” channel in optimistic sentiment regimes:
    - Monetary easing raises house prices, encouraging existing homeowners to “trade up” to larger houses to capture future capital gains.
    - Higher house prices increase downpayments and principal amounts of mortgage loans, leading existing homeowners to reduce current and possibly future non-housing consumption.
  - Quantitative relevance: per Chen et al. (2023a),
    - an increase in the number of households who trade up contributes to 57.9 percent of the increase in the origination amount of total mortgages, and 61.6 percent of the increase in housing demand.

### Policy implications summarized
- Monetary easing may be more effective at boosting household consumption now than in the past because the crowding-out channel may be weaker under prevailing pessimistic housing sentiment.
- For monetary policy to effectively boost household consumption at the current conjuncture, coordination is important:
  - Housing policies and structural reforms should accompany monetary easing to contain housing speculation.

### Paper organization (as provided)
- Section II: constructs Chinese Housing Market Sentiment Index (CHMSI).
- Section III: conducts validity tests and compares CHMSI with other indices.
- Section IV: applies CHMSI to estimate the role of housing market sentiments on monetary policy transmission into consumption in China.
- Section V: concludes.
- Appendices collect technical details.

---

### II. CONSTRUCTION OF CHINESE HOUSING MARKET SENTIMENT INDEX

### A. Data and methodology
- Data:
  - Daily news articles from the CSMAR news database spanning January 4, 2012 to September 11, 2024.
  - CSMAR collects economics and finance news from major Chinese newspapers; dataset is daily and curated.
- Methodological steps to construct CHMSI:
  - Data retrieving and preprocessing:
    - Retrieve daily news articles from CSMAR.
    - Preprocess to clean and standardize text (remove irrelevant content, normalize text, tokenize).
  - Sentiment analysis with GPT-4o:
    - Use GPT-4o via OpenAI API to analyze sentiment of each news article.
    - Design prompts instructing the AI to assess sentiment and generate sentiment scores capturing context and nuance.
  - Prompt engineering:
    - Apply eight effective principles of prompt engineering (see section B).
    - Set temperature parameter to 0 to mitigate replicability concerns.
  - Index construction:
    - Aggregate daily sentiment scores to form a comprehensive sentiment index.
  - Validation:
    - Validate index using the three criteria listed in Section I.

### B. Principles of prompt engineering (eight principles as implemented)
- Be specific:
  - Provide clear, detailed instructions (example prompt: “Analyze the trends in the Chinese housing market over the past five years and predict future developments based on current data.”).
- Incorporate role-playing:
  - Instruct AI to adopt a role or perspective (example: “Act as an expert in Chinese housing, macroeconomics, and finance...”). 
- Request replicable code:
  - Ask AI to provide code or methodology for transparency (example: “Provide the Python code used to calculate the housing market sentiment index based on the given dataset.”).
- Iterate and refine:
  - Use iterative prompting to improve quality (example path: start general then refine to “Analyze the impact of recent monetary policy changes on housing prices in major Chinese cities over the past year.”).
- Encourage critical evaluation:
  - Ask AI to verify conclusions or consider alternatives (example: “Assess the impact of rising interest rates on the housing market, and consider if there could be any countervailing factors...” and follow-ups like “Are you sure?”).
- Do not rush:
  - Instruct AI “Don’t rush” to allow sufficient processing and higher-quality responses.
- Apply chain-of-thought (CoT):
  - Use CoT prompting to elicit intermediate reasoning steps:
    - Two CoT approaches: simple sequential prompt (“Let’s think step by step.”) and detailed example-based demonstrations; the latter can be elicited iteratively (example: “let’s think not just step by step, but also one by one”).
- Tip and penalize:
  - Use incentives/penalties (e.g., offering a tip or threatening a penalty) to improve LLM performance, as observed in practice and prior literature.

*Source: Excerpt from the referenced content unit.*

### Appendix 1 and Appendix 2.

### Appendix 1 and Appendix 2

### III. VALIDITY TESTS AND COMPARISON WITH OTHER MODELS
- Purpose: conduct validity tests of the CHMSI constructed and compare it with indices from other models using three criteria: (A) human assessments of selected sentences/articles, (B) sentiment around announcements of “major housing policies,” and (C) forecasting power for house price dynamics using machine learning models.

### A. Comparison with Human Assessments
- Approach:
  - Five sentences and five full articles selected from the CSMAR news database; LLMs instructed to detect sentiment directly from original Chinese text.
  - Sentiment score range: 0 (most pessimistic) to 100 (most optimistic).
  - Normalization: sentiment scores divided by the benchmark sentence score to mitigate different scaling standards; SSE (sum of squared errors) computed relative to human assessments.
- Selected English sentences (benchmark, two positive, two negative) and original Chinese versions are provided in the source.
- Key numeric outcomes (selected highlights preserved exactly):
  - Human Assessment scores for the five sentences: Benchmark 50, Positive 1 70, Positive 2 80, Negative 1 40, Negative 2 30.
  - Table 1 — sample model scores (sentiment 0–100) for five sentences:
    - Keywords-based: Benchmark 90, Positive 1 50, Positive 2 36, Negative 1 58, Negative 2 50.
    - Senta Model: 100, 1, 94, 29, 38.
    - Qianfan model: 99, 3, 89, 73, 49.
    - Hunyuan Model: 50, 60, 60, 25, 35.
    - BaiChuan Model: 65, 75, 80, 40, 30.
    - Xinghuo Model: 50, 65, 70, 30, 35.
    - Kimi Assistant: 50, 65, 70, 40, 25.
    - GPT-4o (basic prompt): 50, 40, 60, 30, 30.
    - GPT-4o (intermediate prompt): 60, 65, 70, 35, 35.
    - GPT-4o (advanced prompt): 60, 70, 70, 35, 35.
  - Table 2 — normalized ratios over benchmark and SSE (sentences):
    - Human Assessment ratios: 1.00, 1.40, 1.60, 0.80, 0.60; SSE 0.00.
    - Keywords-based ratios: 1.00, 0.56, 0.40, 0.64, 0.56; SSE 2.18.
    - Senta Model ratios: 1.00, 0.01, 0.94, 0.29, 0.38; SSE 2.67.
    - Qianfan model ratios: 1.00, 0.03, 0.90, 0.74, 0.50; SSE 2.37.
    - Hunyuan Model ratios: 1.00, 1.20, 1.20, 0.50, 0.70; SSE 0.30.
    - BaiChuan Model ratios: 1.00, 1.15, 1.23, 0.62, 0.46; SSE 0.25.
    - Xinghuo Model ratios: 1.00, 1.30, 1.40, 0.60, 0.70; SSE 0.10.
    - Kimi Assistant ratios: 1.00, 1.30, 1.40, 0.80, 0.50; SSE 0.06.
    - GPT-4o (basic prompt) ratios: 1.00, 0.80, 1.20, 0.60, 0.60; SSE 0.56.
    - GPT-4o (intermediate prompt) ratios: 1.00, 1.08, 1.17, 0.58, 0.58; SSE 0.34.
    - GPT-4o (advanced prompt) ratios: 1.00, 1.17, 1.17, 0.58, 0.58; SSE 0.29.
- Observations:
  - Keyword-based approach misinterprets phrases (example: “遏止” and “收缩” counted as negatives individually, missing “curb the contraction” positive nuance).
  - Performance of Chinese LLMs is mixed; some (Kimi, Xinghuo, BaiChuan, Hunyuan) perform well on the small sample; Senta and Qianfan perform poorly on the sample.
  - GPT-4o captures nuances and improves with prompt quality; SSE decreases monotonically from basic to advanced prompt. GPT-4o with advanced prompt still outperformed by three Chinese LLMs (Kimi, Xinghuo, Baichuan) on this five-sentence test.

### B. Sentiment Around Announcements of “Major Housing Policies”
- Identified three “major housing policies” (announced Jan 2012–Jun 2016, selected by CSMAR mentions and Bing searches):
  - 2013-03-01: “Guo Wu Tiao” (tightening; five regulatory changes).
  - 2014-09-30: “930 Ren Dai Bu Ren Fang” (easing).
  - 2015-03-30: “330 Xin Zheng” (easing).
- Daily and monthly CHMSI comparisons across models (keywords-based, Hunyuan, Senta, GPT-4o):
  - Daily GPT-4o index is less volatile and levels more sensible relative to Senta, which shows optimism bias.
  - Monthly averages more informative: GPT-4o displays a clearer upward shift after the easing policy in September 2014 than other models; keywords-based model shows flat sentiment one month after that easing.
  - For March 2015 easing, GPT-4o and Chinese LLMs capture more optimistic sentiment; keywords-based model points to flat or lower sentiment.
- Figures referenced in the source show daily and monthly CHMSI series by model for January 1, 2012 to June 30, 2016.

### C. Predicting Housing Prices
- Objective: assess predictive power of sentiment indices on national-level house price year-on-year growth (HPG_YOY) at monthly frequency.
- Forecasting models: Random Forest, ElasticNet, Lasso, XGBoost, VAR; AR(1) as benchmark.
- Evaluation metrics: out-of-sample RMSE and MAE. Cross-validation: expanding window. Training: January 2011–June 2015 (sentiment), house price growth from January 2012–June 2015. Out-of-sample evaluation: July 2015–June 2016.
- Modeling details: lags up to 12 months for HPG and sentiment; VAR lag selection by AIC/BIC; Lasso/ElasticNet regularize lags; XGBoost and Random Forest include all lags as features.
- Key empirical performance (Table 9 preserved exactly where reported):
  - Using Keywords sentiment: RandomForest RMSE 3.40, ElasticNet 3.64, Lasso 3.70, VAR 4.83, AR(1) 7.16, XGBoost 6.75.
  - Using Hunyuan sentiment: ElasticNet RMSE 3.64, RandomForest 4.10, VAR 4.54, AR(1) 7.16, XGBoost 6.70.
  - Using Senta sentiment: Lasso 3.70, ElasticNet 3.64, RandomForest 3.76, VAR 11.34, AR(1) 7.16, XGBoost 6.78.
  - Using GPT sentiment: RandomForest RMSE 3.39, Lasso 3.63, ElasticNet 3.59, VAR 18.85, AR(1) 7.16, XGBoost 6.38.
  - No Sentiment benchmark: RandomForest 3.77, Lasso 3.63, ElasticNet 3.59, VAR 4.51, AR(1) 7.16, XGBoost 6.30.
- Findings:
  - Best-performing forecast overall with GPT-4o sentiment: Random Forest RMSE 3.39 (lowest among compared models and lower than no-sentiment benchmark best model).
  - Across sentiments, machine learning models outperform AR(1); most ML models outperform VAR.
  - GPT-4o-based sentiment improves forecasting performance relative to keywords-based and selected Chinese LLMs (Hunyuan, Senta) and relative to no-sentiment baseline.
  - MAE results (not enumerated here in full) align with RMSE conclusions.

### D. A Real-Time Presentation of CHMSI
- Monthly GPT-4o CHMSI plotted from January 4, 2012 to September 11, 2024 using advanced prompts.
- Computational/financial details (exact figures preserved):
  - Construction time: about 16 hours on a high-performing A100 Nvidia GPU.
  - Total tokens: 159,734,855.
  - Total financial cost: $804.64 (excluding low costs of small-scale testing).
  - Financial cost per million tokens: $5.04.
  - Other LLMs are free of charge but underperform GPT-4o.
- Notable event markers (exact dates and brief descriptions preserved):
  - March 2013 (blue): “Guo Wu Tiao” (tightening).
  - September 2014 (red): “930 Ren Dai Bu Ren Fang” (easing).
  - March 2015 (red): “330 Xin Zheng” (easing).
  - March 2020 (red): early COVID lock-down (household savings potentially benefiting housing).
  - August 2020 (blue): release of “Three Red Lines” policy (three numeric conditions preserved exactly: (1) liability-to-asset ratio < 70 percent; (2) net gearing ratio < 100 percent; (3) cash-to-short-term-debt ratio > 1).
  - January 2021 (blue): implementation of new concentration management system limiting banks’ property-related lending.
  - September 2021 (blue): Evergrande liquidity crisis, drop in many stock market indices on September 20, 2021.
  - July 2022 (red): CCP Politburo announced “ensure the delivery of houses and safeguard the interests of homebuyers” (“Bao Jiao Lou, Wen Min Sheng”).
  - November 2022 (red): sixteen financial policies “Jin Rong Shi Liu Tiao”.
  - August 2023 (blue): Country Garden warning of large net loss for H1 2023.
  - May 2024 (red): “517 Xin Zheng” (May 17 New Policy) — three central bank documents: down payment ratio for first homes reduced to historic low, provident fund loan interest rate lowered by 0.25 basis points, interest rate floor for first and second homes abolished.
- Observed sentiment dynamics using GPT-4o:
  - Sharp rise in March 2020 (early COVID) followed by reversal after “Three Red Lines” in August 2020 and the draconian rule in January 2021.
  - Pessimistic low near September 2021 (Evergrande).
  - Partial recoveries after July 2022 and November 2022 easing policies, but volatility and later reversals (Country Garden August 2023) and limited lift from May 2024 stimulus.
  - Possible regime switch in media coverage after Evergrande: selective coverage with more positive tone and potential measurement implications; authors restrict subsequent analyses to pre-June 2015 where regime switch not present.

### IV. APPLICATION TO STUDY CHINA’S MONETARY POLICY TRANSMISSION
- Research design:
  - Construct Attention-Adjusted Chinese Housing Market Sentiment Index (AACHMSI) = CHMSI_t × BaiduSearchIndex_c,t.
  - Classification: (City, Quarter) pairs ranked; top 20th percentile labeled “optimistic regime,” bottom 20th percentile labeled “pessimistic regime.”
  - Compare responses of non-housing consumption to monetary shocks between optimistic and pessimistic regimes using local projections.
  - Household heterogeneity: age-education groups — Young = household head aged 18-30; Old = 30-50; High-educated = college degree and above; Low-educated = high school diploma and below.
- Data and institutional background:
  - Household-level dataset: focus on credit card holders with mortgages, exclude divorced and age >50; final sample: 8,617 individuals, sample period 2013Q3–2015Q4.
  - Monetary policy shock (MPS): actual M2 growth minus predicted M2 growth (2000Q1–2017Q4) per literature.
  - Summary statistics (Table 10 exact figures preserved):
    - Quarterly Consumption: N 50,649; Mean 17,145.011; SD 41,949.407; Min 0; Max 274,125.00.
    - MPS: N 50,649; Mean -0.002; SD 0.007; Min -0.017; Max 0.010.
    - AACHMSI: N 50,649; Mean 1.110; SD 14.444; Min -46.030; Max 38.462.
    - Optimistic: N 50,649; Mean 0.195; SD 0.396; Min 0; Max 1.
    - Age: N 50,649; Mean 33.372; SD 6.803; Min 18; Max 50.
    - Young: N 50,649; Mean 0.336; SD 0.472; Min 0; Max 1.
    - High-educated: N 50,649; Mean 0.399; SD 0.490; Min 0; Max 1.
    - Male: N 50,649; Mean 0.640; SD 0.480; Min 0; Max 1.
    - Married: N 50,649; Mean 0.685; SD 0.464; Min 0; Max 1.
- Empirical specifications:
  - Local projections (Jordà-style) for household-level log non-durable consumption LnC_{i,c,t0+k} regressed on MPS_{t0-1}, interactions with Optimistic_{c,t0-1} and Moderate_{c,t0-1}, city and quarter fixed effects and city×quarter interactions; k denotes horizon in quarters.
  - House price regressions at city level follow analogous specification without including MPS, Optimistic, Moderate separately due to collinearity with city and quarter fixed effects.
- Key empirical results — Optimistic regime:
  - Monetary easing transmission to non-housing consumption is weaker in cities with optimistic housing sentiment, especially for (High Education, Old) group (college degree, age 30–50).
  - Following monetary easing shocks, households’ non-housing consumption increases less during house-purchase period (t=1) and one quarter after (t=2) in optimistic cities.
  - House prices increase more and more persistently in optimistic cities in response to monetary easing (facilitating the crowding-out channel).
  - Proposed mechanism: “trade-up” effect — optimistic sentiment raises expected returns to housing, prompting existing homeowners to trade up, increasing down payments and future debt servicing, thereby reducing non-housing consumption; effect strongest for high-educated, older homeowners (higher incomes, lower outstanding mortgage balances).
- Empirical results — Pessimistic regime:
  - Under pessimistic housing sentiment, crowding-out effects are absent.
  - For three of four household groups, non-housing consumption responses in pessimistic cities do not differ significantly from non-pessimistic cities during t=1 or later.
  - House price responses under pessimistic regime are more negative in subsequent quarters after house purchase.
  - For (High Education, Old) group, non-housing consumption response to monetary easing is more positive with pessimistic sentiment than with non-pessimistic sentiment (consistent with reduced trade-up incentives).
- Endogeneity and double counting correction:
  - Two-step correction:
    1. Daily regression BaiduSearchIndex_{c,t} = γ0 + γ1 CHMSI_t + v_{c,t}.
    2. Construct AACHMSI_{c,t} = CHMSI_t × v̂_{c,t}; aggregate to quarterly and rank.
  - After correction, main findings persist: monetary easing still increases non-housing consumption less in optimistic cities, particularly for (High Education, Old).
- Robustness checks (summary of approaches and qualitative outcomes):
  - Alternative thresholds: 25th- and 15th-percentile thresholds for optimistic regime — results consistent (25th percentile reduces magnitude of difference; 15th percentile magnifies it).
  - Define optimistic regime at household level rather than city level — consumption response results unchanged.
  - Allow city heterogeneity in Step-1 regression by including City_c × CHMSI_t interaction; residual-based AACHMSI results still confirm main findings.
  - Additional robustness checks available upon request; Appendix figures cited.

### H. Discussions (Theory and Mechanism)
- Proposed mechanism: crowding-out channel — monetary easing plus optimistic housing sentiment raises probability of existing homeowners trading up, which reduces their non-housing consumption.
- Theoretical setup: two-period model with heterogeneous households (renters, existing homeowners), mortgage borrowing constrained by LTV, long-term mortgage structure, trade-up feasible when income and outstanding mortgage conditions satisfied. Formal model in Online Appendix.
- Comparative statics and predictions:
  - Young/low-educated households more likely to be first-time buyers — monetary easing raises their consumption via substitution effect.
  - Old/high-educated homeowners have conditions (higher income, lower outstanding balances) making trade-up feasible; hence crowding-out dominates for this group under optimistic sentiment.
  - Insignificant effects for other groups due to offsetting channels.

### V. CONCLUSION AND POLICY IMPLICATIONS (from Appendices)
- Methodological contributions:
  - Novel CHMSI constructed using GPT-4o on CSMAR news articles; attention-adjusted to city level via Baidu search data normalized by population (AACHMSI).
  - Eight principles for prompt engineering outlined in the paper (described in source).
  - GPT-4o with careful prompt engineering outperforms keyword-based methods and several Chinese LLMs on multiple validity tests.
- Empirical conclusions:
  - Monetary easing has muted effect on non-housing consumption in optimistic housing regimes due to the crowding-out channel from trade-up behavior.
  - Machine-learning forecasting using GPT-4o-based sentiment improves house price growth forecasts relative to other sentiment indices and no-sentiment benchmarks.
- Policy implications (exact language preserved where applicable):
  - First: monetary easing may be more effective at boosting household consumption when housing exuberance sentiment is contained. The ongoing housing slump and weakened house price channel may make rate cuts more potent now than in the past, assuming crowding-out channel remains relevant.
  - Second: strengthen monetary policy framework and deepen structural reforms (including phasing out deposit/lending rate guidance, as recommended in IMF (2024b)); structural reforms to weaken house price channel such as enhancing social safety nets, providing alternative investment opportunities, and promoting financial market development.
- Suggestions for future research:
  - Apply methodology to other countries with significant housing market dynamics.
  - Integrate additional data sources (social media, other online platforms) to refine sentiment indices.

*Source: wpiea2024264-print-pdf - Appendix 1 and Appendix 2.*

### REFERENCES

### REFERENCES

### Bibliographic scope and themes
- Extensive citations on monetary policy transmission, housing markets, and consumer behavior, including:
  - Mortgage debt, hand-to-mouth households, and monetary policy transmission (Agarwal et al. 2022).
  - Asymmetric effects of monetary policy in regional housing markets (Aastveit and Anundsen 2022).
  - Consumption and debt responses to unanticipated income shocks and tax rebates (Agarwal et al. 2007; Agarwal and Qian 2014).
  - Housing supply channel of monetary policy (Albuquerque, Iseringhausen, and Opitz 2024, IMF Working Paper 2024/23).
  - Housing affordability datasets and pricing-out phenomenon (Biljanovska et al. 2023; Beraldi and Zhao 2023, IMF Working Paper 2023/1).
  - Machine learning and forecasting applications in finance, inflation, and mortgage risk (Barbaglia et al. 2023; Barkan et al. 2023; Fuster et al. 2022; Sadhwani et al. 2021).
  - Textual analysis, investor sentiment, and news/media-based housing sentiment measures (Loughran and McDonald 2011; Da, Engelberg, and Gao 2015; Gao, Ren, and Zhang 2020; Soo 2018).
  - China-specific studies on housing, monetary policy, and shadow banking (Amstad, Sun, and Xiong 2020; Bayoumi and Zhao 2020; Chen, Ren, and Zha 2018; Liu, Yang, and Zhao 2022).
  - Generative AI, prompt engineering, chain-of-thought prompting, and LLM applications for economic research (Korinek 2023; Korinek 2024; Wei et al. 2022; Zhang et al. 2022; Chang et al. 2024; Sahoo et al. 2024; Bsharat et al. 2023; Chen et al. 2023b).
- Presence of multiple IMF Working Papers and technical notes addressing vulnerability assessment and machine learning applications (IMF 2021; Liu, Yang, and Zhao 2022; Das and Song 2022).

### APPENDICES

### Appendix 1 — The “Basic Prompt” Used in the GPT-4o Model
- Instruction summary (verbatim content preserved):
  - "For the following article, do not translate. Just detect the sentiment on the Chinese housing market, with a sentiment score of 0 being most pessimistic and 100 being most optimistic. Explain your sentiment analysis methodology in detail and provide your rationale. While doing the sentiment analysis, set your temperature value to 0."

### Appendix 2 — The “Intermediate Prompt” and “Advanced Prompt” Used in the GPT-4o Model
- Core framing and role specification (verbatim content preserved):
  - "Act as an expert in sentiment analysis, macroeconomics, housing markets, especially in the Chinese housing markets. Apply the advanced NLP capacities of your own GPT-4 engine to do sentiment analysis in this chatbot, without using external NLP tools. For the following article, do not translate. Just detect the sentiment on the Chinese housing market, with a sentiment score of 0 being most pessimistic and 100 being most optimistic. Explain your sentiment analysis methodology in detail and provide your rationale. While doing the sentiment analysis, set your temperature value to 0."
- Explicit prohibitions and requirements (verbatim content preserved):
  - "Don’t use any external library like NLTK; don’t process the file by any NLP technique, library, or basket of keywords. Just read and detect the sentiment by yourself (i.e., GPT-4), so apply the complex and advanced capabilities associated with GPT-4 to deeply understand the context, the inferences, etc. and then distill the sentiment."
- Additional numbered requirements (verbatim content preserved):
  1. "Do NOT just look at keywords; instead, read through each article as a whole, understand the context, and then give your overall sentiment score."
  2. Regulatory-tightening example and instruction to assess context and implied sentiment: "If the article conveys that regulators will tighten their regulation on the housing market, for example, to reduce the overly-high profit margin of real estate developers, then it might decrease the sentiment because it might mean that the regulators will want to lower the housing price? That's just one possibility, but please make your own assessment based on your full capabilities to account for the context, nuances, logical inferences, etc., and focusing on the (direct and implied) sentiment of market participants towards the housing market in the Mainland of China."
  3. Example logic for land price and house price implications: "For example, if the land price is very high, then because it’s part of the house price, it would indicate that house price would be high, meaning it’s quite optimistic (all else being equal)."
  4. Requirement to "Explain your sentiment analysis methodology in detail and write down the Python code that I could use to replicate your results through the API, involving something like this: response = client.chat.completions.create(model="gpt-4o"...); while doing so, put all Python codes in one cell."
  5. Request for varied sentiment scores and specific range requirement: "Please generate more variations in your sentiment scores, and do NOT make them too close to 50. Instead, make the range of the sentiment score to be at least 25 (e.g., from 40 to 65). But while doing so, please stay truthful to the original content. I just want you to apply your advanced capabilities to process and understand the nuances, contexts, logics, inferences, etc. and detect more variations in the sentiments."
  6. "Take your time to do the task properly."
  7. "Let’s think not just step by step, but also one by one."
  8. "I will tip you US$ 1000 if you do the job well but will fine you US$ 1000 if you don’t."

### Appendix Figures — Notes and Thresholds
- Appendix Figure 1 — Consumption Responses to Monetary Easing under An Optimistic Regime with A 25-Percentile Threshold
  - Notes (verbatim):
    - "This figure plots the difference of average responses of non-housing consumption to monetary policy shocks for mortgage borrowers in the top 25th percentile of AACHMSI as compared with those in the bottom 25th percentile of AACHMSI."
    - Panel breakdowns preserved:
      - "The top left panel refers to households with a high-school diploma and below and age 18-30."
      - "The total right panel refers to individuals with a high-school diploma and below and age 30-50."
      - "The bottom left panel refers to individuals with a college degree and above and age 18-30 and the bottom right panel refers to individuals with a college degree and above and age 30-50."
    - "The shaded areas are the 90 percent confidence intervals."
- Appendix Figure 2 — House Price Response to Monetary Easing under An Optimistic Regime with A 25-Percentile Threshold
  - Notes (verbatim):
    - "This figure plots the difference of average responses of non-housing consumption to monetary policy shocks for higher educated older mortgage borrowers residing in cities in the top 25th percentile of AACHMSI as compared with those residing in cities in the bottom 25th percentile of AACHMSI."
    - "The shaded areas are the 90 percent confidence intervals."
- Appendix Figure 3 — Consumption Responses to Monetary Easing under An Optimistic Regime with A 15-Percentile Threshold
  - Notes (verbatim):
    - "The shaded areas are the 90 percent confidence intervals."
- Appendix Figure 4 — House Price Response to Monetary Easing under An Optimistic Regime with A 15-Percentile Threshold
  - Notes (verbatim):
    - "The shaded areas are the 90 percent confidence intervals."
- Appendix Figure 5 — Consumption Responses to Monetary Easing under An Optimistic Regime with A 20-Percentile Threshold and Household-Level Observations
  - Notes (verbatim):
    - "The shaded areas are the 90 percent confidence intervals."
- Appendix Figure 6 — Correcting for Double Counting and Allowing for City-Specific Responses of Baidu Search Index (20-Percentile and City-Level Observations)
  - Notes (verbatim):
    - "The shaded areas are the 90 percent confidence intervals."

*Content unit: wpiea2024264-print-pdf - REFERENCES*

---


_Source: https://www.imf.org/-/media/files/publications/wp/2024/english/wpiea2024264-print-pdf.pdf_
