This paper evaluates a parametric analysis towards compliance with the nZEB standard, which in Spain is defined by the latest update of the Technical Building Code. This regulation is critically assessed regarding its ability to promote the concept of cost optimization, promote renewable energy sources and minimize primary energy consumption in the residential sector. To this end, a virtual building was defined and multiple designs were evaluated using DesignBuilder software. A set of 170 alternative scenarios was established and parametrically evaluated for five cities representing the five climatic zones of inland Spain (Bilbao, Burgos, Seville, Madrid and Almeria). The results were evaluated focusing on cost-cost effectiveness and primary energy consumption values for the different scenarios, evaluating them in relation to the minimum requirements set by the regulation. The great potential of photovoltaic energy is highlighted, which allows negative values to be obtained for the two Equivalent Uniform Annual Costs due to the cost avoided through self-consumption. This fact makes the optimal designs tend to electrification, specifically through air and ground source heat pumps. It is worth mentioning that the new Code has only established a minimum target for renewable self-consumption in the residential sector, which should be reinforced in future updates.