I'm doing some work in which the two-sample Kolmogorov-Smirnov test statistic
$$KS^x_{n_1, n_2} = \sup_x | F_{1,n_1}(x) - F_{2, n_2}(x) |$$
takes on a specific economic meaning. I have computed these test statistics for two variables on two sub-samples of my data and would now like to know whether the difference of KS statistics across the two variables is significant. That is, in addition to the test statistic just mentioned I also have
$$KS^y_{n_1, n_2} = \sup_y | F_{1,n_1}(y) - F_{2, n_2}(y) |$$
where $y$ is comparable in interpretation to $x$ and I want to do a hypothesis test of the type
\begin{align} H_0 &: KS^x - KS^y = 0 \\ H_1 &: KS^x - KS^y \neq 0. \end{align}
For the regular two-sample one-variable KS test, the critical value is given by
$$\overline{KS} = \sqrt{- \ln\left(\frac{\alpha}{2}\right) \times \frac{1+\frac{n_2}{n_1}}{2 n_2}}.$$
I don't yet see a way of deriving a critical value for the difference test I'm trying to do.
Optional details on the above-mentioned economic interpretation
In my application, the KS statistic captures the difference in distribution between returns preceding sell orders and the returns preceding buy orders on an investment portfolio. The economic interpretation is that it measures the extent to which people respond to realized returns (“reactivity”) in ways that are consistent with trying to time the market. The intuition behind this interpretation is that buying and selling that is not reactive to the market and instead based only on household liquidity, would amount to returns before buys and returns before sells both being random samples from the return distribution. The KS test would then not reject the null of identical distributions. (A simple way to think about household liquidity is the idea that people buy the portfolio from excess cash when they inherit money; they sell the portfolio if they want to buy a car. These things would not have any obvious relationship with market returns.)
With the interpretation that the KS test statistic measures investor reactivity to market returns in mind, I have computed the difference of the two statistics for different stock indices. This difference, if it is significant, means that investors react more strongly to index A than to index B. That's where the need for this test comes from.
If an alternative measure of difference in distribution is more amenable to this kind of test, it could be used as an alternative to KS.