PurposeThis paper aims to identify various macroeconomic variables that affect the stock market performance of developed and emerging economies. It also investigates the effect of these factors on the stock markets of both economies. The impact of these variables on broad market indices and sectoral indices is investigated and compared too.Design/methodology/approachThe publications for the study were retrieved from databases such as Emerald Insight, EBSCO, ScienceDirect and JSTOR using the keywords “Macroeconomic variables” and “Stock market” or “Stock market performance.” The result demonstrated a growing corpus of scholarly work in the domain of stock market. The study was carried out separately for each macroeconomic indicator. Given a large number of articles under consideration, the authors began by reading the titles and abstracts of all publications to identify those that were relevant. The papers are evaluated in Excel and the articles for review range from 1972 to 2021.FindingsThe authors found that gross domestic product (GDP), FDI (Foreign Direct Investment) and FII (Foreign Institutional Investment) have a positive effect on both emerging and developed economies’ stock market while gold price has a negative effect. Interest rates had a negative impact on both economies except for a few developing countries. The relationship with oil prices was positive for oil exporting countries while negative for oil importing countries. Inflation, money supply and GDP are the macroeconomic variables that have the same effect on sectoral indices as they do on broad market indices. The impact was sector-specific for the remaining variables.Research limitations/implicationsThis paper gives an overview of relation and effect covering variety of macroeconomic variables and stock market indices. Still, there is a scope for further research to analyze the effect on thematic, strategy and sectoral indices. A longer time horizon with new variables, such as bank deposit growth rate, nonperforming assets of banks, consumer confidence index and investor sentiment, can be studied using high-frequency data. This research may help stakeholders adopt and manage their policies during a crisis or economic slump.Practical implicationsThis study will assist investors, researchers and educators in the fields of economics and finance in understanding how macroeconomic factors affect the stock market. Furthermore, this study can guide in portfolio diversification strategy across multiple sectors by examining the impact of macroeconomic factors specific to sectoral indices. This paper provides insight into society and researchers since it integrates a number of macroeconomic variables and their interaction with the stock market. It may also help pension funds and mutual fund firms to hedge their funds and allocate equity portfolios.Originality/valueWith respect to India, this study looked at new macroeconomic variables and sectors. It contrasted the impact of these variables in developed and developing economies. The effect of broad and sectoral stock indexes was also investigated and compared. The authors examined how these variables responded during crisis and economic downturns by using articles from a longer time frame. This research also looked into how changing the frequency of data for the variables altered stock performance. This paper emphasized the need for more research into thematic, strategy and broad market indices, such as small-cap and mid-cap indices.