The paper deals with the problem of reconstructing the tree-like topological structure of a network of linear dynamical systems. A distance function is defined in order to evaluate the "closeness" of two processes and some useful mathematical properties are derived. Theoretical results to guarantee the correctness of the identification procedure for networked linear systems characterized by a tree topology are provided as well. The paper also suggests the approximation of a complex connected network with a tree in order to detect the most meaningful interconnections. The application of the techniques to the analysis of an actual complex network, i.e. to high frequency time series of the stock market, is extensively illustrated.