Background: capital, as the engine of growth and development and one of the fundamental pillars of each country's economy and the optimal use of investment opportunities, is considered among the most important factors for achieving economic growth and development. Oil prices have been recognized as one of the main components of the financial market (stock market) in recent years. Oil is one of the most important factors of production in the economy. Not surprisingly, the growing theoretical and experimental literature is dedicated to studying oil and its impact on the economy. An increase in oil prices has led to an increase in production costs, which affects inflation, consumer confidence and, consequently, economic growth. Purpose: The study of effect of fluctuations in oil prices on stock market returns in a country like Iran with dependency on income stems from natural resources such as oil. The main objective of this research is to investigate the effect of oil price changes on stock market returns and the sub-target of this research is to investigate the effect of inflation rate, stock price and exchange rate on stock market returns. Methodology: in this research, we seek to study the effect of changes in oil prices, exchange rate, inflation rate, and stock prices on stock market returns using the Markov switching model. Findings: The findings of this study showed that the effect of oil price changes on negative stock market returns, the effect of stock prices on the return of the stock market, the effect of the exchange rate on the return of the stock market, the effect of inflation on the return of the stock market are positive. Results: According to the research findings, the main hypothesis of the research about the nonlinear effects of oil price changes on stock market returns and its negative and significant effects is confirmed. Also, the hypothesis of the positive effect of stock prices on stock market returns and the positive effect of the exchange ra