Does the "hot wire" of an electric fence need to make a complete loop to deliver a shock? Or, may I terminate the wire on an insulator where the fence ends at a building?

Thanks