Investor sentiment, R&D spending and firm performance

Abstract Prior literature indicates that the stock market is not simply a sideshow but also a factor that impacts corporate operations and decisions. This study examines the effect of a noise factor in the stock market, investor sentiment, on the relationship between the firm’s R&D spending and firm performance. Using a sample of publicly traded firms in the Chinese A-share market between 2006 and 2019, the study demonstrates that R&D spending generally enhances (reduces) firm performance during optimism (pessimism) periods. Concerning the channels through which investor sentiment impacts the R&D spending-firm performance relationship, market-timing effects indicate that firms that time equity issuance during optimism periods experience a positive R&D spending-firm performance relationship, whereas firms that initiate equity repurchase during pessimism periods have a negative R&D spending-firm performance relationship. For catering effects, when firms cater to short-horizon investors, R&D spending reduces firm performance. The results contribute to R&D and behavioural finance literature.


Introduction
R&D is an effective way to maintain the long-term development of a firm (Vithessonthi & Racela, 2016). R&D activities, which create new technologies and improve firms' productivity, enable firms to maintain competitive advantages and generate new developments in the long run (Brown & Petersen, 2011). In this way, R&D enhances firm performance. Conversely, R&D is a long and risky investment process, which might worsen agency problems and harm the interest of some shareholders and the value of firms (Alam et al., 2020). In this case, R&D reduces firm performance. Accordingly, the relationship between R&D and firm performance is inconclusive, and a comprehensive analysis of situations in which R&D increases (decreases) firm performance is required.
Investor sentiment is a noise factor in the stock market, which thereby drives stock mispricing (Danso et al., 2019). Prior studies suggest that stock overpricing reduces decisions. The study fills this gap and demonstrates that noise (investor sentiment), which causes stock mispricing, provides firms with opportunities to time low-cost stock issuance. Low-cost stock financing serves as a good way of nurturing R&D and prevents R&D underinvestment, which benefits firm performance. Accordingly, this study proposes the bright side of stock market noise. That is, although noise results in stock mispricing, it has a function of changing firms' negative financing conditions and mitigating the negative effect of financial constraints on R&D investments and then firm performance. However, this study also demonstrates the dark side of noise. That is, an agency problem occurs when managers cater to noise traders who prefer risky R&D. Specifically, managers tend to underestimate R&D risks and overinvest in R&D. This decision might harm firm performance but lead noise traders to positively react to R&D spending. Investors' positive reaction enhances the stock price and allows managers to obtain private benefits from stock price increases.
Second, the R&D spending-firm performance relationship remains inconclusive. On the one hand, R&D improves productivity and enhances firm performance; on the other hand, risky R&D incurs agency problems and reduces firm performance. Accordingly, this study focuses on scenarios in which R&D increases (decreases) firm performance from a new perspective, investor sentiment, and finds that R&D generally enhances (reduces) firm performance during optimism (pessimism) periods. Moreover, the study demonstrates an agency problem incurred by R&D spending. R&D is sometimes considered to contribute to firms' long-term development, but its value and risk are difficult to be estimated by external investors. External investors might show preference for R&D and positively respond to R&D spending when they overestimate R&D values. If managers cater to investors' preference, overestimate R&D values and overinvest in R&D, this behaviour will harm firm performance. This is an agency problem.
Third, the study demonstrates that R&D spending following equity repurchase harms firm performance, because R&D might crowd out other value-enhancing investments when repurchase has consumed firms' financing resources (Braouezec, 2009). However, when firms access sufficient cash reserves after costly repurchase, R&D improves firm performance. Accordingly, although equity has an advantage in nurturing R&D, R&D firms should depend on multiple financing channels, including internal cash flows and debts. Therefore, other financing resources can serve as compensations for equities.
The rest of this paper is organized as follows. Section 2 provides the literature review and proposes the hypotheses. Section 3 describes the data and methodology. Section 4 explains the empirical results. Section 5 makes a conclusion.

