# sharpe ratio from regression

Suppose I run a regression of returns of an asset vs some signal. Is there a way to estimate Sharpe ratio of a strategy based on this signal from this regression? Assuming that signal is a real number and we size in proportion to the signal (i.e. not a constant size of trades).

• You're missing a step. Given the signals, you should simulate actual trades and calculate Sharpe ratio based on the returns of these trades. – Helin Sep 11 '18 at 7:47
• @Helin why does he need to simulate trades, if he already has the returns – LazyCat Sep 11 '18 at 17:53
• He has the returns to the asset (buy and hold returns), not the returns to actively trading (getting in and out of) the asset according to this signal. – Alex C Sep 11 '18 at 20:00
• @Helin, so thats a part of the question- the returns of the strategy are derived from the returns of the asset based on this regression. The question is if it is possible to estimate the mean and variance of those? – dayum Sep 11 '18 at 21:10
• @AlexC Assuming no transaction costs, aren't those the same? – LazyCat Sep 12 '18 at 14:08

No, your results will depend on how you use the signal.

For example, do you go long/short a fixed amount based on the sign of the signal? Do your position sizes get bigger the stronger the signal is?

• HI: I think you would need to know how you would exit when the return is not realized ? do you get out right away ? and also, how do you enter ? when the return is above X basis point ? My guess is that it's not possible but, if it is, I'd love to see how. an interesting question for sure. – mark leeds Sep 11 '18 at 5:12
• Be aware that the Sharpe ratio is leverage invariant. If your trading strategy gives you some return $R$, then levering or delevering $R$ using the risk free rate will not change the Sharpe ratio. The position sizes getting bigger or smaller doesn't change the Sharpe ratio unless the relative weights of the risky portfolio change. – Matthew Gunn Sep 11 '18 at 17:48
• That's true if you're talking about uniformly scaling all positions. If one strategy is binary long/short and the other takes bigger position sizes when the signal is strong, the two strategies may have different Sharpe Ratios. In fact, if the signal does not work when the level is poorly when the level is low, but works well when it is strong, one version of the strategy could have a negative expected return while the other has a positive expected return. – Charles Fox Sep 11 '18 at 19:31

### Maximum Sharpe ratio also depends on the conditional covariance matrix

Let's say you have some signal $X$ which gives you a conditional expectation function $\mu(X) = \operatorname{E}[R \mid X ]$.

Perhaps of interest is the maximum Sharpe-Ratio portfolio which can be constructed from a set of $n$ returns $R_1, \ldots, R_n$ given this signal $X$. That portfolio would be the classic tangency portfolio. The tangency portfolio is a function of expected returns $\mu(X)$ and the covariance matrix $\Sigma(X) = \operatorname{Var}( R \mid X)$.

Theoretically speaking, if your signal gave you different expected returns for two perfectly correlated assets, you could construct an arbitrage and obtain an infinite Sharpe ratio (assuming the expected returns and covariances are correct). The point is, the Sharpe ratio will depend on how the returns in your portfolio covary.

### (Obvious) point of caution with mean-variance optimization

As you're undoubtedly aware, naive mean-variance optimization suffers from a wacky weight problem: you tend to get insane portfolio weights. Estimates of expected returns and even covariance tend to be highly imprecise, and you hence have a garbage in, garbage out problem. What's a sensible alternative/fix is a huge topic.

• I think the person who asked the question needs to be clearer. Is he building a portfolio based on the regression and then assuming buy ( and short ) and hold and then letting it run wild. In that case, yes, a portfolio optimization could get you somewhere, aside from the extremely important "points of caution section" discussed by Matthew. I thought that the process was different in the sense that the signals were being seen over time and one was entering and exiting over time. In this case, I don't think it's possible. – mark leeds Sep 12 '18 at 2:26
• The questioner consistently used singlular rather than plural. I do not think the request involves a portfolio of multiple assets/signals. – Charles Fox Sep 12 '18 at 13:32

Yes, if you are comfortable assuming that future returns follow the same distribution as the historical. I am going to assume your strategy is one signal because you said "some signal" rather than "group of signals". I will also assume you are not going to update your regression coefficients once the strategy is implemented. I'll also assume your returns and signal are normally distributed.

Let $$\hat{R} = a + bS$$ where $$a$$ and $$b$$ are from the regression of historical asset excess returns against historical signals ($$r_i=a+bS_i + \epsilon_i$$), $$S$$ is the current signal value, and $$\hat{R}$$ is the expected asset return given the signal.

Next, let the strategy return be $$Y=X(\hat{R})R$$ where X is your position size and $$R$$ is the asset return.

We know from your question that $$X(\hat{R})$$ is proportional to signal. I'll infer that $$X(\hat{R}) =c + d\hat{R}$$ with $$c=0$$. With any other $$c$$ value, you could go long when the asset expected return is negative or short when the expected asset return is positive.

$$X(\hat{R}) = d\hat{R} = d(a+bS)$$

