3rd generation NN, deep learning, deep belief nets and Restricted Boltzmann Machines

Krzysiaczek99

Well-known member
430 1
2nd attempt

Its my second attempt to denoise the data using Ehler SS. This time I denoised
inputs partially i.e. price returns only. PF returned to previous value (1.09 vs 1.1 when no denoising) but still not improvement. So conclusion for me is that Ehler SS does not improve at all the performance and when applied to valuable inputs degrade the performance.

In the next step I will denoise the data using Wavelet and Empirical Mode Decomposition and check the impact for performance of strategies.

Krzysztof

Code:
>> resultsAll('')
resultsAll('*Peg*')
resultsAll('*CHIRP*')
resultsAll('*J48*')
resultsAll('*RBM*')
resultsAll('*SDAE*')
resultsAll('*ELM*')
   NORMAL DATA AVERAGE RESULTS
      Profit           PF         avMC         avPP         avRC        totTP        totFP         PF>1     algosnum     perTrade
146829788.00         1.09        -0.31        63.54         0.33      2060102      1154090          675         1146        45.68

   NORMAL DATA AVERAGE RESULTS
      Profit           PF         avMC         avPP         avRC        totTP        totFP         PF>1     algosnum     perTrade
 -2356058.10         0.99        -0.36        61.19         0.38       398130       242752          107          191        -3.68

   NORMAL DATA AVERAGE RESULTS
      Profit           PF         avMC         avPP         avRC        totTP        totFP         PF>1     algosnum     perTrade
105986961.10         1.58        -0.17        67.69         0.34       348438       157569          129          191       209.46

   NORMAL DATA AVERAGE RESULTS
      Profit           PF         avMC         avPP         avRC        totTP        totFP         PF>1     algosnum     perTrade
 47452333.90         1.18        -0.33        62.50         0.37       389005       204304          113          191        79.98

   NORMAL DATA AVERAGE RESULTS
      Profit           PF         avMC         avPP         avRC        totTP        totFP         PF>1     algosnum     perTrade
-53654157.60         0.78        -0.38        61.06         0.23       241635       166947          102          191      -131.32

   NORMAL DATA AVERAGE RESULTS
      Profit           PF         avMC         avPP         avRC        totTP        totFP         PF>1     algosnum     perTrade
 43377306.90         1.19        -0.34        66.31         0.31       326761       167698          114          191        87.73

   NORMAL DATA AVERAGE RESULTS
      Profit           PF         avMC         avPP         avRC        totTP        totFP         PF>1     algosnum     perTrade
  6023401.80         1.02        -0.30        62.37         0.35       356133       214820          110          191        10.55

>>
 

Krzysiaczek99

Well-known member
430 1
denoising and SNR

Recently I was working on denosing market data and here is some results which i want to share. It's written in a lot of papers that denoising of marktet data improves predictive power of certain predictive algos (e.g ARIMA) so why not to check it. Here is a little function for measuing signal to noise ratio for noisy/denoised pair of signals

In the following posts I examine SNR obtained using Ehler Supersmoother, Wavelet and EMD methods against 1min
GBPJPY data

Code:
function [mse, SNR, PSNR, cross_core] = evaluate_denoising_metrics(noisy,denoised)

%Computes metrics of denoising (1-D)signal algorithms

%Metrics mean squared error, mean absolute error, signal to noise ratio, peak signal to noise ratio, cross correlation have been computed

%Code published has been by Aditya Sundar, Department of Electrical, Electronics and Instrumentation, BITS Pilani KK Birla Goa Campus/ Texas Instruments 

% Please contact me aditsundar@gmail.com if any issues or message me on https://www.researchgate.net/profile/Aditya_Sundar 

% Some potential applications : Biomedical signal denoising measure (ECG, EEG etc), Audio (speech) signal denoising etc.

temp=noisy;
y=denoised;

%MSE %Mean squared error
mse=0;
for i=1:length(temp)
mse=mse+(y(i)-temp(i))^2;
end
mse=mse/length(temp);
fprintf('mean squared error %f\n',mse);

%MAE %Mean absolute error
mae=0;
for i=1:length(temp)
mae=mae+abs(y(i)-temp(i));
end
mae=mae/length(temp);
fprintf('mean absolute error %f\n',mae);


%SNR and PSNR %signal to noise ratio %peak signal to noise ratio
num=0;
den=0;
for i=1:length(temp)
den=den+(y(i)-temp(i))^2;
end
for i=1:length (temp)
num=num+temp(i)^2;
end
SNR = 20*log10(sqrt(num)/sqrt(den));
PSNR= 20*log10(max(temp)/sqrt(mse));
fprintf('signal to noise ratio %f db\n',SNR);
fprintf('peak signal to noise ratio %f db\n',PSNR);


%Cross correlation 
cc = corrcoef(y,temp);
cross_core = cc(1,2);
fprintf('cross correlation %f\n',cross_core);

end
 
Last edited:

Krzysiaczek99

Well-known member
430 1
Ehler supersmoother and SMA

Some time ago by visual inspection I found out that Ehler Super smoother (see post 281 for his video presentation) performs exactly the same like SMA with half of the Ehler SS period. Now I measured exact SNR of SMA and EhlerSS. Here is a picture.

So I don't know but response of SMA(5) is almost the same like EhlerSS(10) but according to this presentation it should be very different. So either those frequency components which suppouse to be attenuated in price data (aliasing noise, spectral dilation) don't exist (as SNR would differ if they would exist) or there is some bug in his work.
 

Attachments

Last edited:

Krzysiaczek99

Well-known member
430 1
Wavelet denoising

And here is SNR obtained using Wavelet smoothing. It was measured on 1 min data every 60 min for different observation windows (1 day, 5days, 20 days). Wavelet used was MODWT 'Haar' with hard thresolding
 

Attachments

Krzysiaczek99

Well-known member
430 1
EMD denoising

And here is SNR obtained using Huang's Empirical Mode Decomposition where IMFs with Hurst Exponent < 0.5 are discarded. Very noisy !!!! Ater smoothing with 1000 SMA looks better. Second picture for H=0.5, 0.6 and 0.7.
 

Attachments

Last edited:

Krzysiaczek99

Well-known member
430 1
all togehter

and all of them together. Clearly Wavelet seems to look the best but if any of them will improve predictive power of the models its another story....as checked in previous posts EhlerSS actually decreased performance of the predictive algos. When I will get access to my computer infrastructure I will check if Wavelet or EMD give some improvement however to be honest i doubt it....as I see now its not where the money is....

Krzysztof
 

Attachments

Last edited:

Similar threads


AdBlock Detected

We get it, advertisements are annoying!

But it's thanks to our sponsors that access to Trade2Win remains free for all. By viewing our ads you help us pay our bills, so please support the site and disable your AdBlocker.

I've Disabled AdBlock