I got the idea to make the result smaller instead of making the data type larger. Changing from 39000 to 41200 moved the baseline to a more recent date in Excel and cured the overflow error. Everything's running ok now, we'll see how it goes tomorrow when the market opens. If it holds together, I can mark this post as solved.