We develop an efficient Monte Carlo simulation-based methodology for value-at-risk (VAR) and sensitivity analysis of mortgage-backed securities (MBS) that employs an importance sampling technique developed for quadratic VAR models. Our approach, whose validity is derived from a fundamental result in perturbation analysis, is applicable to any analytic interest rate and prepayment model, and more generally to any path-dependent cashflows that admit analytic gradients. We compare the accuracy and computational performance of our VAR estimators with those obtained via finite-difference gradient approximation schemes.