Theoretical background
This study contributes to theories about the R&D spending-firm performance relationship. R&D is a crucial activity in a firm. However, it is inconclusive whether R&D benefits firm performance or not. On the one hand, R&D is critical in enhancing firms' competitive advantages and long-term development. Prior studies indicate that R&D, which generates new knowledge and patents, improves firms' productivity and performance (Brown & Petersen, 2011). Firms that better utilize R&D resources generate more R&D products from even low R&D spending, thereby benefitting firm performance. Vithessonthi and Racela (2016) show that R&D improves long-term performance when firms combine new knowledge with current technologies. Hence, R&D has a significant positive relationship with Tobin's Q.
However, on the other hand, some studies show a negative relationship between R&D and firm performance. Firms that waste R&D resources produce less high-quality innovation outputs and are unable to improve their operating performance through R&D. Chen et al. (2014) argue that executives who are motivated by executive stock options are likely to invest in low-quality R&D. Low-quality R&D wastes resources and creates little value, both of which harm firm performance. Alam et al. (2020) suggest that intrinsic risks of R&D cause agency problems because R&D enlarges financial and operating risks, which harm firm performance. Lee (2019) indicates that when firms achieve better performance, the decrease in capitalized R&D positively impacts the market value.
Concerning the types of innovation, some firms invest in radical innovation projects, which generate invention patents that significantly contribute to firms' longterm developments. However, firms' short-term performance is reduced because a risky R&D project requires a great investment of firm resources (Shen & Zhang, 2013). Conversely, some firms invest in incremental innovation projects, which generate utility and design patents that only improve firms' short-term performance.
Therefore, prior studies suggest inconclusive R&D spending-firm performance relationships, which many theories can explain. The corporate governance theory suggests that managers who invest a lot of human resources in a firm are risk-averse and might not engage in R&D (Chu et al., 2020). Therefore, underinvestment in R&D occurs when governance mechanisms do not efficiently encourage managers to take risks and invest in R&D. The R&D underinvestment harms firm performance. Moreover, although some governance mechanisms, such as executive stock options, increase managers' risk-taking incentives, managers might invest in low-quality R&D, which also reduces performance (Chen et al., 2014). This paper uses the behavioural finance theory to explain the R&D spending-firm performance relationship. Different from the Efficient Markets Hypothesis, behavioural finance theories suggest that stock prices might be misvalued because they are influenced by noise factors related to noise traders and under-developed market mechanisms. For instance, noise traders who cannot access and process firm-specific information are unable to value stock prices precisely and, therefore, create noise components in stock prices (Campello & Graham, 2013). Short-selling restrictions prevent short sellers from incorporating negative information into stock prices. Stock prices, therefore, react slowly to negative news and are overvalued (Boulton et al., 2020).
Investor sentiment is another noise factor that leads stock prices to deviate from fundamental values. Specifically, optimistic investors are typically overconfident about firms' future cash flows. Since stock prices are estimated based on the present value of future cash flows, overconfidence drives stock prices to be overvalued. Conversely, pessimistic investors have pessimistic expectations and tend to underestimate firms' future cash flows. Stock prices, therefore, are undervalued (Boulton et al., 2020).
Prior studies suggest that firms that announce stock issuance during overpricing periods raise more funds and pay lower issuing costs (Campello & Graham, 2013). Therefore, when optimism causes stock overpricing, overpricing facilitates low-cost stock issuance and relaxes financial constraints (Muhammad et al., 2018). Financial constraints are the main factors that lead firms to shrink R&D spending below an optimal level, because R&D activities require long-term investments and a smooth financing path (Brown & Petersen, 2011). However, optimistic sentiment alleviates financial constraints, thereby, prevents the potential underinvestment in R&D. Conversely, Dou et al. (2021) suggest that when economic policy uncertainties mitigate the optimistic sentiment of institutional investors, institutional investors will not promote innovation investment. As mentioned above, R&D is sometimes crucial in improving firms' productivity, competitiveness and performance. If underinvestment in R&D is mitigated, firm performance will be enhanced (Campello & Graham, 2013).
Conversely, when pessimism causes stock under-pricing, firms are likely to time stock repurchase. Repurchase, which costs considerable financial resources, might result in a liquidity shortage. R&D after liquidity shortage, thereby, might lead firms to shrink other value-enhancing investments or adopt aggressive financing policies, which causes underperformance. Although these predictions are reasonable, little empirical evidence has been provided to support them. This study fills this gap.

