Hacker News new | past | comments | ask | show | jobs | submit login

Slightly unrelated, but why does the stock market close each night? If trading was open 24/7, we wouldn't have large spikes like this every morning. We'd only have them when certain news is announced.



Then again, why not shorter hours? Matt Levine writes about this occasionally:

> We talk occasionally about proposals to shorten the stock trading day from its current 6.5 hours (in the U.S.) to, say, half an hour. The idea is partly that traders would have more time to spend with their families and dogs and hobbies, but one shouldn’t overestimate that. Really what it means is that you have 23.5 hours a day to ponder information and synthesize it into stock-price views, and then half an hour to trade stocks based on those views. The big advantage is that anyone who might want to buy stocks can pay attention to the stock market for that half an hour, so the liquidity during that half-hour should be pretty good. When the trading day is 6.5 hours, sometimes no one’s around when things happen, and you have to shut the market down for a bit to call everyone back in. But I don’t think that’s quite what happened this morning.

https://www.bloomberg.com/opinion/articles/2020-03-09/stuff-...


So we can use garbage-collected languages in trading systems without turning on the garbage collector - just collect it all at the end of the trading day. I'm joking but this is a real technique.


Yeah this is dumb but it’s actually par for the course for firms I’ve worked at. Build up all the garbage during trading hours (and on days like this hope you don’t hit resource limits) then start collecting it and rebooting at the end of the day.

Most services are shut down after trading/brought up again before trading.

After trading you would have accounting and other processes that would take hours. These are not done in real time and rely on daily downtime.

I honestly can’t imagine these firms figuring out 24/7 trading hours.


If it's dumb but it works, it isn't dumb.


It is, there was this HFT firm I interned at once that rebooted all their servers at the end of the trading day to make sure they would start clean and fast the next day.


Did they also warm up caches before open?


It also ensures you can come back up after an unexpected shutdown.


This is the best reason. Knowing your business systems will simply come back with the power, and having that tested on a daily basis will quickly put everyone at ease.


Is this what is called chaos engineering?


That makes a lot of logical sense. Every single ms counts in those cases.


It reeks of code base problems or general misunderstanding of systems administration. Easier to just make sure you're not leaking memory (profilers exist) and actually monitoring the servers than having to reboot your servers just in case.


Things like heap fragmentation still happen.


Now I understand why Jane Street uses OCaml. It has less of the GC problems.


I've never used this before, but I suspect this is exactly what you would want to use if you were on .NET and building latency-sensitive systems that see daily reboots:

http://tooslowexception.com/zero-garbage-collector-for-net-c...

If I was building something that was on a short fuse like this, I'd also be using structs and stack allocation as much as humanly possible before leaning onto the "having tons of physical memory" crutch. I feel like virtual memory could cover your ass for a small period of time before the whole thing started to grind to a halt.


Aside from people needing to sleep (back when computers didn't do our trading for us), there's also the matter of information flow: the reason quarterly earnings announcements happen after market close is to avoid giving slightly-faster people an edge.

If you could read and digest an earnings announcement faster than all your peers, you could make trades based on the new information before the price has moved.

While yes, some types of trading does rely on exploiting (usually small) information asymmetries, and "incorrect" pricing, it's much fairer if people have time to digest big required disclosures and all be able to get their orders in at (essentially) the same time: the opening bell the next day.


Markets move more or less instantly on big news nowadays. I mean on the order of seconds. Algos can parse data releases in real time and react in milliseconds.

Good GDP numbers at 2:00:00? It's gaping up at 2:00:01 and near the top of the trend by 2:00:05. I've seen it first hand many times.


But this idea is completely invalidated by the fact that many foreign companies (European and Chinese) are listed in U.S. exchanges, which means that the investors can only make informed decisions about the their investment if they are awake 24 hours/day


Maybe solution would be freezing certain asset for a week/day/hour after earnings announcement?


Or screw earnings and just have live earnings be something you look up on a website whenever you want for a publicly traded company.


The market was not always driven by computers like it is now, and people running it needed to sleep.


The market is still very much driven by humans; the computers just help out, to varying degrees. The idea that computers are trading unattended is a myth that I hope would die.


A lot of trading is indeed done by minimally supervised computers, i.e. a human only looks at the computer if alarm bells ring. Source: was one of those humans


How often are the models that drive algorithmic trading updated?


The pipeline for a given piece of research to get into production tends to be several months. Therefore, a small firm with only a few researchers might update between once and a few times a month, and a larger company it might be several times a week. It's rare to update the model more than once a day, since it'll normally be updated outside trading hours.


Sure, while humans are critical to maintaining the infrastructure of the various markets, but we are beyond the days where markets were tracked on a chalk board. The NASDAQ is very much running on servers from an undisclosed data center off route 95 in New Jersey.


Not undisclosed, primary is Equinix NY11:

https://www.nasdaqtrader.com/Trader.aspx?id=POPs


People running hospitals need to sleep too but they dont close for the night


People need medical care for emergencies in the middle of the night. People don't have the same need to trade 24/7.

Matt Levine and others argue that shorter trading hours would actually increase market liquidity. Synthesize market information outside of market hours, then trade during a shorter window: https://www.bloomberg.com/opinion/articles/2020-03-09/stuff-...


Compressing hours is good for liquidity and risk managers need to sleep, among other things.


In addition to it always being done that way, there's also probably some benefit to having there be no such thing as a "night shift" in charge of market operations and security, given how destructive exploitation of vulnerabilities in the system can be.


Lots of good answers below. Additionally most of the trading happens in the opening and closing minutes. So you could trade almost the same volume even when the exchange only opened for 15 minutes per day (let's say once in the morning and evening).


There is after hour market, but may not accessible to many


Doesn't matter really, most liquidity seems to be in the closing 30-minutes anyway. [0]

[0]: https://www.ft.com/content/9e1f05b4-43e7-11e8-803a-295c97e6f...


This is a pretty good answer: https://www.quora.com/Why-is-the-stock-market-not-open-24-7

TL;DR: Letting markets take regular breathers probably helps curb swings in the market. It also lets people who manage money get some sleep (though of course there are other markets open 24/7).


Because it was always done that way.


Traders can trade 24/7 in markets around the world, as well as in crypto assets. If all trading was 24/7, what would happen probably is centralization of all trading to 1 or 2 huge exchanges.


Futures markets are open 24hrs, but do close Friday - Sunday evening




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: