This paper presents an analysis and optimization of Airborne Wind Energy Systems (AWESs), designed to maximize the Annual Energy Production (AEP) and, in the second part, the economic profit. A gradient-based optimization algorithm is used to perform the preliminary design of the main AWES sub-systems. A global sensitivity analysis is carried out to study how the design process, represented by the optimization problem, is influenced by aleatory and epistemic uncertainties. In particular, Ground-Gen and Fly-Gen AWESs are studied with a unified model to allow for a quantitative comparison. In the first part of the work, an ideal hybrid AWES design with ground and on-board power generation is considered. With this approach, the common characteristics of Ground-Gen and Fly-Gen AWES designs that maximize AEP are found. In the second part, Ground-Gen and Fly-Gen AWES optimal economic designs are analyzed individually. It is found that a fully developed AWES has strong potential to be highly competitive in the energy market, by providing cheap renewable energy. Fly-Gen AWESs are found to be slightly more profitable than Ground-Gen if the airborne unit is not replaced often. The main physical and economical characteristics of optimal designs are highlighted.