The invention relates to a hip joint prosthesis comprising a shaft-like section that can be inserted into a femur, and a proximally arranged end cap assembly which closes a hollow space of the hip joint prosthesis. According to the invention the end cap assembly carries a coil assembly that is connected to a first electrode with a first pole and to a second electrode with a second pole. The first and the second electrodes enclose surfaces of the hip joint prosthesis, and in a state in which the end cap assembly closes the hollow space of the hip joint prosthesis, the coil assembly is predominantly arranged in the hollow space.