I know this is technically a planetary science question rather than astronomy but this still seemed like the best forum to ask it in. Do we know why planets have magnetic fields? Does it have anything to do with conductive matter content or ferrous / metallic content? Do purely silicate asteroids have magnetic fields? Would a large body of water afloat in space have a magnetic field? Does it have anything to do with proximity to solar/stellar radiation?