Several works have shown that series and parallel elasticity can reduce peak power and energy consumption in prosthetic ankles. Setting the right stiness of the elastic elements is essential to unlock this potential. In this work, we perform a thorough optimization of series and parallel elastic elements for a prosthetic ankle driven by a geared DC motor. Through simulation, we study the eect of drivetrain limitations and compare dierent mechanical and electrical optimization objectives. The results highlight the importance of selecting a motor and gearbox in an early stage of the design process. Drivetrain inertia causes peaks in electrical power in the swing phase, which would go unnoticed in an optimization based solely on mechanical power. Furthermore, limitations of the drivetrain and controller reduce the range of applicable springs. This has a direct inuence on the optimized spring stiness values, which, as a result, are dierent from other works. Overall, the results suggest that, by integrating motor selection into the early stages of the design process, designs can be made lighter, more compact and more ecient.