Omicron Research Institute

QuanTek Econometrics Software

Correlation Tests

The following tables are Correlation tests of the Default Adaptive Filter output with N-day 'future' returns, and also the slope of the 2048-day Long-Term Trend considered as a Price Projection. The row and column labels in the tables are two different kinds of Time Horizon. The row labels in the first column are the Time Horizon that is set in the Trading & Portfolio Parameters dialog. This is set before each filter calculation and determines the Time Horizon for which the filter is optimized. The column labels in the first row are the Time Horizon setting in the Correlation Test of Adaptive Filter dialog. These set the Time Horizon of the 'future' returns against which the correlation of the Adaptive filter output is tested. We expect the filter performance to be best for the Time Horizon of 'future' returns for which it has been optimized.

All percentages are theoretical N-day returns (annualized) based on the measured correlation and average N-day (log) volatility. The correlation is multiplied by the average N-day (log) volatility, then converted to an actual percentage gain/loss and annualized. In other words, the correlation represents the percent of the N-day volatility that can be predicted by the output of the Adaptive Filter, so this predicted percent of the volatility represents a (theoretical) gain, assuming N-day trading. It is just an measure of how well the Adaptive Filter is performing across a variety of time scales. Note that we define the volatility to be the average absolute deviation of the prices.

Note that we are using a non-standard definition of correlation, which is better suited to represent actual gains from trading and investing. Our definition of correlation between the Adaptive Filter output and the N-day future returns, where N is the time Horizon, over a time period of (Correlation Scale) days, is as follows: The daily product of the two data sets is taken, without detrending, and then this is divided by the average absolute deviation of the two data sets over the time period (instead of the standard deviation). This gives a better representation of the gains from using the Adaptive Filter output as a trading indicator, than the ordinary definition of correlation (if the position is varied in proportion to the Adaptive Filter output).

The Long-Term Trend is the return from the 2048-day Trend Line, used as a future Price Projection. It does not depend at all on the Adaptive Filter. The Long-Term Trend varies slowly with time, so it is not quite the same as a Buy & Hold strategy. But it serves as a useful benchmark for comparison with the Adaptive Filter.

AAPL (2018-12-07)

The Long-Term Trend is independent of the Adaptive Filter. It is a 2048-day (8 years) trend line. Evidently there has been a regime change in the market for AAPL over the past year (256 days) or so, which has caused the Long-Term Trend to lose predictive power, as can be seen below. The results improve dramatically when the correlation is taken over a 512-day (2-year) Correlation Scale. It appears that in general, the longer time scales give better performance.

The explanation for the negative returns on the 128-day (6 months) Correlation Scale is the recent downturn in AAPL over this time scale. The overall returns over this time scale were negative, while the long-term (2048-day) returns were of course positive, hence the negative correlation over the past 128 days. When the Time Horizon gets up to 64 days or so, it gets past the time period of this downturn, so the correlation becomes positive. Likewise, on the 512 and 1024 day Correlation Scale, the correlation measurement extends back 512 days (2 years) and 1024 days (4 years), so this includes a period of a strong uptrend in AAPL. Over those longer periods, the correlation between the 2048-day return and the (Time Horizon)-day return is positive. This study also proves that the long-term (2048-day) returns, extended into the future as a Price Projection, give varying degrees of performance, depending on the particular regime or situation for AAPL at any given time.

It seems that the Adaptive Filter beats the Long-Term Trend on almost all time scales. The higher the Correlation Scale, which is the time period over which the correlation is measured, the more marked the difference between the two. This difference is particularly pronounced on the two highest scales, the 512-day (2-year) and the 1024-day (4-year) scales. This is most encouraging, because it implies that the Adaptive Filter is working over a variety of different regimes of the AAPL price action (on the average).

Note that the Step Size parameter was tweaked precisely for AAPL, as shown here. It remains to be seen whether this exact value for the Step Size parameter is also optimal for other securities, although it should be, at least approximately. The value of the Step Size parameter that is exactly optimal might depend on the volatility of the individual security or its exact correlation structure, and may also vary with the regime. So this provides future opportunities for tweaking the Least Mean Square (LMS) filter, by implementing a variable Step Size parameter.

Long-Term Trend N-day returns (Correl. Scale = 128)

AAPL 128 64 32 16 8 4 2 1
2048 37.8670% 37.4516% 13.4451% -8.9075% -11.5343% -13.1639% -21.0444% -22.2196%

Default Adaptive Filter (Correl. Scale = 128, Step Size = 0.2)

AAPL 128 64 32 16 8 4 2 1
128 36.9862% 37.1732% 19.2053% 2.6884% 2.6035% 1.6427% -3.9170% -4.3549%
64 37.0775% 36.3042% 16.3239% -1.6098% -2.2607% -3.3088% -9.4199% -9.9405%
32 37.2337% 36.4671% 15.7581% -3.1671% -4.3222% -5.6134% -12.3234% -12.9426%
16 37.1088% 36.1810% 15.5808% -3.4056% -4.5150% -5.8437% -12.6507% -13.2743%
8 37.1282% 36.2785% 15.4366% -4.0032% -5.1172% -6.5112% -13.2068% -13.6921%
4 37.2107% 36.3890% 15.3794% -4.4143% -5.5506% -7.1325% -14.0367% -14.3485%
2 37.2327% 36.3777% 15.3632% -4.3691% -5.5419% -7.2825% -14.1199% -13.9863%
1 37.1608% 36.2196% 15.3391% -3.9096% -5.0026% -7.1019% -13.6639% -12.4934%