The expected excess return of the strategy is $$E[XR]=\int E[XR|\hat{R}]P\{\hat{R}\}$$. $$\hat{R}$$ is distributed normally with mean $$\bar{R} = a + b\bar{S}$$ and variance $$b^2\sigma_S^2$$. $$R$$ given $$\hat{R}$$ is distributed normally with mean $$\hat{R}$$ and variance equal to the unexplained variance from the regression.

$$E[Y]=E[XR]=\int E[XR|\hat{R}=r]P\{\hat{R}=r\}$$

Substituting $$X=d\hat{R}$$ and remembering that $$\hat{R}$$ is the expectation of $$R$$ after the signal is revealed:

$$\int E[XR|\hat{R}=r]P\{\hat{R}=r\}=d\int \hat{r}^2 P\{\hat{R}=r\}$$.

$$d\int \hat{r}^2 P\{\hat{R}=r\}=dE[\hat{R}^2]=d (Var[\hat{R}]+E[\hat{R}]^2)$$

$$Var[\hat{R}]=b^2Var[S]$$

$$E[\hat{R}]=a+b\bar{S}$$

Expected return: $$E[Y]=d(b^2Var[S]+(a+b\bar{S})^2)$$

The variance of your strategy is $$Var[Y]=Var[XR]=Var[d\hat{R}R]$$

$$Var[d\hat{R}R]=d^2(Var[E[\hat{R}R|\hat{R}]] + E[Var[\hat{R}R|\hat{R}]])$$

$$Var[E[\hat{R}R|\hat{R}]]=Var[\hat{R}^2]$$

Replace $$\hat{R}$$ with $$\bar{R} + \sigma_R N$$ with $$N$$ distributed normal(0,1)

$$Var[\hat{R}^2]=Var[\bar{R}^2 + 2\bar{R}\sigma_R N + \sigma_R^2 N^2]$$ $$=(2\bar{R}\sigma_R)^2 + \sigma_R^4Var[N^2]$$ $$N^2$$ is chi square with 1 degree of freedom -> $$Var[N^2] = 2$$

$$Var[E[\hat{R}R|\hat{R}]]=(2\bar{R}\sigma_R)^2 + 2\sigma_R^4$$

$$E[Var[\hat{R}R|\hat{R}]]=E[\hat{R}^2 Var[R]]=E[\hat{R}^2 \sigma_R^2]$$ $$E[\hat{R}^2 \sigma_R^2]=\sigma_R^2 E[\hat{R}^2]$$

$$\sigma_R^2E[\hat{R}^2]=\sigma_R^2 E[\bar{R}^2 + 2\bar{R}\sigma_R N + \sigma_R^2 N^2]$$

$$=\sigma_R^2(\bar{R}^2 + 0 + \sigma_R^2)$$

$$Var[Y]=d^2((4\bar{R}^2\sigma_R^2 + 2\sigma_R^4) + (\sigma_R^2\bar{R}^2 + \sigma_R^4))$$

$$Var[Y]=d^2\sigma_R^2(5\bar{R}^2 + 3\sigma_R^2)$$ $$\sigma_Y = d\sigma_R\sqrt{5\bar{R}^2 + 3\sigma_R^2}$$

$$E[Y]/\sigma_Y = d(b^2Var[S]+(a+b\bar{S})^2) / d\sigma_R\sqrt{5\bar{R}^2 + 3\sigma_R^2}$$

$$E[Y]/\sigma_Y = (b^2Var[S]+(a+b\bar{S})^2) / ( \sigma_R\sqrt{5\bar{R}^2 + 3\sigma_R^2})$$

It is interesting that $$d$$ drops out in the last step. However, I think this is only true under the restrictive assumptions that the relationship between the expected return of the asset and the signal is linear and that the residuals are normally distributed.

A simulation study to check this may be worthwhile.

What you are looking for is the conditional expectation model, whereby the expected returns are linear in some 'features'. That is $$E\left[y_i \left| x_i\right.\right] = B x_i,$$ where $$x_i, y_i$$ are vectors of features and stock returns respectively, $$B$$ is some unknown matrix of coefficients, and the variance of $$y_i$$ takes value $$\Sigma$$, independent of the vector $$x_i$$. The Markowitz portfolio is then proportional to $$w = \Sigma^{-1} B x_i.$$ The expected squared Sharpe ratio then depends on the distribution of the $$x_i$$ (which are assumed random), and is, up to scaling, the Hotelling-Lawley trace.

For quick hack work, however, if you are willing to assume your portfolio is linear in the features $$x_i$$, you can use the flattening trick, where you perform unconstrained Markowitz optimization on the vectorized outer product $$\operatorname{vec}\left(y_i x_i^{\top}\right)$$ as if it were a vector of returns. You can then estimate the (squared) Sharpe via the Hotelling $$T^2$$. This is available in the R SharpeR package via the [dpqr]sropt functions.