This paper presents a dynamic cash flow management problem with uncertain parameters in a finite planning horizon via two-stage stochastic programming. We propose a risk-neutral mixed-integer twostage stochastic programming model and risk-averse versions based on the minimax regret and conditional value-at-risk criteria. The models support decisions in cash management that deals with different grace periods, piecewise linear yields and uncertainty in the exchange rate of external sales. The developed approach is applied to a real-world stationery company in Brazil. Numerical results assess the trade-off between risk and return, showing that the optimization models generate effective solutions for the company's treasury with reduced risks, which might be appealing for companies from other sectors as well. Keywords: Cash flow management, mixed-integer programming, stochastic programming, minimax with regret, conditional value-at-risk, stationery industry.During the 2008 financial crisis, the Federal Reserve (Fed) cut interest rates rapidly to zero, resulting in the dollar being at its most undervalued level in decades. In 2014, when the economy was recovering, the Fed began to show signs that it would normalize its monetary policy, causing an intensive realignment of exchange rates. In less than a year, the dollar appreciated no less than 20% against the major global currencies, a trend that naturally affected emerging currencies such as the Brazilian Real. Thus, large exchange variations have significant impacts on companies, especially when considering the predictability of their cash flows. There are many risks and uncertainties on the horizon and the volatility of the exchange rate will continue at high levels.In order to handle uncertainty and risk in this context, this paper develops risk-neutral and risk-averse stochastic programming (SP) models to support tactical decisions in cash-flow management problems that encompass grace periods, piecewise linear yields and uncertainty in the exchange rate of external sales. The risk-averse models are based on the minimax with regret and on the conditional value-atrisk (CVaR) criteria. Whereas the minimax with regret model provides solutions from a worst-case perspective when the probabilities of the scenarios are not known (or not reliable), the CVaR model aims at minimizing the risk of a solution influenced by a bad scenario with a low probability of occurrence. The risk-averse models are particularly appealing for providing less risky solutions, which might be reflected by the mitigation of the profit dispersion across a finite set of scenarios. The performance of the models is analyzed vis-a-vis a real-world stationery company in Brazil.The developed risk-neutral and risk-averse stochastic programming models are based on deterministic network flow models with gains and losses, which have been used to represent cash flow management problems in different settings, as discussed in Golden et al. (1979), Crum et al. (1979, Srinivasan and Kim (1986), Pacheco andMorabito...