The standard literature concerning intertemporal optimization in international finance is based upon certainty equivalence, and ignores risk and uncertainty. It therefore is not helpful concerning risk management and evaluation of the risk involved in the holding of international short-term debt. We solve a modification of the standard model of intertemporal optimization in discrete time, in an environment where the return to capital is stochastic. We impose the constraint that there be no default on the short-term debt. Thereby we derive benchmarks for optimal foreign debt, which will not be defaulted. We do not claim that the optimal debt is the same as the actual debt incurred. Witness the defaults and debt crises. Insofar as the actual debt exceeds the benchmark, the risk of default is increased. The main reasons for a deviation between the actual debt and the optimal debt is that the borrower is overly optimistic about the distribution function of the return to investment, and does not optimize subject to a no default constraint. We also consider an intertemporal optimization model involving extreme prudence. The lender, who may be an institutional investor, has infinite risk aversion and will only lend for projects where the profitability of the investment is almost sure. In this case also, we derive the optimal debt, which is our benchmark for risk management.