  This paper develops a framework to predict toxic trades that a broker
receives from her clients. Toxic trades are predicted with a novel online
Bayesian method which we call the projection-based unification of last-layer
and subspace estimation (PULSE). PULSE is a fast and statistically-efficient
online procedure to train a Bayesian neural network sequentially. We employ a
proprietary dataset of foreign exchange transactions to test our methodology.
PULSE outperforms standard machine learning and statistical methods when
predicting if a trade will be toxic; the benchmark methods are logistic
regression, random forests, and a recursively-updated maximum-likelihood
estimator. We devise a strategy for the broker who uses toxicity predictions to
internalise or to externalise each trade received from her clients. Our
methodology can be implemented in real-time because it takes less than one
millisecond to update parameters and make a prediction. Compared with the
benchmarks, PULSE attains the highest PnL and the largest avoided loss for the
horizons we consider.
