Screen shots
Example 1. The indicator displaying a filtered price series and a residual term of wavelet transformation:

In the Figure above one can see that the wavelet filtration (the red line) deletes outliers on non-trending periods but leaves the prices on trend periods the same. Also the residual term of wavelet transformation can be used similarly to long-term moving average.
Example 2. The function that provides the detrended price series, i.e. the price without long-term trend component. Obviously, it is nothing but the sum of wavelet coefficients.

It is possible to considerably improve standard oscillators using the detrended price instead of initial price. Here standard indicator RSI and the same indicator (a yellow line on the diagram) based on the TS_Wvl_DetrendPrice function are given. One can see that the modified indicator is smoother and catches the prices extrema much better then initial one.
Example 3. The indicator shows the family of low-frequency filters, derived by consecutive subtraction of the filtered wavelet coefficients from the filtered price (see figure):

Two indicators, TS_Wvl Filter Family è TS_Wvl Filter Family 22 are applied there: the first builds filters from 1-st to 4-th scale and the second from 5-th to 8-th.
Example 4. The indicator displays consecutive wavelet coefficients, since FirstScale number:

Here wavelet coefficients of price series are given. They can be used instead of usual oscillators.
Example 5. ShowMe that identifies the trend on each bar on all given scales.

To apply the study to the plot, it is necessary to start TS_Wvl Trend Nowcast from menu ShowMe, to press button Expert Commentary and to click the mouse on the required bar. After that the comment window will appear. The result is shown in the figure above. The family of low-frequency filters (Example 3) and wavelet coefficients (Example 4) is applied to the plot too. It is interesting to notice that in the points where trend is not identified on several scales, the appropriate low-frequency filters coincide, but are not crossed, that allows avoid false signals whichcrossing moving averages , for example, will give there. The concurrence of filters can be treated as the indicator of the breakout mode and the avoiding to use counter trend methods.
Example 6.The indicator displaying the signal / noise ratio, since FirstScale:

One can see in a figure that the signal / noise ratio grows with increase of scale, as one would expect: on smaller scales noise prevails.
Example 7.A signal opens positions if wavelet coefficients have identical directions, and closing positions if they have different directions:

This elementary strategy is profitable on all range of scales. The report is obtained at default values of parameters, without any optimization.
Example 8. . The signal that opens positions if trend is identified on the given scale, and closing them if the end of trend is fond.

Here is the report of the non-optimized system. It shows remarkable robustness concerning the parameter NSigma from "theoretically proved" range 2-3 that corresponds 95-99 % of Gaussian noise amplitude. The concrete scale is expedient for choosing from the middle of scales, from the third to the fifth.
Example 9.. A signal opens a long position if the "fast" low-frequency filter constructed in example 3, rises above the "slow" filter, and opens a short position if the "fast" filter falls below "slow" filter.

Notice, that wavelet based low-frequency filters use data points. Compare the results of the given system to the crossover of moving averages of the same lengths. The top report is the wavelet filters crossover, parameters by default, without optimization.
Results of application of the same strategy - moving average crossover by length and , instead of wavelet filters on the same data are resulted below:

Comments are unnecessary in this case.
Do not pay attention to the identical name of strategy: we have replaced last two lines in initial code EasyLenguage with that are bracketed for the simplicity.
These elementary examples evidently show that modern computer methods can improve an arsenal of technical analytics.
|