site banner

Culture War Roundup for the week of December 9, 2024

This weekly roundup thread is intended for all culture war posts. 'Culture war' is vaguely defined, but it basically means controversial issues that fall along set tribal lines. Arguments over culture war issues generate a lot of heat and little light, and few deeply entrenched people ever change their minds. This thread is for voicing opinions and analyzing the state of the discussion while trying to optimize for light over heat.

Optimistically, we think that engaging with people you disagree with is worth your time, and so is being nice! Pessimistically, there are many dynamics that can lead discussions on Culture War topics to become unproductive. There's a human tendency to divide along tribal lines, praising your ingroup and vilifying your outgroup - and if you think you find it easy to criticize your ingroup, then it may be that your outgroup is not who you think it is. Extremists with opposing positions can feed off each other, highlighting each other's worst points to justify their own angry rhetoric, which becomes in turn a new example of bad behavior for the other side to highlight.

We would like to avoid these negative dynamics. Accordingly, we ask that you do not use this thread for waging the Culture War. Examples of waging the Culture War:

  • Shaming.

  • Attempting to 'build consensus' or enforce ideological conformity.

  • Making sweeping generalizations to vilify a group you dislike.

  • Recruiting for a cause.

  • Posting links that could be summarized as 'Boo outgroup!' Basically, if your content is 'Can you believe what Those People did this week?' then you should either refrain from posting, or do some very patient work to contextualize and/or steel-man the relevant viewpoint.

In general, you should argue to understand, not to win. This thread is not territory to be claimed by one group or another; indeed, the aim is to have many different viewpoints represented here. Thus, we also ask that you follow some guidelines:

  • Speak plainly. Avoid sarcasm and mockery. When disagreeing with someone, state your objections explicitly.

  • Be as precise and charitable as you can. Don't paraphrase unflatteringly.

  • Don't imply that someone said something they did not say, even if you think it follows from what they said.

  • Write like everyone is reading and you want them to be included in the discussion.

On an ad hoc basis, the mods will try to compile a list of the best posts/comments from the previous week, posted in Quality Contribution threads and archived at /r/TheThread. You may nominate a comment for this list by clicking on 'report' at the bottom of the post and typing 'Actually a quality contribution' as the report reason.

6
Jump in the discussion.

No email address required.

DST is idiotic because it absolutely fucks up any historical time series analysis. E.g. if you're looking at market data for a stock listen in London it opens at 08:00 UK time and closes at 16:30 UK time. Now imagine you wish to do some correlations with a similar stock but listed at the NYSE, which opens 9:30 NY time and closes 16:00 NY time. What people might not realize is the US DST and UK (and European) DST are offset by a week each year so if you're using UTC as your "base" timezone then for each year we have 4 different step functions for the hours where our stocks are open/closed for trading.

If you are dealing with 10 years of historical data this suddenly becomes an absolute pain to deal with (because e.g. for the UK clocks change on the last Sunday of March/October, so now you need your script to have access to a calendar module to work out exactly what dates these were for each of the years). Without DST (shakes fist) we wouldn't need these 40 different separate time regimes for the 10 years of data but could simply hardcode in the opening hours for both our stocks in terms of UTC because they wouldn't change. Much much easier!

I don't think you'll find "Won't someone think of the quants" as a very compelling argument either way.

DST is idiotic because it absolutely fucks up any historical time series analysis.

What sort of half-baked script-kiddey nonsense are you using to do your analysis?

I don't think I've ever seen a professionally developed program (or competent open source project) that didn't store time data in UTC, Zulu, or some other standardized epoch, unless it was an embedded application running off a hardware tickcount.

Our data is stored in UTC. Still fucks up time series analysis (in fact it fucks up time series analysis more than if it were stored in London time, but using UTC is the correct choice) because exchanges open and close based on local time which means that 08:00:15 UTC means 15 seconds after the opening bell for half the year and for the other half an hour and fifteen seconds after the bell. So if you want to do some sort of study based on stock behaviour shortly after the open and you just use the UTC timestamp column from the database half your data will be straight up wrong. Hence necessitating extra work to handle DST properly.

Our data is stored in UTC. Still fucks up time series analysis

I dont see how this happens in a competently run organization. Normalizing your inputs is like basic sanitation, if you can't manage that, how do you manage anything else?

Had it ever occured to you that you can just do all the math/analysis in UTC and then adjust the display output to local time?

Yes, that's what I do. The problem is with converting London time to UTC which is what gets fucked up by the existence of DST unless you use some sort of timezone localisation. If the exchanges opened at 08:00 UTC and closed at 16:30 UTC each business day regardless of DST there would be no problem. Instead because of DST they are opening at 07:00 UTC for half the year. The issue is with them, not us.

Just about every serious programming language includes zoneinfo related functions in the standard library.

The serious programmers that use zoneinfo are lacking. Not the library funcitons.

Yes I agree, e.g. in Python I use pd.DatetimeIndex.tz_localize to help me with this (after spending my first two years as a quant doing things manually before throwing my hands up and realizing that this is a common problem everyone must be having, so someone somewhere has probably created a good solution).

However needing to import it and write like an extra 10 lines of code for every single project I wouldn't need to do if DST (shakes fist) didn't exist adds up over time to become a serious pain in the ass. Plus now my script has an extra dependency and is more susceptible to code bitrot over time as it'll stop working if pd.DatetimeIndex gets its behaviour changed or deprecated.

Also SQL doesn't play nicely with timezones at all, so the problem still very much exists for SQL scripts unless you only want to use SQL to pull the data and will do all your analysis with the pulled data in a different language.

Yes I agree, e.g. in Python I use pd.DatetimeIndex.tz_localize

Well, that's your mistake - I'm talking about the standard library, not pandas. No dependency, no bitrot. No need to localize any datetimes until you're displaying them, so as long as you aren't working with naive datetimes it's pretty low overhead.

Also SQL doesn't play nicely with timezones at all, so the problem still very much exists for SQL scripts unless you only want to use SQL to pull the data and will do all your analysis with the pulled data in a different language.

As SQL is fundamentally not a serious language, it indeed does not support zoneinfo.