In this paper we consider the problem of a firm that faces a stochastic (Poisson) demand and must replenishfrom a market in which prices fluctuate, such as a commodity market. We describe the price evolution as acontinuous stochastic process and we focus on commonly used processes suggested by the financial literature,such as the geometric Brownian motion and the Ornstein-Uhlenbeck process. It is well-known that under variablepurchase price, a price-dependent base-stock policy is optimal. Using the single-unit decomposition approach, weexplicitly characterize the optimal base-stock level using a series of threshold prices. We show that the base-stocklevel is first increasing and then decreasing in the current purchase price. We provide a procedure for calculatingthe thresholds, which yields closed-form solutions when price follows a geometric Brownian motion and implicitsolutions under the Ornstein-Uhlenbeck price model. In addition, our numerical study shows that the optimalpolicy performs much better than inventory policies that ignore future price evolution, because it tends to placelarger orders when prices are expected to increase.