Literature Review and hypothesis development
2.2.1. The market-timing effect Investor sentiment, which is associated with biased expectations of investors, is a main noise factor that influences stock prices (Grundy & Li, 2010). Muhammad et al. (2018) suggest that investors who are optimistic about firms' prospects cause stock overpricing, whereas investors' pessimistic expectations of firms' future earnings sometimes result in under-pricing.
If optimism causes stock overpricing, this overpricing offers managers an opportunity to issue new stocks at low costs and alleviate their financial constraints (Danso et al., 2019). Boulton et al. (2020) suggest that firms typically announce stock issuance during overpricing periods, as overvalued stocks enable firms to raise more funds and pay lower issuing costs.
Financial constraints prevent firms from investing in profitable projects, whereas overpricing, which helps to ease financial constraints, mitigates underinvestment problems (Muhammad et al., 2018). Danso et al. (2019) suggest that financial constraints force firms to turn down positive NPV projects, whereas stock overpricing, which offers financial flexibility, eases underinvestment in value-enhancing projects. Campello and Graham (2013) suggest that stock price run-ups during the bubble period narrow the 'investment gap' between financially constrained and unconstrained firms. The relief of underinvestment problems in financially constrained firms allows them to improve their operating performance. Muhammad et al. (2018) demonstrate that overpricing, which enables firms to time low-cost stock issuance and eases financial constraints, motivates firms to allocate capital towards productive projects that enhance performance. In this scenario, firms experience better performance when they issue stocks during overpricing periods.
R&D projects typically suffer severe financial constraint problems because R&D risks enhance information asymmetry. Firms shrink their R&D spending below the optimal level (underinvestment in R&D) in response to financial constraints (Brown & Petersen, 2011). Optimistic sentiment, which causes stock overpricing, plays a role in mitigating financial constraints, preventing R&D underinvestment, and increasing firm performance. Accordingly, the hypothesis is proposed as follows H1a: Optimistic investor sentiment, which facilitates firms issuing low-cost stocks, prevents underinvestment in R&D and improves firm performance.
Conversely, financial flexibility enables firms to accept negative-NPV projects (Danso et al., 2019). Danso et al. (2019) indicate that overpricing reduces the cost of issuing stocks, which turns negative-NPV projects into positive ones. The investment in negative-NPV projects harms firm performance. Alzahrani and Rao (2014) argue that overpricing as the result of optimism encourages managers to invest in negative-NPV projects, which reduce performance.
R&D might enhance firms' financing and operating risks and incur agency problems. If managers do not evaluate the risk and value of R&D projects comprehensively, R&D harms firm performance (Alam et al., 2020).
H1b: Optimistic investor sentiment, which facilitates the issuing of low-cost stocks, leads managers to waste low-cost resources to invest in R&D projects that harm firm performance.
Unlike optimism, pessimism leads to stock under-pricing. Firms are likely to announce stock repurchases during under-pricing periods in order to save capital (Muhammad et al., 2018). Muhammad et al. (2018) demonstrate that rational firms that tend to change their capital or ownership structures repurchase undervalued rather than overvalued stocks. However, repurchase costs a lot in firm resources, such as internal cash. Firms even enhance the financial leverage and bear a high financial burden due to repurchase, which weakens firms' investment (e.g., R&D investment) incentives (Kusnadi & Wei, 2017). Kusnadi and Wei (2017) argue that undervalued firms that initiate repurchase are likely to forgo even value-enhancing investments due to a liquidity shortage, and therefore harm performance. Accordingly, a transient liquidity shortage caused by repurchase might weaken firms' R&D incentives, cause underinvestment in R&D, and harm performance. The hypothesis is proposed as follows H2a: Pessimistic investor sentiment encourages stock repurchase, which crowds out R&D spending, causes R&D underinvestment, and harms firm performance (a positive R&D spending-firm performance relationship).
Conversely, the compulsive R&D investment after repurchase might require firms to shrink their investment in other positive-NPV projects. That is, R&D after repurchase might crowd out some risk-less and value-enhancing projects and decrease firm performance (Shen & Zhang, 2013). Moreover, firms that try to maintain a stable path for R&D might adopt aggressive financing policies (overleveraging) to nurture R&D after repurchase. Firms, therefore, bear a higher financial burden, which harms firm performance (Braouezec, 2009). Accordingly, the hypothesis is suggested as follows: H2b: Firms experience worse performance if they enhance R&D spending after announcing stock repurchase during pessimism (a negative R&D spending-firm performance relationship).