Long-Term Trend N-day returns (Correl. Scale = 256)

AAPL 128 64 32 16 8 4 2 1
2048 31.3510% 28.7990% 16.0886% 4.5429% 3.0757% 2.3991% 1.0495% 1.9209%

Default Adaptive Filter (Correl. Scale = 256, Step Size = 0.2)

AAPL 128 64 32 16 8 4 2 1
128 30.5633% 28.9386% 19.2200% 10.1431% 9.6281% 9.1997% 8.7407% 10.2151%
64 30.5763% 28.6442% 17.8170% 7.5726% 6.7570% 6.2682% 5.4792% 6.8107%
32 30.6006% 28.8037% 17.6503% 6.9122% 5.8611% 5.2724% 4.2421% 5.5070%
16 30.5134% 28.6207% 17.4735% 6.5503% 5.4196% 4.7415% 3.6821% 4.9563%
8 30.5186% 28.6968% 17.4452% 6.3357% 5.2724% 4.4578% 3.3626% 4.6452%
4 30.5556% 28.7988% 17.4795% 6.2756% 5.3114% 4.4764% 3.3081% 4.6885%
2 30.5652% 28.8083% 17.4748% 6.3330% 5.4156% 4.6445% 3.4989% 5.2141%
1 30.5296% 28.7123% 17.3867% 6.4427% 5.6635% 5.0631% 4.0935% 6.5378%

Long-Term Trend N-day returns (Correl. Scale = 512)

AAPL 128 64 32 16 8 4 2 1
2048 39.9896% 38.9814% 33.9749% 31.8198% 31.4070% 30.4848% 28.7416% 28.4944%

Default Adaptive Filter (Correl. Scale = 512, Step Size = 0.2)

AAPL 128 64 32 16 8 4 2 1
128 45.6965% 45.3490% 44.5642% 48.6506% 50.1331% 48.3311% 46.8217% 46.4596%
64 45.7512% 45.4830% 44.3930% 48.0281% 49.3483% 47.4710% 45.8351% 45.4363%
32 45.7082% 45.5881% 44.4527% 47.8482% 49.0354% 47.1156% 45.3897% 44.9769%
16 45.5953% 45.5021% 44.2886% 47.5808% 48.7786% 46.8786% 45.1575% 44.7645%
8 45.5592% 45.4965% 44.2414% 47.3625% 48.5851% 46.6506% 44.9133% 44.5334%
4 45.5585% 45.5226% 44.2722% 47.3141% 48.5624% 46.6212% 44.8324% 44.5001%
2 45.5557% 45.5226% 44.2776% 47.3413% 48.5971% 46.6973% 44.9113% 44.7370%
1 45.5339% 45.4798% 44.2214% 47.3857% 48.6868% 46.8975% 45.1688% 45.3481%

Long-Term Trend N-day returns (Correl. Scale = 1024)

AAPL 128 64 32 16 8 4 2 1
2048 22.5742% 22.1985% 19.6553% 16.8546% 15.9833% 15.9585% 15.3753% 15.5428%

Default Adaptive Filter (Correl. Scale = 1024, Step Size = 0.2)

AAPL 128 64 32 16 8 4 2 1
128 29.7380% 28.1708% 26.3393% 24.6365% 24.0083% 23.9953% 23.7699% 23.9623%
64 30.2877% 28.8497% 26.9007% 24.9940% 24.3052% 24.2724% 23.9960% 24.1781%
32 30.4020% 29.0488% 27.0350% 25.0414% 24.3237% 24.2899% 23.9877% 24.1732%
16 30.4361% 29.1172% 27.0861% 25.0207% 24.3275% 24.3226% 24.0364% 24.2382%
8 30.4252% 29.1679% 27.1269% 24.9380% 24.2036% 24.1834% 23.9197% 24.1387%
4 30.4156% 29.2211% 27.1959% 24.9556% 24.1886% 24.1307% 23.8633% 24.1315%
2 30.4147% 29.2378% 27.2198% 24.9951% 24.2137% 24.1334% 23.8820% 24.2632%
1 30.4152% 29.2177% 27.1948% 25.0350% 24.2817% 24.1872% 24.0057% 24.6244%


(blank tables)

These are some blank tables for use in future Correlation Tests:

Long-Term Trend (Correl. Scale = 512)

SYMB 128 64 32 16 8 4 2 1
2048                


Default Adaptive Filter (Correl. Scale = 512, Step Size = 0.2)

SYMB 128 64 32 16 8 4 2 1
128                
64                
32                
16                
8                
4                
2                
1                

Go back to Demonstrations