Consider the problem of estimating-theta = theta-(P) based on data chi-(n) from an unknown distribution P. Given a family of estimators T(n,-beta) of theta-(P), the goal is to choose-beta-among-beta-epsilon-I so that the resulting estimator is as good as possible. Typically, beta can be regarded as a tuning or smoothing parameter, and proper choice of beta is essential for good performance of T(n,-beta). In this paper, we discuss the theory of beta-being chosen by the bootstrap. Specifically, the bootstrap estimate of beta, beta-triple-overdot-n, is chosen to minimize an empirical bootstrap estimate of risk. A general theory is presented to establish the consistency and weak convergence properties of these estimators. Confidence intervals for theta-(P) based on T(n,beta-triple-overdot-n) are also asymptotically valid. Several applications of the theory are presented, including optimal choice of trimming proportion, bandwidth selection in density estimation and optimal combinations of estimates.