The catering effect
The catering effect also explains the relationship between investor sentiment, R&D spending and firm performance. Specifically, managers who cater to optimistic investors might invest in negative-NPV projects whose value is overestimated by optimistic investors (Grundy & Li, 2010). Alzahrani and Rao (2014) suggest that managers who cater to optimistic investors are likely to make inefficient R&D decisions because optimistic investors who overestimate the value of R&D projects even positively react to low-quality risky R&D. In this scenario, R&D caused by catering effects increases risks but generates little value, thereby harming performance.
Meanwhile, managers who are keen to curb pessimistic sentiment might invest in R&D. This is because the R&D value is difficult to estimate, and even pessimistic investors have a probability of overestimating R&D values and changing pessimistic expectations about firms' prospects (Chan et al., 2001). However, if managers, who are keen to change investors' pessimistic expectations through R&D, do not evaluate the risk and value of R&D comprehensively, R&D might reduce firm performance. Accordingly, another hypothesis is proposed H3: Managers who cater to investors are likely to invest in R&D projects that reduce firm performance.

Sample selection
The study adopts a sample of publicly traded firms in the Chinese A-share market from 2006 to 2019. The study excludes financial firms due to their special capital structures. Firms that have at least 2-year deficits (specially treated firms) and that have missing values for financial data are excluded from the sample. After these cleaning steps, the final sample includes 3,469 firms and 29,473 observations. The data are obtained from the China Stock Market & Accounting Research database (CSMAR).

R&D Spending
This study discusses the effect of investor sentiment, which changes firms' ability to access low-cost equity financing, on R&D spending. Accordingly, R&D spending is measured using two proxies: the R&D spending to total assets ratio (R&D/Total assets) and the R&D spending to sales ratio (R&D/Sales) (Alam et al., 2020). -Kropf et al. (2005) indicate that Tobin's Q contains fundamental and nonfundamental components. Fundamental components indicate shareholders' expectations that reflect fundamental information, whereas nonfundamental components are driven by noise, such as investor sentiment. This study uses nonfundamental components to estimate sentiment (Grundy & Li, 2010). Specifically, investor sentiment (nonfundamental components) at the firm level is defined as the difference between the market value and the fundamental value of a firm' s stock, and the positive (negative) difference indicates that optimism (pessimism) dominates a firm's stock price (Rhodes-Kropf et al., 2005). Accordingly, the study introduces the optimistic (pessimistic) dummy variable (Optimism and Pessimism in Table A2).

Rhodes
According to Rhodes-Kropf et al. (2005), the fundamental value of stocks is calculated as follows where i denotes firms, j indicates industries, and t reflects years. e i, t is an error term. M is the sum of the market value of equity and the book value of debts. Book value is the book value of total assets. D ðNet income i, t <0Þ is a dummy variable that equals 1 if firms earn a negative net income, and 0 otherwise. Leverage is the ratio of total debts to total assets. The estimation process is repeated based on the industry level for the entire sample period. Hence, the fundamental value of stocks is calculated as and b j is calculated as the time-level industry mean of b j, t , which indicates the long-term industry multiples. h i, t is independent variables in Equation (1).

Firm performance
This study uses the EBIT-to-total assets ratio (ROA) and Fundamental_Q to measure firms' operating and market performance respectively (Rhodes-Kropf et al., 2005;Vithessonthi & Racela, 2016). Moreover, as a large R&D investment reduces the profit of firms in the short run, the study adopts the R&D spending adjusted ROA (Adjusted_ROA in Table A2) (Shen & Zhang, 2013).

