In this paper, we employ a fundamental principle of classical mechanics known as the least-action principle to model the complex relationship between expected load and expected price in electricity spot markets. We consider markets that feature a centralized electricity dispatch system that optimizes grid parameters to determine the minimum spot nodal prices. Using the example of the Australian National Electricity Market (NEM) and a calibrated stochastic demand model, we develop a mathematical approach that determines the price evolution, including intraday and seasonal features. The proposed model links the concept of a deterministically modeled price with stochastically modeled demand. The demand-price relationship is complex, and it must include not only the level of demand within the constraint of maximum generating capacity, but also the change in demand within the constraints of generator ramping rates. While this paper uses the NEM as an example, the proposed approach is applicable to any energy market that satisfies the above conditions.