In this paper we present several algorithms related to the global total least squares (GTLS) modelling of multivariable time series observed over a finite time interval. A GTLS model is a linear, time-invariant finite-dimensional system with a behaviour that has minimal Frobenius distance to a given observation. The first algorithm determines this distance. We also give a recursive version of this, which is comparable to Kalman filtering. Necessary conditions for optimality are described in terms of state space representations. Further we present a Gauss-Newton algorithm for the construction of GTLS models. An example illustrates the results.