Empirical model
This study adopts the following empirical model: where i denotes firm, j indicates industry, and t reflects year. c j and d t capture the industry and year fixed effects. e i, t is an error term. Performance denotes performance proxies in Section 3.4. R&D represents R&D proxies in Section 3.2. Sentiment reflects Optimism and Pessimism dummy variables in Section 3.3. Control indicates control variables suggested by Vithessonthi and Racela (2016), including industrylevel stock returns (Industry_return), firm size (Size), financial leverage (Leverage), and PPE ratio (PPE). Control variables are defined in Table A2.
Since R&D might not generate R&D products and impact firm performance in the short run, the study considers the lagging effect of R&D on performance (Vithessonthi & Racela, 2016). It is difficult to use a statistical method (e.g., AIC in time series analysis) to determine the lag order of independent variables when dealing with panel data, therefore, this paper uses 3-year time lags of explanation variables, and the results hold when adopting 5-, 7-, and 10-year time lags of R&D proxies 1 . The baseline models are estimated using the fixed effects regression method. The study focuses on the coefficient of the interaction (b l ), which estimates the effect of R&D on subsequent performance during optimism (pessimism). Table 1 presents the statistics of main variables. Specifically, the sample means of R&D/ Total assets and R&D/Sales are 0.002 and 0.004 respectively, which are lower than 0.015 and 0.012 mentioned by Alam et al. (2020). The sample means of ROA and Adjusted_ROA are 0.058 and 0.071 respectively, which are higher than 0.030 and 0.051 in Vithessonthi and Racela (2016) and Shen and Zhang (2013). The sample mean of Fundamental_Q is 0.568, which is higher than 0.480 in Rhodes-Kropf et al. (2005). For financial variables, the sample means of Size and Leverage are 22.023 and 0.434 respectively, which are higher than 6.510 and 0.208 in Vithessonthi and Racela (2016). The sample mean of PPE (0.226) is slightly smaller than 0.247 in Vithessonthi and Racela (2016). Table 2 exhibits the R&D spending-firm performance relationship during optimism. In column (1), the coefficient of 2-year lagged interaction between R&D and Optimism is significantly positive (0.540), indicating that R&D enhances subsequent ROA during optimism. This result can be explained by H1a and is consistent with the argument that overpricing caused by optimism relaxes financial constraints and contributes to value-enhancing R&D (Muhammad et al., 2018). Economically, when optimism dominates stock prices, a 1% increase in R&D spending results in an average 0.540% increase in ROA in the second year after R&D spending. This increase accounts for more than 9.334% (0.540/5.785) of the sample mean of ROA. The results in columns (2) and (3) are consistent with those in column (1) when using Adjusted_ROA and Fundamental_Q respectively. In columns (4) to (6), the results hold when using R&D/Sales. Panel B shows the R&D spending-firm performance relationship during pessimism. In column (1), the coefficient of 2-year lagged interaction is significantly negative (-0.517), indicating that R&D reduces the subsequent ROA during pessimism. Both H2b and H3 explain this result. Firms tend to repurchase undervalued stocks during pessimism, which leads to a temporary liquidity shortage. R&D after liquidity shortage harms firm performance (Shen & Zhang, 2013). Moreover, managers who curb pessimism might be keen to invest in R&D that is favoured by pessimistic investors but do not fully consider the R&D risk (Chan et al., 2001). Economically, when pessimism dominates stock prices, a 1% increase in R&D spending results in an average 0.517% decrease in ROA in the second year after R&D spending, and this decrease accounts for 8.937% (0.517/5.785) of the sample mean of ROA. In columns (2) and (3), the results align with those in column (1) when using Adjusted_ROA and Fundamental_Q respectively. In columns (4) to (6), the results hold when adopting R&D/Sales.

