‘Esmeralda’ is an orange fleshed peach cultivar primarily used for juice extraction and secondarily used for the fresh fruit market. Fruit yield and quality depend on several local environmental and managerial factors, mainly on nitrogen, which must be balanced with other nutrients. Similar to other perennial crops, peach trees show carryover effects of carbohydrates and nutrients and of nutrients stored in their tissues. The aims of the present study are (i) to identify the major sources of seasonal variability in fruit yield and qu Fruit Tree Department of Federal University of Pelotas (UFPEL), Pelotas 96010610ality; and (ii) to establish the N dose and the internal nutrient balance to reach high fruit yield and quality. The experiment was conducted from 2014 to 2017 in Southern Brazil and it followed five N treatments (0, 40, 80, 120 and 160 kg N ha−1 year−1). Foliar compositions were centered log-ratio (clr) transformed in order to account for multiple nutrient interactions and allow computing distances between compositions. Based on the feature ranking, chilling hours, degree-days and rainfall were the most influential features. Machine learning models k-nearest neighbors (KNN) and stochastic gradient decent (SGD) performed well on yield and quality indices, and reached accuracy from 0.75 to 1.00. In 2014, fruit production did not respond to added N, and it indicated the carryover effects of previously stored carbohydrates and nutrients. The plant had a quadratic response (p < 0.05) to N addition in 2015 and 2016, which reached maximum yield of 80 kg N ha−1. In 2017, harvest was a failure due to the chilling hours (198 h) and the relatively small number of fruits per tree. Fruit yield and antioxidant content increased abruptly when foliar clrCu was >−5.410. The higher foliar P linearly decreased total titratable acidity and increased pulp firmness when clrP > 0.556. Foliar N concentration range was narrow at high fruit yield and quality. The present results have emphasized the need of accounting for carryover effects, nutrient interactions and local factors in order to predict peach yield and nutrient dosage.