Stock markets typically remain open for a finite number of hours every day, say 9:30 AM to 4:00 PM. This is when the majority of the transactions take place. Why you ask? Well, traders and exchange operators are humans just like you and me. They need to go back to their families, sleep, and live a life. Okay, there is another reason. With the growing popularity of algorithmic trading, a large portion of transactions today are being carried out by automated systems. They can be much more responsive to market conditions than humans, and result in a sharp increase or decrease in stock prices over a very short period of time. If left unchecked, this can result in things spiraling out of control. Closing market operations at a regular time every day provides an artificial barrier that can limit the damage such events can cause. This also give stock market regulators some time to analyze the situation and implement control measures. Now, some exchanges do allow for pre-market and post-market trading. Typically 4:00 AM to 9:30 AM for pre-market, and 4:00 PM to 8:00 PM post-market. However, not many traders participate in the session. So, trading volume is typically low. Either way, the takeaway from this is that stock markets close operations at a certain time every day, and they typically remain closed over weekends and holidays. As a result, when you look at stock data, you’ll notice these gaps or discontinuities during periods when the markets are closed. Depending on your analysis, this may or may not have an impact on the conclusions you draw. For instance, if you treat market data as a simple sequence of observations and ignore the timestamps as if the market’s just smoothly continue from one end of day to the next opening bell, then these gaps are not as significant. But, if you compute a metric that involves time like the number of transactions per hour, then ignoring these gaps can give you inaccurate results. The discontinuities can produce spikes or unusual flats in calculated values, or just outright wrong information. So, you need to be careful when dealing with market data.