IV Regressions
Well-performed firms are likely to use R&D to maintain competitive advantages, which causes reverse causality problems. This section uses the instrumental variable (IV) regression method. Specifically, I regress R&D proxies on two excluded IVs and control variables in Equation (2) in the first step. The first excluded IV is industry competition estimated as the Herfindahl-Hirschman Index of industry firms' sales ( P ð Sales i Sales Þ 2 ), because industry competition has a non-linear relationship with R&D (Aghion et al., 2005), whereas individual firm performance might not impact industry competition. The second one is the ratio of government R&D expenditures to GDP. Prior studies document a complementary (substitution) relationship between government and corporate R&D spending (David et al., 2000), whereas government R&D is not directly associated with individual firm performance. F-statistics of first stage regressions 2 are significant, indicating that estimated IVs are efficient. The secondstep regression results (Table 3) demonstrate the main findings.

PSM regressions
This section uses the propensity score matching (PSM) method. Specifically, I construct an increased R&D dummy variable that equals 1 when R&D/Total assets (R&D/Sales) in the financial year is higher than that in the last year (Shen & Zhang, 2013). Then, I estimate the propensity score by regressing the increased R&D dummy variable on ROA, Adjusted_ROA, Fundamental_Q and control variables in Equation (2) and select a group of matching firms based on the propensity score. In this case, matching firms have not increased their R&D compared with last year. However, the difference in financial characteristics, such as ROA, between matching and treatment firms are small (Table A1). Hence, the reverse causality effect of financial factors (e.g., ROA) on R&D is alleviated. The matching (treated) group includes 10,591 (2,347) observations (1:5 nearest neighbor matching). The results in Table 4 demonstrate the main findings.

Additional control variables
Some factors impact stock price efficiency, R&D and firm performance simultaneously, resulting in endogeneity problems. For instance, institutional investors serve to improve stock price efficiency. Meanwhile, institutional investors govern risk-averse managers to engage in value-enhancing R&D (Aghion et al., 2013). Ownership concentration is another corporate governance factor that impacts R&D performance. Meanwhile, the separation between ownership and control enhances information asymmetry, which causes noise in stock prices. Accordingly, I control proxies concerning the local institutional investors' ownership (Institution), qualified foreign institutional investors' (QFIIs) ownership (QFII_ratio) and ownership concentration (Top5), which are defined in Table A2.
Moreover, I control variables mentioned by Shen and Zhang (2013), including industry competition (Competition), advertisement expense (Advertisement), and cash dividend payment (Cash_dividend). The results in Table 5 support the main findings.

The market-timing effect
This section tests firms' market-timing behaviour. I construct the issuance (repurchase) timing dummy variable that equals 1 if firms announce equity issuance (repurchase) during optimism (pessimism) (Timeop and Timepe in Table 2) (Alzahrani & Rao, 2014), and introduce an interaction between Timeop (Timepe) and R&D.  Table 6 presents the results. In column (1) of Panel A, the coefficient of 2-year lagged interaction between R&D/Total assets and Timeop is significantly positive (0.262), indicating that R&D improves subsequent ROA when firms time equity issuance during optimism. This result further demonstrates H1a. The results hold when using alternative performance (columns (2) and (3)) and R&D proxies (Columns (4) to (6)).
In column (1) of Panel B, coefficients of 2-and 3-year lagged interactions between R&D and Timepe are significantly negative (-4.954 and À5.322), indicating that R&D exhibits a continuous negative effect on subsequent ROA when firms repurchase stocks during pessimism. This result further supports H2b. The results hold when using alternative performance (columns (2) and (3)) and R&D proxies (Columns (4) to (6)).

Cash-rich firms
This section tests whether having sufficient cash reserves mitigates the negative R&D spending-firm performance relationship when firms have initiated costly repurchase. I build a cash-rich dummy variable (Cash_rich in Table 2) (Brown & Petersen, 2011), and include an interaction between R&D, Timepe and Cash_rich into Equation (2). The interaction estimates the effect of sufficient cash reserves on the R&D spendingfirm performance relationship when firms time repurchase during pessimism. Table 7 presents the results. In column (1), the coefficient of 2-year lagged interaction between R&D/Total assets, Timepe and Cash_rich is significantly positive (0.641), indicating that R&D in cash-rich firms improves subsequent performance even if firms time repurchase during pessimism. This result demonstrates the argument that firms with sufficient internal cash do not need to shrink other investments or adopt aggressive financing policies to support R&D after repurchase. Therefore, R&D after repurchase does not harm performance. The results hold when using alternative performance (columns (2) and (3)) and R&D proxies (columns (4) to (6)).

