To fully consider the complementary role of different energy sources and reduce the curtailment of renewable energy (RE) in high RE penetration system, a hierarchical optimization algorithm is proposed to simultaneously optimize the capacity of RE generation and energy storage system (ESS). Time sequence simulation (TSS) technology is adopted to fully consider the regional RE resource characteristics and makes the model more reliable. An optimization model for evaluating ESS capacity is established in lower level. To overcome the high dimensional complexity of time sequence data, this paper reformulates this sub-model as a consensus problem, which can be solved by a distributed manner to minimize the system total investment cost. In upper level, the model for assessing the proportion of wind and solar capacity is developed by maximizing the RE generation. The golden section Fibonacci tree optimization (GSFTO) algorithm is utilized to improve the efficiency and solution accuracy. The results show that the algorithm and model are feasible and applicable for the purposes, which can provide a useful guidance for the development of power generation and the energy storage capacity in high RE penetration system.