Years ago in a competitive programming contest, there was an interesting problem to calculate the number of days a bus runs in a given year and a given bus schedule. The bus schedule could contain things like, the bus only runs on weekends, or the bus only runs on weekdays that aren't holidays, or the bus only runs on holidays but including the observed holiday which is the weekday after the holiday if the original holiday falls on a weekend. You know things are intense when you are programming a computer to perform the Computus (calculation of the date of Easter).
Technologists thought, how easy it is. A year has only a few hundred days, and there are only a few dozen possible rules for buses. Brute force is enough.
Nobody got the problem right. It gave me a great appreciation for how complex when technology interacts with culture and customs, long before my professional career.
How we solve that problem is a Calendar table in the DB, and some human somewhere is required every year to update the calendar with the various holidays and what not. Then we just look up if it's in the list or not. It's a human problem anyway, and then when someone decides, wouldn't it be spiffy if we did a day of staff training on X day and did a reduced service? Sure, whatever, just put it in the calendar and blamo, accounted for properly.
I literally saw this at my first work 20 years ago. You generate most by script and just add those few odd public holidays manually, much easier to have a person spend 5 mins once every year rather than some smart script with 20 not-so-well-handled corner cases and 7 bugs.
I've seen this done multiple times too. It works until the human forgets about it, or knowledge is lost through collective organisational forgetfulness or churn. And the outages still happen because the lookup fails at some point.
This is also how we do it, but it’s the “obvious” solution the moment you realize that holidays don’t fall on the same days each year. It’s simple enough to predict the day they’ll fall on, but why bother with that when it takes someone 2 minutes every year to just enter these days in?
How we actually solve that problem (at least over here in Poland) is by excluding the weirder holidays from the electronic schedule altogether and deactivating all the arrival time boards and such. If you're lucky, there are cardboard signs explaining all the holiday rules at each stop, there may also be a PDF on the operator's website.
I work with finance data and we ended up building just that + and API. Almost everything is done automatically though. Some languages have a function to calculate Easter
Dates are a nightmare even before you start accounting for public holidays. There’s a whole bunch of calendar and Timezone changes, and valid dates and times that simply don’t exist. Early in my career I had a bug that involved some date in February 1923 not occurring in Greece. I think I eventually fixed it, but I was never 100% sure.
Oohh interesting. From the Wikipedia article on February, 1923:
February 28, 1923 (Wednesday)
The nation of Greece used the Julian calendar for the last time before adopting the Gregorian calendar, used by most of the world, the next day. In that the Julian calendar was 13 days behind the Gregorian, the day was noted as "February 15". The next day was March 1 rather than February 16.
At least in North America we get every observed holiday on every year. There are places (hi France) where if it falls on Sat/Sun and if you're a M-F employee, you just don't get that holiday that year. Of course you have a pile of vacation time to use if you want.
>At least in North America we get every observed holiday on every year.
Ah, but that's not so. For example, if New Year's Day falls on a Saturday, then the NYSE doesn't observe the following Monday as a holiday - happened in 2022, for example.
When you guys quote salaries in monthly figures.. Is the hourly rate fluctuating month to month based on the number of weekends and holidays? Or it vis a vis some standard amount of work days?
> Technologists thought, how easy it is. A year has only a few hundred days, and there are only a few dozen possible rules for buses. Brute force is enough.
> Nobody got the problem right. It gave me a great appreciation for how complex when technology interacts with culture and customs, long before my professional career.
For those of us who weren't there, could you let us share in that appreciation: why wasn't brute force enough?
> You know things are intense when you are programming a computer to perform the Computus (calculation of the date of Easter).
Seems like that is a red herring since Easter is always on a Sunday, which, it seems to me, is all that could possibly matter given the description of the problem.
> Financial systems are inseparably computer systems. Most similarly important computer systems don’t take holidays. Google doesn’t take holidays… or doesn’t seem to, from the perspective of a typical user, at any rate.
Wouldn't it be better for users if our financial systems worked like the Google example? Why can't I as a regular retail investor trade a stock on Saturday? Why can't I move money from one bank account to another on Sunday? Imagine not being able to send E-mail on Easter because nobody at your ISP was there to push bits around or whatever these banks' excuse is?
> “Why can't I as a regular retail investor trade a stock on Saturday?”
Stock trading on exchanges traditionally has delayed settlement. You don’t need to have the money and stock at hand when you make the trade, but you’re expected to provide them on the settlement date. For a long time this was two days later, but is now being changed to only one day in the U.S.
Trading on Saturdays would either mean complications for settlement, or that settlement must happen on Saturday too. Surely not impossible, but these things have ripple effects that are not immediately obvious.
> “Why can't I move money from one bank account to another on Sunday?”
This exists in Europe with 24/7 SEPA instant credit across banks and Eurozone countries. It doesn’t cost anything extra.
But getting to that point needed a serious mandate from the European Union, years of planning, and cooperation by the various governments. The effort was worth it because it’s a far better solution for consumers than e.g. cryptocurrencies or the American proprietary payment solutions like Venmo.
>> “Why can't I move money from one bank account to another on Sunday?”
> This exists in Europe with 24/7 SEPA instant credit across banks and Eurozone countries. It doesn’t cost anything extra.
> But getting to that point needed a serious mandate from the European Union, years of planning, and cooperation by the various governments.
Hm, it also exists in the USA with credit "within a few minutes" across banks (the one time I've used this, it resolved within a second), and doesn't cost anything extra. Getting to that point did not require a mandate from anyone, or government involvement of any kind.
It does seem to have been a four-year cooperative project between several banks, though it is not immediately clear to me that instant settlement was a founding goal of the project so much as something that got implemented after four years.
> ... But getting to that point needed a serious mandate from the European Union, years of planning, and cooperation by the various governments. The effort was worth it
I'd take my EU strong from an economic point of view and without "yay sunday SEPA transfer" any day over the EU we have today. The EU is a massive failure and it's going to fall into oblivion versus the US and China: especially now that the EU voted to kill its main economy, Germany, by destroying german automakers (with the mandatory shift to EVs).
The EU produces metric shittons of rules and legislation which brings absolutely nothing of value to its citizens.
If anything I don't think the EU is something to strive for: on the contrary, it should serve as an example of what not to do. Even if this means no "yay, instant sunday payments".
> Why can't I as a regular retail investor trade a stock on Saturday?
Markets have chosen to concentrate trading to specific hours so as to concentrate liquidity and to help out the professional traders. If everyone's trading 24/7 then it means you need to be prepared to trade 24/7. Having defined market hours means defined hours in which important things can happen. And since the people who work in the market can also define the hours, they've chosen to give themselves reasonable working hours.
In a world where the major markets are trading 24/7, traders need to be at their desk 24/7.
> Why can't I move money from one bank account to another on Sunday?
Instant money transfer means instantly draining someone's bank account with no recourse. Checks have plenty of opportunities to stop the money, so you can write a check on a Sunday as easily as a Wednesday. Wires are more irreversible and so you can only send those when the bank is open and there's someone to double check any suspicious behavior.
Crypto trades 24/7 and I don't see anyone complaining or liquidity problems. Lots of people can't trade in the public markets because they are at work those hours. Let's just admit it s all a legacy antiquated system instead of finding excuses for its shortcomings
Except sophisticated traders are allowed to trade outside of market hours (after hours markets are a thing). When news drops, price is absolutely affected in the after-hours market.
It's only the regular Joe's that are not allowed the priviledge to trade at all hours.
> Instant money transfer means instantly draining someone's bank account with no recourse. Checks have plenty of opportunities to stop the money, so you can write a check on a Sunday as easily as a Wednesday. Wires are more irreversible and so you can only send those when the bank is open and there's someone to double check any suspicious behavior.
We have instant 24/7 money transfer in EU/Eurozone using SEPA Instant Credit Transfer (well technically it has "up to 10 second" delay) and it hasn't really been an issue.
I can do an instant payment at the bank I work at, on a Sunday. We just warn clients that there’s no recourse but we give them the option. This is a choice, not an act of god. Our clients (including me) love it.
Liquidity had been a concern historically. Traders couldn't necessarily get good execution outside normal exchange hours, especially for lower volume securities. But now there are so many HFT firms willing to take the other side of any trade that I think the liquidity concern has become moot, at least for regular stocks and bonds.
> Instant money transfer means instantly draining someone's bank account with no recourse. Checks have plenty of opportunities to stop the money, so you can write a check on a Sunday as easily as a Wednesday.
This argument doesn't actually work; the period during which you can recover a check that shouldn't have been valid is (much) longer than the settlement period. This immediately shows that instant transfer does not mean instantly draining someone's account with no recourse. The recourse period isn't related to the settlement period.
You're going a bit extreme, but 5 auctions per week strike me as reasonable.
If the markets are trading continuously, benefits of parsing new information go to those who parse it the fastest. If the markets trade in occasional auctions, everyone shares the burden (or gift) of new information equally, and no resources are wasted in, say, building a somewhat more straight glass fibre connection between Chicago and NY, then building a sequence of microwave towers, because light moves faster in air than in fibre.
> Why can't I as a regular retail investor trade a stock on Saturday?
Having worked in the industry for some years: because it's always been that way, and because the people who make financial systems are lazy and bad at their jobs and don't want to admit they were wrong.
It's happening, very slowly, just yesterday I was reading about "the first 24/7 stock exchange" making another filing or something. But the financial industry is conservative and most users are happy for it to be - sure they'll talk about how they want their bank to have a better online service, but they'll keep banking at the big four names they recognise rather than the upstarts that offer better service.
> Imagine not being able to send E-mail on Easter because nobody at your ISP was there to push bits around or whatever these banks' excuse is?
Here in Japan a lot of government systems work like that.
In the last 25 years I have seen the expansion of trading hours as well the reduction of trading hours in some markets. It really comes down to demand. Currently, the demand for 24x7 is more retail than institutional which shapes whatever will be on offer (some instis have interest, but for at least some that have interest I could imagine they are eyeing new inefficiencies/opportunities from that).
Sorry to hear you've worked in such a depressing part of the industry. I've worked with some incredibly motivated and talented people and this is not my impression at all.
Still, it's an old, large and hugely complex interconnected system made up of literally thousands of banks employing millions of people and several regulatory bodies run by different federal and state administrations.
Such interconnected systems/networks are notoriously hard to evolve, especially given that, as you also noted, people are often extremely conservative when it comes to their life savings. I don't think it's fair to blame the people working in the industry for all of that or even call them lazy.
Because there is a lot more plumbing involved in buying and selling equities or moving money than there is to send and receive email.
Specifically, a lot of measures to prevent something going wrong, because the the damages are far greater when moving things of great value than an email.
You technically can trade stock on a Saturday, just not using all the aforementioned plumbing of a popular stock exchange and brokerage. And you can move money on the weekends, just maybe not with the help of banks because they consider it not worth their while to offer the service on weekends.
But why? What makes the plumbing stop on weekends and holidays? Is this some kind of law of nature, or can it be fixed?
It seems silly that bank transactions, stock trades, purchases of insurance or anything like that requires human intervention. It's like an HTTP request requiring a human to put it through. Bonkers.
In a lower reply of mine, I still have to ask why this is the case. If it's that big of a thing, then there should be rules defined to catch things. We have exception handlers for code and steps that go awry, why not the same for money, so the rest of the money flow can keep going, and only the weird things need to be checked out (and further rules then be refined).
> Wouldn't it be better for users if our financial systems worked like the Google example?
Yes, I guess there are a few precious hours of our lives that aren't crushed under the perversity of the Protestant work cult, we should seek them out and grind them under the heel.
If anything I think it would go in the opposite direction, freeing people to do things on their own time, and not the banks'. Available when when people need them to be, not when the institutions want to be, but that would require effort on their part and maybe cost them a few basis points in profit.
> Why can't I as a regular retail investor trade a stock on Saturday?
Because stock exchanges don't run themselves. There's all kinds of services with humans in the loop, and without these, you'd have a market with much less guardrails than the current public stock exchanges.
You can make a case for such a market being good or bad for society, but it currently simply wouldn't be legal in most countries.
> Why can't I move money from one bank account to another on Sunday?
You can in many countries! In the EU, SEPA Instant is going to be mandatory soon. In the US, I can already do this between two of my bank accounts; most banks unfortunately don't participate yet.
The larger problem seems to be that the US simply does not have customer-initiated account transfers (to third parties) in the first place. In a way, the reason why you can't do bank transfers on the weekends is that you can't even do them on weekdays either.
> Why can't I as a regular retail investor trade a stock on Saturday?
Because for you it means spending few minutes to open your app and send and order, for other market participants it means organizing holiday shifts, night shifts, and working long hours. You just cannot keep the strategies running without a human eye, the lack of oversight could be too expensive. Exchanges and banks and big players can afford that (though still, you're making some people more miserable for unclear reason), but can the small prop shop with tens of people trading on multiple exchanges do the same?
Wouldn't exchanges and market makers (i.e. the big players) be all that's needed to clear orders at reasonable spreads? Others can always choose to what scope they'd participate.
Wouldn't it be better if Google worked like financial systems? Perhaps people would learn to read maps if they weren't misled into unrealistic assumptions that Google Maps will always be available, always responsive, always correct.
What is the cost, in money time, attention, engineering effort of trying to build for five 9s of reliability?
I operate a Service Bureau, which is a firm that facilitates transactions for brokers and banks. There are two calendars for US Equity Trading that we need to maintain: Trading calendar and Settlement calendar. The difference is that trading happens at exchanges/brokers and settlement happens at banks. Thus, a bank holiday may be trading day -- for example Veteran's Day. We're small, so I personally manage these two calendars (and as others say, we use DB tables).
There's a settlement concept called T+2 (soon to be T+1) which is Trade date plus 2 days; this is the day when the cash and shares must be exchanged.
On the Friday morning before last Veteran's Day, we get operations emails from one of the Banks we service that our Settlement dates for the previous day's trades are all incorrect and causing issues for them. I was very confused and very worried that I somehow forgot Veteran's Day.
But... then I realized that it was a Canadian Bank settling US Equities trades!
In their business practice they would settle the trades on a day all the US Banks would not. T+2 for the Canadian Bank was different than T+2 for US Banks. So we resubmitted all the trades with a settlement day of Veteran's Day.
As OP says, managing business calendars is hard for many reasons. I also got really jacked up by a Leap Second, a story for another day.
Oh man, I had a Bloomberg terminal, and got data from their Data License product.
Even if you have all the calendars, it’s still non-trivial to apply the calendars correctly for different counterparties based on instrument and function.
And corporate actions are awful. The Bloomberg Data license data sometimes doesn’t match what the terminal has. Bloomberg said they updated it in the terminal but would not fix their bulk data sources since the errors were for actions that happened a while ago.
To unorientalize the Japan thing here: there’s a national list of holidays. It is updated once a year. You put it in your code base. In the code base there’s a comment pointing to the page (hopefully one on a .go.jp page)
Your vendor says thing does not happen on holidays or weekends. There might be some other special day where things also do not happen. Keyword is “training day for staff”. Also end of year holidays. They will send you an email about it. Maybe 3. You read the email (important!), and put it in the vendor-specific list of holidays in your code (also important!)
And of course because you like your sanity you use whatever iCal date relativity respecting library to do logic like “the next Wednesday from today” or whatever.
Some things take 1 step. Some take 5. Being able to do something that takes 5 steps without writing a 3000 word screed about the world being broken is the sign of a successful person. Document it, do it, maybe improve it a bit, move on with life.
"The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man." ― George Bernard Shaw, Man and Superman
This doesn’t actually solve the problem because the problem is that the list of holidays depends not only on the country but also on the particular company you’re interacting with. So, is_holiday is something like a function of the parties involved in a particular contract.
There is no general problem. There is the act of doing business between parties. You do this across N relationships. You have N vendor contacts. You document them. You deal with them. This is what working with someone is like! Of course after doing the same thing 3 or 4 times you might understand some patterns, but even if you don't totally factor it out you'll at least have a general pattern.
The point is you don't write the is_holiday function, you might write "is_jp_govt_holiday" or "is_mufj_bank_holiday" (though really it might be more "is_mufj_bank_transfer_csv_acceptance_day" or whatever), that might look at "is_jp_govt_holiday". You write functions to their contexts, in a specific way. This lets you write "hacks" that aren't hacks when you get the specific email. A bunch of tiny, specific functions calling other tiny, specific functions.
5-word functions might look gnarly but they will be specific, and you got the magic of autocomplete to save you some typing.
Not at all unique to Japan either, I was confused by the Japan-centric focus of the discussion. I've worked for two different US corporations that observed a company-specific holiday, either founding day or IPO day.
It feels to me like the article sets up the confusion it must resolve by starting from national holidays... I don't think any of my employers have had a holiday schedule that matched another. There's a lot of variation on what holidays companies do and do not recognize, often with compromises around giving longer runs off around Christmas. If you really need to know when another company is doing business I wouldn't have ever thought there was a solution other than "collect a list of holidays each of your business partners observes."
Hell, a lot of US states don't match the federal holidays.
If anything the banking industry is unusually consistent for practical reasons. But even then, I worked for a major US bank and discovered that our holidays didn't quite match another major US bank we did business with!
The Japan focus is likely because patio11 lived in Japan for several decades, was a salaryman for many years, and is exceedingly familiar with their business and banking practices.
To add to that: In several jurisdictions, the calendars of when shares can trade (T, with a closing price) and when shares can settle (T+2) is distinct (say, shares can trade on NYE, but not settle). So, one definitely needs to maintain (potentially) multiple calendars per jurisdiction. One calendar per counterparty was news to me, but fair enough.
The next complication then is that these calendars can change. In Hong Kong, we have typhoons quite occasionally between around August and October, and if the observatory declares a T8 or above, several businesses close, including the stock exchange. It then depends on the exact timing of the raising and lowering of the signal whether there is the usual trading, or half day, or no trading, which implies no closing price, thus an additional holiday for the trading calendar.
To treat holidays properly, one must then take into account the day it was declared for some purposes.
So every company in Japan has their own public holiday, and they've written it down _somewhere_. Sounds easy compared to what the middle east has to offer on that account:
- When Dubai was awarded the 2020 World Expo the following day was declared public holiday (yes, less than 24 hours notice)
- In the UAE, the death of a Sheik is often followed by 3 days of mourning where government offices are closed (this can include a lot of office workers one might not think of as "government", as the respective emirates runs a lot of companies)
- When Qatar scored a goal at the world cup, a public holiday was immediately announced for the following day.
- Even planned public holidays, such as Ramadan (not a public holiday as such, but work does grind to a near halt) and Eid are determined by sightings of the moon, and the start and length of these are often announced days in advance.
In my country on a public holiday everyone is free to spend money so all the stores and restaurants are open all day. What are people supposed to do on a holiday if not consume product?
Same here in ME. Every business in retail and hospitality works on weekends and holidays.
For Dubai at least, they have something like 90% foreign workforce, so it is easy to find people who do not observe Eid.
But in the context of the article, we are talking banks and offices and particularly KYC requirements. I’m a bit unclear how banks are affected by these “tomorrow is an advocate holiday!” announcements, particularly the banking software.
> Technologists describe their systems as having “uptime” and measure it in “nines”, such as “We have five nines of uptime”, which means that a system has 99.999% uptime or, equivalently, about five minutes of downtime per year. Five nines is admirable in many circumstances and would be considered _disastrously_ below expectations for e.g. Google Search.
This seems wrong? 5 9s is probably a reasonable benchmark or even unattained goal for Google Search, right?
Technologists thought, how easy it is. A year has only a few hundred days, and there are only a few dozen possible rules for buses. Brute force is enough.
Nobody got the problem right. It gave me a great appreciation for how complex when technology interacts with culture and customs, long before my professional career.
February 28, 1923 (Wednesday)
The nation of Greece used the Julian calendar for the last time before adopting the Gregorian calendar, used by most of the world, the next day. In that the Julian calendar was 13 days behind the Gregorian, the day was noted as "February 15". The next day was March 1 rather than February 16.
Ah, but that's not so. For example, if New Year's Day falls on a Saturday, then the NYSE doesn't observe the following Monday as a holiday - happened in 2022, for example.
When you guys quote salaries in monthly figures.. Is the hourly rate fluctuating month to month based on the number of weekends and holidays? Or it vis a vis some standard amount of work days?
> Nobody got the problem right. It gave me a great appreciation for how complex when technology interacts with culture and customs, long before my professional career.
For those of us who weren't there, could you let us share in that appreciation: why wasn't brute force enough?
Seems like that is a red herring since Easter is always on a Sunday, which, it seems to me, is all that could possibly matter given the description of the problem.
edit: or, because the buses would observe the Easter holiday the next day, quoting OP:
> including the observed holiday which is the weekday after the holiday if the original holiday falls on a weekend.
https://en.m.wikipedia.org/wiki/Date_of_Easter
Then you have Ash wednesday and some other holidays around Lent (6 weeks before Easter)…
Wouldn't it be better for users if our financial systems worked like the Google example? Why can't I as a regular retail investor trade a stock on Saturday? Why can't I move money from one bank account to another on Sunday? Imagine not being able to send E-mail on Easter because nobody at your ISP was there to push bits around or whatever these banks' excuse is?
Stock trading on exchanges traditionally has delayed settlement. You don’t need to have the money and stock at hand when you make the trade, but you’re expected to provide them on the settlement date. For a long time this was two days later, but is now being changed to only one day in the U.S.
Trading on Saturdays would either mean complications for settlement, or that settlement must happen on Saturday too. Surely not impossible, but these things have ripple effects that are not immediately obvious.
> “Why can't I move money from one bank account to another on Sunday?”
This exists in Europe with 24/7 SEPA instant credit across banks and Eurozone countries. It doesn’t cost anything extra.
But getting to that point needed a serious mandate from the European Union, years of planning, and cooperation by the various governments. The effort was worth it because it’s a far better solution for consumers than e.g. cryptocurrencies or the American proprietary payment solutions like Venmo.
> This exists in Europe with 24/7 SEPA instant credit across banks and Eurozone countries. It doesn’t cost anything extra.
> But getting to that point needed a serious mandate from the European Union, years of planning, and cooperation by the various governments.
Hm, it also exists in the USA with credit "within a few minutes" across banks (the one time I've used this, it resolved within a second), and doesn't cost anything extra. Getting to that point did not require a mandate from anyone, or government involvement of any kind.
It does seem to have been a four-year cooperative project between several banks, though it is not immediately clear to me that instant settlement was a founding goal of the project so much as something that got implemented after four years.
I'd take my EU strong from an economic point of view and without "yay sunday SEPA transfer" any day over the EU we have today. The EU is a massive failure and it's going to fall into oblivion versus the US and China: especially now that the EU voted to kill its main economy, Germany, by destroying german automakers (with the mandatory shift to EVs).
The EU produces metric shittons of rules and legislation which brings absolutely nothing of value to its citizens.
If anything I don't think the EU is something to strive for: on the contrary, it should serve as an example of what not to do. Even if this means no "yay, instant sunday payments".
Markets have chosen to concentrate trading to specific hours so as to concentrate liquidity and to help out the professional traders. If everyone's trading 24/7 then it means you need to be prepared to trade 24/7. Having defined market hours means defined hours in which important things can happen. And since the people who work in the market can also define the hours, they've chosen to give themselves reasonable working hours.
In a world where the major markets are trading 24/7, traders need to be at their desk 24/7.
> Why can't I move money from one bank account to another on Sunday?
Instant money transfer means instantly draining someone's bank account with no recourse. Checks have plenty of opportunities to stop the money, so you can write a check on a Sunday as easily as a Wednesday. Wires are more irreversible and so you can only send those when the bank is open and there's someone to double check any suspicious behavior.
It's only the regular Joe's that are not allowed the priviledge to trade at all hours.
We have instant 24/7 money transfer in EU/Eurozone using SEPA Instant Credit Transfer (well technically it has "up to 10 second" delay) and it hasn't really been an issue.
Hang Seng still even takes a lunch break.
This argument doesn't actually work; the period during which you can recover a check that shouldn't have been valid is (much) longer than the settlement period. This immediately shows that instant transfer does not mean instantly draining someone's account with no recourse. The recourse period isn't related to the settlement period.
That would have several benefits:
- Remove the perverse incentives encouraging the use of the stock market for gambling
- Free up intelligent people who are currently wasting their lives on said gambling to do things that actually benefit society
- Encourage creation of some other way for people to save for retirement that isn't a casino where their life savings could disappear at any moment
If the markets are trading continuously, benefits of parsing new information go to those who parse it the fastest. If the markets trade in occasional auctions, everyone shares the burden (or gift) of new information equally, and no resources are wasted in, say, building a somewhat more straight glass fibre connection between Chicago and NY, then building a sequence of microwave towers, because light moves faster in air than in fibre.
Having worked in the industry for some years: because it's always been that way, and because the people who make financial systems are lazy and bad at their jobs and don't want to admit they were wrong.
It's happening, very slowly, just yesterday I was reading about "the first 24/7 stock exchange" making another filing or something. But the financial industry is conservative and most users are happy for it to be - sure they'll talk about how they want their bank to have a better online service, but they'll keep banking at the big four names they recognise rather than the upstarts that offer better service.
> Imagine not being able to send E-mail on Easter because nobody at your ISP was there to push bits around or whatever these banks' excuse is?
Here in Japan a lot of government systems work like that.
Still, it's an old, large and hugely complex interconnected system made up of literally thousands of banks employing millions of people and several regulatory bodies run by different federal and state administrations.
Such interconnected systems/networks are notoriously hard to evolve, especially given that, as you also noted, people are often extremely conservative when it comes to their life savings. I don't think it's fair to blame the people working in the industry for all of that or even call them lazy.
Specifically, a lot of measures to prevent something going wrong, because the the damages are far greater when moving things of great value than an email.
You technically can trade stock on a Saturday, just not using all the aforementioned plumbing of a popular stock exchange and brokerage. And you can move money on the weekends, just maybe not with the help of banks because they consider it not worth their while to offer the service on weekends.
It seems silly that bank transactions, stock trades, purchases of insurance or anything like that requires human intervention. It's like an HTTP request requiring a human to put it through. Bonkers.
Yes, I guess there are a few precious hours of our lives that aren't crushed under the perversity of the Protestant work cult, we should seek them out and grind them under the heel.
if you want to do it on NASDAQ/NYSE/... then those businesses have decided they only want to operate certain hours
> Imagine not being able to send E-mail on Easter because nobody at your ISP was there to push bits around
emails stuck in a transfer queue somewhere is not exactly a rare occurrence
Because stock exchanges don't run themselves. There's all kinds of services with humans in the loop, and without these, you'd have a market with much less guardrails than the current public stock exchanges.
You can make a case for such a market being good or bad for society, but it currently simply wouldn't be legal in most countries.
> Why can't I move money from one bank account to another on Sunday?
You can in many countries! In the EU, SEPA Instant is going to be mandatory soon. In the US, I can already do this between two of my bank accounts; most banks unfortunately don't participate yet.
The larger problem seems to be that the US simply does not have customer-initiated account transfers (to third parties) in the first place. In a way, the reason why you can't do bank transfers on the weekends is that you can't even do them on weekdays either.
Nor does Google, yet somehow they are able to handle running 24/7.
Because for you it means spending few minutes to open your app and send and order, for other market participants it means organizing holiday shifts, night shifts, and working long hours. You just cannot keep the strategies running without a human eye, the lack of oversight could be too expensive. Exchanges and banks and big players can afford that (though still, you're making some people more miserable for unclear reason), but can the small prop shop with tens of people trading on multiple exchanges do the same?
What is the cost, in money time, attention, engineering effort of trying to build for five 9s of reliability?
There's a settlement concept called T+2 (soon to be T+1) which is Trade date plus 2 days; this is the day when the cash and shares must be exchanged.
On the Friday morning before last Veteran's Day, we get operations emails from one of the Banks we service that our Settlement dates for the previous day's trades are all incorrect and causing issues for them. I was very confused and very worried that I somehow forgot Veteran's Day.
But... then I realized that it was a Canadian Bank settling US Equities trades!
In their business practice they would settle the trades on a day all the US Banks would not. T+2 for the Canadian Bank was different than T+2 for US Banks. So we resubmitted all the trades with a settlement day of Veteran's Day.
As OP says, managing business calendars is hard for many reasons. I also got really jacked up by a Leap Second, a story for another day.
For the most part you can just buy a Bloomberg feed to get all these calendars, if you can afford it.
Even if you have all the calendars, it’s still non-trivial to apply the calendars correctly for different counterparties based on instrument and function.
And corporate actions are awful. The Bloomberg Data license data sometimes doesn’t match what the terminal has. Bloomberg said they updated it in the terminal but would not fix their bulk data sources since the errors were for actions that happened a while ago.
Your vendor says thing does not happen on holidays or weekends. There might be some other special day where things also do not happen. Keyword is “training day for staff”. Also end of year holidays. They will send you an email about it. Maybe 3. You read the email (important!), and put it in the vendor-specific list of holidays in your code (also important!)
And of course because you like your sanity you use whatever iCal date relativity respecting library to do logic like “the next Wednesday from today” or whatever.
Some things take 1 step. Some take 5. Being able to do something that takes 5 steps without writing a 3000 word screed about the world being broken is the sign of a successful person. Document it, do it, maybe improve it a bit, move on with life.
Deleted Comment
The point is you don't write the is_holiday function, you might write "is_jp_govt_holiday" or "is_mufj_bank_holiday" (though really it might be more "is_mufj_bank_transfer_csv_acceptance_day" or whatever), that might look at "is_jp_govt_holiday". You write functions to their contexts, in a specific way. This lets you write "hacks" that aren't hacks when you get the specific email. A bunch of tiny, specific functions calling other tiny, specific functions.
5-word functions might look gnarly but they will be specific, and you got the magic of autocomplete to save you some typing.
It feels to me like the article sets up the confusion it must resolve by starting from national holidays... I don't think any of my employers have had a holiday schedule that matched another. There's a lot of variation on what holidays companies do and do not recognize, often with compromises around giving longer runs off around Christmas. If you really need to know when another company is doing business I wouldn't have ever thought there was a solution other than "collect a list of holidays each of your business partners observes."
Hell, a lot of US states don't match the federal holidays.
If anything the banking industry is unusually consistent for practical reasons. But even then, I worked for a major US bank and discovered that our holidays didn't quite match another major US bank we did business with!
Deleted Comment
When you consume data and trade in global markets, figuring this out is non-trivial and usually process specific.
The next complication then is that these calendars can change. In Hong Kong, we have typhoons quite occasionally between around August and October, and if the observatory declares a T8 or above, several businesses close, including the stock exchange. It then depends on the exact timing of the raising and lowering of the signal whether there is the usual trading, or half day, or no trading, which implies no closing price, thus an additional holiday for the trading calendar.
To treat holidays properly, one must then take into account the day it was declared for some purposes.
- When Dubai was awarded the 2020 World Expo the following day was declared public holiday (yes, less than 24 hours notice)
- In the UAE, the death of a Sheik is often followed by 3 days of mourning where government offices are closed (this can include a lot of office workers one might not think of as "government", as the respective emirates runs a lot of companies)
- When Qatar scored a goal at the world cup, a public holiday was immediately announced for the following day.
- Even planned public holidays, such as Ramadan (not a public holiday as such, but work does grind to a near halt) and Eid are determined by sightings of the moon, and the start and length of these are often announced days in advance.
No techy discussion of holidays should be considered complete without a mention of Eid. When is Eid? When it’s decided Eid is!
For Dubai at least, they have something like 90% foreign workforce, so it is easy to find people who do not observe Eid.
But in the context of the article, we are talking banks and offices and particularly KYC requirements. I’m a bit unclear how banks are affected by these “tomorrow is an advocate holiday!” announcements, particularly the banking software.
This seems wrong? 5 9s is probably a reasonable benchmark or even unattained goal for Google Search, right?
Google search fails for me perhaps about that.
Now to get five nines for Google a bunch of parts below it have to be more redundant and reliable.
https://cloud.google.com/storage/docs/availability-durabilit...
https://cloud.google.com/storage/sla