The catering effect
This section investigates the effect of catering on the R&D spending-firm performance relationship. Following Alzahrani and Rao (2014), I introduce a high turnover ratio dummy variable (Cater in Table 2) and construct an interaction between Cater and R&D. The high turnover ratio of stocks indicates that the stock price is dominated by short-horizon investors. Short-horizon investors who hold stocks for only a short period care more about stock price changes rather than firms' prospects. They typically prefer firm decisions that incur large stock price volatility. Risky R&D is positively associated with stock price volatility (Chen et al., 2014); thus, R&D is typically favoured by short-horizon investors, even if R&D enhances firms' financial and operation risks. Managers that cater to short-horizon investors might consequently underestimate R&D risks and overinvest in R&D projects, which harm performance. Table 8 presents the results. In columns (1) and (2), coefficients of 1-year lagged interaction are significantly negative (-1.228 and À0.787), indicating that R&D harms performance when firms cater to short-horizon shareholders. This result supports H3. The results hold when using R&D/Sales in columns (4) to (6).

The ownership structure
According to prior studies, the information disclosure mechanism in Chinese stateowned enterprises (SOEs) is weaker than that in non-SOEs, and external investors (e.g., institutional investors) are hard to access private information (Choi et al., 2010). Moreover, SOEs are often used as a tool for implementing government economic policies. Therefore, investment and operating information related to strategic policies might not be disclosed to the external market. Insufficient information disclosures reduce external investors' ability of estimating stock prices based on firm-related information, and stock prices tend to be driven by noise factors such as investor sentiment, which results in stock mispricing. Therefore, SOEs are more likely to take advantage of stock overpricing (under-pricing) and issue low-cost stocks (announce repurchase). Since SOEs might not suffer financial constraints and have sufficient resources to support R&D, they typically do not experience underinvestment in R&D. Therefore, if SOEs have opportunities to issue additional low-cost stocks, they are likely to waste low-cost stock financing to invest in value-decreasing R&D (optimism periods). Meanwhile, SOEs, which have financing advantages, maintain R&D without crowding out other value-enhancing investments, even if they announce repurchase during pessimism. That is, the positive (negative) effect of optimism (pessimism) on the R&D spending-firm performance relationship is mitigated for SOEs.
Moreover, managers in SOEs make decisions based on government policies and controlling state shareholders' interests rather than on external investors' expectations (Choi et al., 2010). Therefore, the catering effect of managers on external investors is weaker. Managers might not change R&D spending, even if external shareholders are pessimistic (optimistic). Therefore, the impact of sentiment on the R&D spendingfirm performance relationship is mitigated.
In Table 9, the coefficients of interaction between R&D, Optimism (Pessimism) and state dummy variable (State in Table A2) are significantly negative (positive) in the second year, indicating that the aforementioned positive (negative) effect of optimism (pessimism) on the R&D spending-firm performance relationship is mitigated in SOEs. Moreover, foreign institutional investors are more sophisticated in accessing and trading on information, reducing the noise in stock prices (Kim & Yi, 2015). In this scenario, the effect of investor sentiment on stock prices and stock mispricing are weaker. Therefore, the effect of sentiment on the R&D spending-firm performance relationship is mitigated. In Table 10, the coefficients of interaction between R&D, Optimism (Pessimism), and QFII dummy variable (QFII in Table  A2) are significantly negative (positive) in the first and second years, indicating that the aforementioned positive (negative) effect of optimism (pessimism) on the R&D spending-firm performance relationship is mitigated when QFIIs hold a large stake in a firm.

