Silver nanowire (AgNW) networks are efficient as flexible transparent electrodes, and are cheaper to fabricate than ITO (Indium Tin Oxide). Hence they are a serious competitor as an alternative to ITO in many applications such as solar cells, OLEDs, transparent heaters. Electrical and optical properties of AgNW networks deposited on glass are investigated in this study and an efficient method to optimize them is proposed. This paper relates network density, nanowire dimensions and thermal annealing directly to the physical properties of the nanowire networksusing original physical models. A fair agreement is found between experimental data and the proposed models. Moreover thermal stability of the nanowires is a key issue in thermal optimization of such networks and needs to be studied. In this work the impact of these four parameters on the networks physical properties are thoroughly investigated via in situ measurements and modelling, such a method being also applicable to other metallic nanowire networks. We demonstrate that this approach enables the optimization of both optical and electrical properties through modification of the junction resistance by thermal annealing, and a suitable choice of nanowire dimensions and network density. This work reports excellent optical and electrical properties of electrodes fabricated from AgNW networks with a transmittance T = 89.2% (at 550 nm) and a sheet resistance of Rs = 2.9 Ω □-1, leading to the highest reported figure of merit.