A black box is a function or system whose internal process is unknown or deliberately ignored while its inputs and outputs remain observable. A trading system can be treated this way: provide an exchange and observe execution_cost, without modeling every interaction among traders, exchanges, and customers. section 2.1.1
Trading simulator
The simulator accepts an exchange name and returns a noisy execution cost. With np.random.seed(17), trading_system("ASDAQ") returns 12.28 mips; changing the seed can change the result. The seed makes a stochastic black-box measurement reproducible for comparison. section 2.1.1
Black-box treatment is useful when internal dynamics are complicated, unavailable, or irrelevant to the experiment. A parameterized JIT compiler can therefore be evaluated through parameter values and measured CPU times alone, even when measurements fluctuate because of other processes and caching. section 6.1.1
Black-box reasoning changes what can be optimized and how:
- Bayesian optimization searches for global optima using measurements without relying on the system's internal dynamics. section 6.1.1
- A/B testing, response-surface methodology, and multi-armed bandits can optimize black-box systems, but are not generally called optimizers because they are not automated. section 6.1.1
- Systems with observable actions, contexts, and rewards expose more structure than a pure input-measurement interface and support different optimization strategies. section 6.1.1