Conclusion
Investor sentiment changes the condition of equity financing, which impacts firms' R&D incentives and therefore firm performance. This study discusses the effect of R&D on firm performance when investor sentiment impacts stock prices. The study demonstrates that R&D generally improves (reduces) firm performance during optimism (pessimism) periods. For market-timing effects, firms that time their stock issuance during optimism experience a positive R&D spending-firm performance relationship, whereas pessimism, which encourages costly equity repurchase, results in a negative R&D spending-firm performance relationship. For catering effects, the results indicate that when firms cater to short-horizon shareholders, R&D reduces firm performance.
The study has theoretical contributions. First, the study adds to behavioural finance theories. Behavioural finance theories indicate that stock prices are driven by noise factors, resulting in stock mispricing. Mispricing enables firms to time stock issuance and repurchase. However, it is unclear whether the timing of stock issuance and repurchase affects firms' investment decisions and performance. The study suggests that sentiment plays a critical role in determining firms' financing conditions. Firms that time stock issuance (repurchase) during optimism (pessimism) experience less underinvestment (more overinvestment) in R&D, which enhances (reduces) firm performance. Second, QFIIs, who have sophisticated analysis techniques, improve stock price efficiency and prevent stock mispricing. Therefore, the impact of sentiment (mispricing) on the R&D spending-firm performance relationship is mitigated. This study demonstrates the importance of QFIIs in improving price efficiency and finds that the positive (negative) effect of optimism (pessimism) on the R&D spending-firm performance relationship is reduced when QFIIs hold a large share in the firm.
The study also has practical contributions. First, R&D requires a smooth financing path, and factors that ease financial constraints motivate R&D spending. The study indicates that optimism relaxes financial constraints, mitigates underinvestment in R&D and enhances performance. Second, risky R&D might cause agency problems. For instance, the study suggests that managers who cater to short-horizon shareholders might overlook the R&D risk and overestimate the R&D value. In this scenario, developed governance mechanisms are necessary to restrict managers' inefficient R&D decisions (Alam et al., 2020).
The study also has some limitations. First, a pure experiment, such as an exogenous shock, is useful in investigating the causality between dependent and independent variables. However, the A-share market is generally affected by noise (investor sentiment), and it is hard to find an exogenous shock (e.g., passing a law) that completely changes this reality. Second, the study only investigates the relationship between R&D and firms' operating performance when investor sentiment affects stock prices. Firms' R&D performance (quality of R&D outputs) requires further analysis. Notes 1. The regression results are not presented due to the word limit. 2. The regression results are not presented due to the word limit.

Disclosure statement
The author reports there are no competing interests to declare.

Data availability statement
Raw data were generated at Shenzhen SCMAR Data Technology Co., Ltd. Derived data supporting the findings of this study are available from the corresponding author on request.  The EBIT-to-total assets ratio Fundamental_Q The fundamental part of Tobin's Q Adjusted_ROA Adjusted ROA ¼ ROA þ 1 À Total income tax Income before tax Â R&D spending Total assets , where ROA is calculated as the ratio of EBIT-to-total assets. Industry_return The median of industry firms' annual dividend reinvested stock returns Size The natural logarithm of total assets Leverage The ratio of total debts-to-total assets PPE The net value of property, plant and equipment scaled by total assets Competition The number of firms that are operated in an industry Advertisement The ratio of advertisement expense-to-sales Cash_dividend The cash dividend payment per share Institution The ratio of shares held by institutional investors to total shares QFII_ratio The ratio of shares held by QFIIs to total shares Top5 The proportion of stocks held by the top five shareholders Timeop A dummy variable that equals 1 if firms announce equity issuance when optimism causes stock overpricing, 0 otherwise. Timepe A dummy variable that equals 1 if firms announce equity repurchase when pessimism causes stock under-pricing, 0 otherwise. Cash_rich A dummy variable that equals 1 if cash reserves are above the sample median, 0 otherwise. Cash reserves are the sum of cash and short-term investments Cater A dummy variable that equals 1 if the share turnover ratio is beyond the sample median, 0 otherwise. State A dummy variable that equals 1 when shares owned by central and local governments in a firm are higher than the sample median, 0 otherwise. QFII A dummy variable that equals 1 if shares owned by QFIIs in a firm are higher than the sample median, 0 otherwise.