We estimate a New Keynesian small open economy DSGE model for South Africa, using Bayesian techniques. The model features imperfect competition, incomplete asset markets, partial exchange rate pass-through, and other commonly used nominal and real rigidities, such as sticky prices, price indexation and habit formation. We study the effects of various shocks on macroeconomic variables, and calculate the optimal Taylor rule coefficients using a loss function for the central bank. We find that the optimal Taylor rule places a heavier weight on inflation and output than the estimated Taylor rule, but almost no weight on the depreciation of currency.