Backtest_mean_revdersion.py

Hi Sushant

Thanks for the advise.  I see you are right about the hedge ratio.  Maybe I am reading the R results wrongly as well:

Test type: trace statistic , with linear trend

Eigenvalues (lambda):
[1] 0.14211849 0.02046769

Values of teststatistic and critical values of test:

          test 10pct  5pct  1pct
r <= 1 |  1.28  6.50  8.18 11.65
r = 0  | 10.79 15.66 17.95 23.52

Eigenvectors, normalised to first column:
(These are the cointegration relations)

            Close.l2 Close.1.l2
Close.l2      1.0000    1.00000
Close.1.l2 -139.1201   -2.00096

Weights W:
(This is the loading matrix)

             Close.l2    Close.1.l2
Close.d   0.095674650 -0.0164272854
Close.1.d 0.002589591  0.0001803581

I though I was looking to see if r = 0's test stat is greater than 10pc or 5 pc or 99pc so for example in the case 10.79 > 15.66 which of course it is not.

I think I am reading the hedge right at 1:-139.12

Can you advise if that is the way to read the results.

Thanks.

Stephen

Hi Stephen,



Thanks for raising your query on Quantra community.



Trace statistics:

The interpretation is right. The trace statistics results show that the null hypothesis cannot be rejected as the t-stat value of 10.79 is not greater than the critical value at 90% of 15.66.



Hedge Ratio:

The interpretation is right here.

spread = 1 x - 139.12 y



I hope this helps.



Thank you.