We evaluate the effectiveness of financial policy rules in a small open economy with production, liability dollarization and “unconventional shocks” (global liquidity shifts and news about future fundamentals). Tradable and nontradable final goods are produced with tradable inputs. Debt is denominated in units of tradables and cannot exceed a fraction of the market value of total income. Optimal policy has a macroprudential or ex-ante component (a debt tax levied at date t only when the credit constraint may bind at t + 1), and ex-post components (sectoral production taxes/subsidies used when the constraint binds). The optimal policy reduces sharply the frequency and severity of financial crises but is also very complex. Simple policies are less effective and can be welfare reducing.