The invention relates to an endoprosthesis (10) for a tubular bone, in particular for a femoral stump, having a shaft (12) and a head part (14) which can be secured to the shaft. The shaft is designed to be inserted into the medullary cavity of the tubular bone. The head part has a support surface (40) which is molded on the head part and which is designed to support a distal end surface of the tubular bone in the implanted state of the endoprosthesis. The head part and the shaft are secured to each other in that an integral connection pin (42) of the head part is inserted into a distal recess in the shaft, said recess being open towards the distal end. Furthermore, an endoprosthesis set is provided comprising a number of different shafts and head parts, wherein the recesses and connection pins are shaped such that each shaft can be connected to each head part. (Fig. 1)