What options are there for finding out what the time lag is for different time series? I'm looking at market data here - for example, if sugar does bad in a year, it's likely that soda might be hit the next year. I've come across cross-correlation, but am not sure how to go about using it. Are there any libraries that perform fast cross-correlation if that is the only way to go?
The cross-correlation between two time can be computed but is of little(none) value in assessing the time delay as statistical tests for the cross-correlation coefficients require normality (i.e. independence of successive observations ) and more. One can pre-whiten the "cause" series via an ARIMA model to create a surrogate x and then apply the ARMA coefficients to the Y variable (appropriately made stationary) to get a surrogate y. Proceed to get meaningful cross correlation coefficients which may suggest the time lag between the originally measured series (Y and X). This is referred to as Transfer Function Model Identification.
I don't know if there are other methods, but cross correlation is definitely a classic "go-to" technique that you should try first.
MATLAB has a library function to do cross correlation in their "signal processing toolbox", however, you will likely need to buy a license for both the basic MATLAB GUI, plus an additional license for the toolbox as well. It's possible that they may have a 30-day free trial option or something like that, if this is just a one-time project for you.
There is also GNU Octave, which is designed to be a freeware competitor to MATLAB. Although I've never used Octave personally and can't really recommend it one way or another, nevertheless, I do know that many of the core pieces of the MATLAB toolboxes often have identical counterparts in Octave, especially for really basic, bread-and-butter, textbook functions such as cross-correlation. As in MATLAB, the corresponding function that you would want in Octave is also called xcorr.
Python numpy/scipy also appears to have two functions that do this as well: numpy.correlate and scipy.signal.correlate. In principle, I think you should be able to use either one, although if you want to be really thorough, it would probably be wise to try both of them, and verify that they do indeed give you the same answer.
Look at cross spectral analysis, and particularly coherence. It is similar to cross-correlation, but you wanted to try something else :)
You can also analyze phase shifts, to find which signal is leading the other, get hints to causality etc.