# Can the dependent samples t test be used for this problem?

Short story:

I have 2 sets of data:

• Set 1: Daily data of stock market returns (eg. [1%, 1.2%, -2%])
• Set 2: Those same stock market returns, multiplied by a number (eg. [2%, 0.6%, -1%] which equals [1% * 2, 1.2% * 0.5, -2% * 0.5])

I want to test the hypothesis that data set 1 has a mean that's equal to the mean of data set 2 when you adjust for the variance.

Can the dependent samples t test be used for this? If not, how can I do it?

Long Story:

I want to test the profitability's significance of a strategy that has a variable portfolio weight. That weight is dependent on the volatility of the past X days of data, and the adjustment is made so that the expected volatility is equal to a given target.

In the data set 1, I've got 20K+ days of data where the average daily return is ~0,025% with a daily standard deviation of ~0,63%.

On data set 2, when I adjust for the 0,63% standard deviation, the return is ~0,0024%. Intuitively, it would seem that with 20K points of data, the difference in the means would be pretty significant because the two data sets are always going to be very correlated (.8+ in this case). But the p-value is .50, random.

I would think that this t test isn't appropriate because the data set 1 has a direct influence on the results of the data set 2, in a way that doesn't happen in the other cases where this test is applied. I was thinking about making a Monte Carlo simulation where I run data set 1, multiply by random numbers with the same properties as the numbers that I used in data set 2 and then see the outcomes. I may be saying something silly though, tell me what you think!

Thank you.

• p-values usually have worth when you reject the null hypothesis, i.e. p<0.05, but your p-value is significantly far from that so that indicates good confidence. Have you considered Welch's t-test which accounts for the different variances of two series? en.wikipedia.org/wiki/Welch%27s_t-test – Attack68 Jun 21 '18 at 10:42
• My conundrum is that I should be rejecting the null hypothesis because of the huge discrepancy between the data sets (mean of 0.025% vs 0.0024% when I adjust for the variance with 20K+ data points), especially when I consider the fact that the two data sets are always going to be highly correlated. The Welch's t-test assumes that the samples are independent. Am I right to assume that in this problem is different from your typical dependent samples example (differences in the same patients before and after treatment)? – David Pinho Jun 21 '18 at 16:20

It sounds like you want to test the hypothesis of equal Sharpe Ratio (or rather, the population analogue thereof). The usual test for this, with paired observations, is via the Delta method, as first described by Jobson & Korkie, and later by Leung & Wong, among others. In R you can perform this test via SharpeR::sr_equality_test. As a caution, the power of this test increases as the correlation of the assets goes to 1, as outlined in section 4.3 of the Short Sharpe Course; with increased statistical power comes increased statistical responsibility!

Based on your comment I'm a little puzzled, since if you have a set of observations, $x_t$, and you derive an estimator of the population mean: $\bar{x} = \frac{1}{N}\sum_t x_t$, and then you take some scalars $a_t$ conditioned on a variance then your new estimator is $\bar{x_a} = \frac{1}{N} \sum_t x_ta_t$.

You are now asking the question is $\bar{x} = \bar{x_a}$. The answer is almost surely no, it isn't. And no tests are required, its mathematically defined.

But if you treated $a_t$ as some random variable you could define some statistics.

For example suppose that $a_t$ were i.i.d from a $\mathcal{N} (1, \sigma^2)$ then the expectation of the new mean is the same: $E[\bar{x_a}|x_t] = \bar{x}$, but this depends on the expectation of $a_t$ being 1.

And it has a variance of the following: $$Var(\bar{x_a}) = \sum_{i,j} \frac{x_i x_j}{N^2} Cov(a_i, a_j)$$

Since we said that $a_t$ was iid then $Cov(a_i,a_j)=\delta_{ij} \sigma^2$, so that the $Var(\bar{x_a}) = \frac{\sigma^2}{N^2}\sum_t x_t^2$.

So that in this case, $\bar{x_a} \sim \mathcal{N}(\bar{x}, \frac{\sigma^2}{N^2}\sum_t x_t^2)$.

However, this all hinged on the expectation of $a_t$ being 1, if it isn't then technically the expectation of the 'new' mean is not the same as the 'old' mean. I would suggest a statistical test that measures whether your $a_t$ (if assumed to be random variables) have a mean of 1, and for that you can use one sample students t-test (if your $a_t$ are normally distributed, which you can also test with a normality test).

• Yes, $a_t$ is not a static variable, but $\bar{a_t}$ also not 1 -- it will depend on $Var(x_t)$ and the target $Var(x_a)$ that I set. I want to test the hypothesis that $E[\bar{x_a}| Var(x_t) = Var(x_a)] = \bar{x_t}$. – David Pinho Jun 21 '18 at 22:00
• It won't be, guaranteed, unless $E[\bar{a_t}]=1$. – Attack68 Jun 22 '18 at 4:36
• But if $x_a = x_t * a_t$, this will mean that $Var(x_a) = Var(x_t) * \bar{a_t}$. So when I adjust for the variance so that $Var(x_t) / Var(x_a) = 1$, that's equivalent to $E[\bar{a_t}] = 1$ because $Var(x_t) / Var(x_a) = \bar{a_t}$. Given this, it seems to me that $E[\bar{x_a} | Var(x_t) = Var(x_a)] = \bar{x_t}$, correct? Am I missing something? – David Pinho Jun 22 '18 at 9:46