Although sea and ocean waves have been widely acknowledged to have the potential of providing sustainable and renewable energy, the emergence of a self-sufficient and mature industry is still lacking. An essential condition for reaching economic viability is to minimise the cost of electricity, as opposed to simply maximising the converted energy at the early design stages. One of the tools empowering developers to follow such a virtuous design pathway is the techno-economic optimisation. The purpose of this paper is to perform a holistic optimisation of the PeWEC (pendulum wave energy converter), which is a pitching platform converting energy from the oscillation of a pendulum contained in a sealed hull. Optimised parameters comprise shape; dimensions; mass properties and ballast; power take-off control torque and constraints; number and characteristics of the pendulum; and other subcomponents. Cost functions are included and the objective function is the ratio between the delivered power and the capital expenditure. Due to its ability to effectively deal with a large multi-dimensional design space, a genetic algorithm is implemented, with a specific modification to handle unfeasible design candidate and improve convergence. Results show that the device minimising the cost of energy and the one maximising the capture width ratio are substantially different, so the economically-oriented metric should be preferred.