Date of solstices pre-0 AD I’ve written a script based on Meeus’s Astronomical Algorithms to calculate the position of the sun, moon etc. up to about 4000 BC.
Everything looks good, except when I go to 4000 BC the solstice are about a month after expected dates (they fall mid-July and mid-January.
I checked through this forum and came across this: https://astronomy.stackexchange.com/a/13009 . I looked at the results and saw that we have very similar dates.

Does the precession mean the solstices and equinoxes can shift to this extent? Or have I forgotten a step?

Many thanks.
Sounds like Julian Calendar slippage.

The Gregorian Calendar, the one we use now, was created to fix a problem with the Julian Calendar: The fact that the Solar Year wasn't exactly 365.25 days. As a result, compared to the calendar year, the date of the Vernal Equinox (and more importantly at the time, Easter) was slipping forward. 

To remedy this, ten calendar days in 1582 (or up to thirteen calendar days in 1918, depending on how long a particular country waited to adopt the Gregorian Calendar) were omitted, and the Gregorian Calendar added a modification to the Julian calendar's rule of One leap year every 4 years: No leap year on century-years that aren't divisible by 400.

If your code automatically switches from Gregorian to Julian Calendar at the appropriate year, the adoption of the Julian Calendar probably winds up at about the expected days when the Julian calendar was adopted mid-first-century BCE.

But every 400 years further back, your calendar is slipping about three extra days.

And at 4000 BCE, that's thirty days.