Optimize my existing algorithms – AI Trading Software

My main objectives are to optimize my existing algorithms and at the same time maintain innovation. This month, I can claim to have reached both these objectives. After a major technical update in start June, it seems like earlier challenges have been resolved concerning the ASA_ML algorithm. The ASA_ML algorithm has been running 100 percent stable technically speaking and the return generated by the algorithm has been reasonable.

Further below in this post, you can read about the best test results that I have ever got so far by a new algorithm called CorrelML version 0.1. Asked a month ago if such results could be achieved in the market using machine learning, I would clearly have answered “No”

ASA_ML account balance

The table and the graph display some major fluctuations in the start. I subsequently followed up by adjusting the lotsize of the ASA_ML 1440 day trade (per trade) so that the lotsize fitted with the wanted risk profile.

The graph above covers 175 individual trades. The rate of success is at a relatively low 54 %, but the return taken is acceptable considering the risk (drawdown).

All ASA_ML trades in a single table

A new and updated MT4 report can be downloaded by clicking at the following link:

MT4 statement fra 11. juni til 30 juni (23 downloads)
DatePairUSDBalance
13/6/2018 1:00 AMusdjpy_1440down11.035601.03
13/6/2018 1:00 AMaudchf_1440up1-7.915593.12
13/6/2018 1:00 AMchfjpy_1440down1-7.615585.51
13/6/2018 1:00 AMeurgbp_1440up126.555612.06
13/6/2018 1:00 AMeurjpy_1440down1[sl]-37.755574.31
13/6/2018 1:00 AMxauusd_1440up118.545592.85
13/6/2018 8:01 AMeurusd_240up0-1.685591.17
13/6/2018 12:01 PMeurjpy_240down0-10.865580.31
13/6/2018 4:01 PMusdcad_240down0[tp]8.185588.49
13/6/2018 8:01 PMeurusd_240up0[sl]-10.625577.87
13/6/2018 8:01 PMusdcad_240down0[sl]-8.235569.64
14/6/2018 1:00 AMeurusd_1440down1[tp]37.985607.62
14/6/2018 1:00 AMusdchf_1440up1[tp]37.515645.13
14/6/2018 1:00 AMaudchf_1440up112.985658.11
14/6/2018 1:00 AMchfjpy_1440down1[tp]345692.11
14/6/2018 1:00 AMeurgbp_1440down144.745736.85
14/6/2018 1:00 AMeurjpy_1440up1[sl]-37.055699.8
14/6/2018 1:00 AMxauusd_1440down1[sl]-56.525643.28
14/6/2018 4:01 AMusdcad_240down01.535644.81
14/6/2018 8:01 AMeurusd_240down0[sl]-10.925633.89
14/6/2018 8:01 AMusdcad_240down06.435640.32
14/6/2018 8:01 AMeurjpy_240up0[sl]-11.455628.87
14/6/2018 12:01 PMeurusd_240up0[tp]10.85639.67
14/6/2018 12:01 PMusdcad_240up0[tp]8.325647.99
14/6/2018 4:02 PMusdcad_240down0[sl]-8.485639.51
14/6/2018 4:02 PMeurjpy_240up0[tp]11.375650.88
15/6/2018 1:00 AMeurusd_1440down1-0.065650.82
15/6/2018 1:00 AMgbpusd_1440down115.365666.18
15/6/2018 1:00 AMusdcad_1440up117.265683.44
15/6/2018 1:00 AMchfjpy_1440down110.695694.13
15/6/2018 1:00 AMeurgbp_1440up114.465708.59
15/6/2018 1:00 AMxauusd_1440down116.985725.57
15/6/2018 4:01 AMeurusd_240down0-5.15720.47
15/6/2018 4:01 AMusdcad_240down0[sl]-8.725711.75
15/6/2018 4:01 AMeurjpy_240up0[tp]10.575722.32
15/6/2018 8:02 PMeurusd_240down0-3.725718.6
15/6/2018 8:02 PMusdcad_240up03.555722.15
15/6/2018 8:02 PMeurjpy_240down0-4.075718.08
18/6/2018 12:01 AMeurusd_240down07.55725.58
18/6/2018 12:01 AMusdcad_240up04.545730.12
18/6/2018 12:01 AMeurjpy_240down0[tp]6.835736.95
18/6/2018 4:01 AMeurjpy_240down0-4.735732.22
18/6/2018 8:01 AMeurusd_240up0[sl]-10.925721.3
18/6/2018 12:01 PMgbpusd_240down0[sl]-12.785708.52
18/6/2018 12:01 PMeurjpy_240down0[sl]-11.725696.8
18/6/2018 4:01 PMeurusd_240up0-0.35696.5
18/6/2018 4:01 PMgbpusd_240up00.065696.56
18/6/2018 4:01 PMeurjpy_240up005696.56
18/6/2018 8:01 PMeurusd_240up09.185705.74
19/6/2018 1:00 AMusdcad_1440down1[sl]-14.415691.33
19/6/2018 1:00 AMchfjpy_1440down1[tp]17.495708.82
19/6/2018 1:00 AMeurgbp_1440down1-10.245698.58
19/6/2018 1:00 AMeurjpy_1440up1[sl]-18.575680.01
19/6/2018 4:01 AMeurusd_240down04.145684.15
19/6/2018 8:01 AMgbpusd_240up0[sl]-25.25658.95
19/6/2018 8:01 AMusdcad_240down0-4.495654.46
19/6/2018 8:01 AMeurjpy_240up0[sl]-23.435631.03
19/6/2018 12:01 PMeurusd_240down00.725631.75
19/6/2018 12:01 PMusdcad_240up0[tp]17.185648.93
19/6/2018 4:01 PMgbpusd_240up0-0.35648.63
19/6/2018 4:01 PMusdcad_240down0-8.045640.59
19/6/2018 8:01 PMgbpusd_240down0-2.45638.19
19/6/2018 8:01 PMeurjpy_240down0[sl]-23.445614.75
20/6/2018 1:00 AMusdcad_1440down1-6.835607.92
20/6/2018 1:00 AMaudchf_1440down1-1.935605.99
20/6/2018 1:00 AMcadchf_1440down10.545606.53
20/6/2018 1:00 AMchfjpy_1440up13.215609.74
20/6/2018 1:00 AMeurjpy_1440down1-9.565600.18
20/6/2018 4:01 AMeurusd_240down03.785603.96
20/6/2018 4:01 AMeurjpy_240down0-8.015595.95
20/6/2018 8:01 AMeurusd_240down03.35599.25
20/6/2018 8:01 AMgbpusd_240down0-1.985597.27
20/6/2018 8:01 AMeurjpy_240down07.745605.01
20/6/2018 4:01 PMgbpusd_240down0-2.585602.43
20/6/2018 4:01 PMusdcad_240up06.275608.7
21/6/2018 1:00 AMcadchf_1440down19.075617.77
21/6/2018 1:00 AMeurjpy_1440down1[tp]18.035635.8
21/6/2018 4:01 AMeurjpy_240up011.825647.62
21/6/2018 8:01 AMusdcad_240up03.695651.31
21/6/2018 4:02 PMeurusd_240up0[tp]21.125672.43
21/6/2018 4:02 PMgbpusd_240down0-3.485668.95
21/6/2018 8:01 PMeurusd_240down0-0.185668.77
21/6/2018 8:01 PMusdcad_240down05.825674.59
22/6/2018 1:00 AMgbpusd_1440up1[tp]20.15694.69
22/6/2018 1:00 AMusdcad_1440down1[sl]-14.35680.39
22/6/2018 1:00 AMusdchf_1440down110.515690.9
22/6/2018 1:00 AMaudchf_1440down1-10.65680.3
22/6/2018 1:00 AMchfjpy_1440up112.635692.93
22/6/2018 1:00 AMeurgbp_1440down1-12.895680.04
22/6/2018 1:00 AMeurjpy_1440down1[sl]-19.395660.65
22/6/2018 4:01 AMeurusd_240up01.265661.91
22/6/2018 4:01 AMeurjpy_240up00.435662.34
22/6/2018 8:01 AMusdcad_240up0-5.875656.47
22/6/2018 12:01 PMeurusd_240up0-5.45651.07
22/6/2018 12:01 PMgbpusd_240up0-10.085640.99
22/6/2018 8:01 PMeurusd_240down0-7.25633.79
25/6/2018 1:00 AMgbpusd_1440up12.585636.37
25/6/2018 1:00 AMusdcad_1440down1-6.035630.34
25/6/2018 1:00 AMusdchf_1440down12.615632.95
25/6/2018 1:00 AMaudchf_1440up1-11.885621.07
25/6/2018 1:00 AMchfjpy_1440up1-2.145618.93
25/6/2018 1:00 AMeurgbp_1440up17.695626.62
25/6/2018 4:01 AMeurusd_240down01.025627.64
25/6/2018 4:01 AMeurjpy_240up0-9.325618.32
25/6/2018 8:01 AMeurusd_240up04.865623.18
25/6/2018 8:01 AMgbpusd_240down010.625633.8
25/6/2018 8:01 AMusdcad_240up0-2.355631.45
25/6/2018 8:01 AMeurjpy_240down0-4.615626.84
25/6/2018 12:01 PMeurusd_240down0[sl]-21.785605.06
25/6/2018 12:01 PMusdcad_240down0-3.885601.18
25/6/2018 12:01 PMeurjpy_240up0[tp]23.435624.61
25/6/2018 4:01 PMeurusd_240down0-5.45619.21
25/6/2018 8:01 PMeurusd_240down0-5.285613.93
25/6/2018 8:01 PMgbpusd_240up06.845620.77
25/6/2018 8:01 PMusdcad_240up0-10.615610.16
25/6/2018 8:01 PMeurjpy_240up0[tp]23.395633.55
26/6/2018 1:00 AMusdjpy_1440up18.565642.11
26/6/2018 1:00 AMaudchf_1440up10.65642.71
26/6/2018 1:00 AMcadchf_1440down1-7.725634.99
26/6/2018 1:00 AMchfjpy_1440up1-4.235630.76
26/6/2018 1:00 AMeurgbp_1440up1-1.835628.93
26/6/2018 1:00 AMxauusd_1440down1[tp]27.455656.38
26/6/2018 4:01 AMeurusd_240up05.225661.6
26/6/2018 4:01 AMgbpusd_240down0-7.265654.34
26/6/2018 8:01 AMgbpusd_240down015.125669.46
26/6/2018 8:01 AMusdcad_240down0-2.355667.11
26/6/2018 8:01 AMeurjpy_240up0-10.45656.71
26/6/2018 12:02 PMeurusd_240down02.765659.47
26/6/2018 12:02 PMeurjpy_240up0-1.365658.11
26/6/2018 4:02 PMeurusd_240down07.025665.13
26/6/2018 4:03 PMeurjpy_240up011.35676.43
27/6/2018 1:00 AMusdcad_1440up10.545676.97
27/6/2018 1:00 AMusdchf_1440up115.485692.45
27/6/2018 1:00 AMcadchf_1440down1-12.15680.35
27/6/2018 4:01 AMgbpusd_240up0-3.845676.51
27/6/2018 4:01 AMusdcad_240down0-4.555671.96
27/6/2018 4:01 AMeurjpy_240up04.425676.38
27/6/2018 8:01 AMusdcad_240down0-2.795673.59
27/6/2018 12:01 PMeurusd_240down017.45690.99
27/6/2018 12:01 PMusdcad_240down0[tp]17.35708.29
27/6/2018 12:01 PMeurjpy_240up0[tp]25.365733.65
27/6/2018 8:03 PMeurusd_240up0[sl]-23.225710.43
27/6/2018 8:03 PMgbpusd_240up0-14.345696.09
27/6/2018 8:03 PMusdcad_240up0[tp]17.45713.49
28/6/2018 1:00 AMeurusd_1440up13.65717.09
28/6/2018 1:00 AMusdjpy_1440up14.135721.22
28/6/2018 1:00 AMusdcad_1440down1[tp]13.655734.87
28/6/2018 1:00 AMeurjpy_1440up17.85742.67
28/6/2018 1:00 AMxauusd_1440down16.455749.12
28/6/2018 8:01 AMeurjpy_240down02.565751.68
28/6/2018 12:02 PMeurusd_240up0[tp]21.485773.16
28/6/2018 12:02 PMusdcad_240down0[tp]16.015789.17
28/6/2018 4:02 PMeurusd_240up0[tp]21.785810.95
28/6/2018 8:01 PMeurusd_240down013.625824.57
28/6/2018 8:01 PMgbpusd_240up0-14.15810.47
29/6/2018 1:00 AMeurusd_1440up1[tp]19.055829.52
29/6/2018 1:00 AMgbpusd_1440up1[tp]20.165849.68
29/6/2018 1:00 AMusdchf_1440down1[tp]17.395867.07
29/6/2018 1:00 AMaudcad_1440down1[tp]-0.75866.37
29/6/2018 1:00 AMchfjpy_1440up1[tp]18.435884.8
29/6/2018 4:01 AMeurjpy_240up0[tp]23.245908.04
29/6/2018 8:01 AMusdcad_240down03.185911.22

ASA_ML success rate diagram

Optimization and Innovation

Ongoing optimization and innovation of AI trading software.

Ongoing optimization and innovation of AI trading software.

The picture at the left depicts an Anders Hasle Nielsen very pleased with a specific graph – actually, I am excited rather than just pleased. So far, I have been satisfied if I could only describe the direction of the market with an above 50 % probability. Naturally, I aim at a success rate above 51 % and here I get a 54 % success rate corresponding to a 3.5 % return.

I have hereby accomplished to create a connection between my ML prediction and the direction of the market. Though not being statistically impressive as the results are not enough to guarantee positive return each month of a year.

I have therefore seen it as my duty to proceed my search for new and even better algorithms and this search has led me to a new algorithm that within the first 2 weeks has exceeded all my expectations. Where my initial aim was to improve my 54 %, the ML prediction success rate of this new algorithm so far has been no less than 100 %. And perhaps even more interesting, the correlation fits as well.

Exceeding expectations: Prediction of correlation

Plotting last week’s data from ASA_ML at a scatter graph yields the following:

Scatter graf AI ProSoft_ASA_ML

No correlation is depicted in the above scatter graph, i.e. there is no correlation between the ML prediction and the expected loss/result. The correlation factor is 1.4%.

The new algorithm yields the scatter graph displayed in the diagram below.

A linear trend graph yields a correlation of 77% and the formula of the line is:

y =0.0007x + 0.5743 (R2 = 0.7716)

This means that an interpolation can be made. If the algorithm comes up with a prediction of e.g. 32.9 %, then the formula above can be used to determine the number of pips lost og returned with a 77% precision. The 32.9 % of the example corresponds with a 350-pips minus. On the contrary, an 85% ML prediction corresponds with a 400-pips return.

Being able to predict not only the direction but also the size of the loss then things start to become very interesting.

An exponential graph gives an even better correlation:

y = 0.3828e0.0027x (R2 = 0.8577)

scatter graf over CorelML Ai ProSoft

Summary

It has been a good month and I do not expect the next month to be as good as this one. All algorithms have up and down periods.

It has also been a turbulent month as can be seen by the VIX index that has had large variations. The oil price has increased drastically which also has created uncertainty. Further incidents have been the Trump/Kim Jong Un June meeting, The FED interest increase, and the ECB announcement of ending support buying of bonds by ultimo 2018.

It is normal my assessment that the ASA_ML algorithm performs best in a quiet market with no large surprises and only few major events. This has not been the case when looking at June.

A connection can be seen between the start June balance and the fundamental news where ASA_ML suffered its largest loss (drawdown). It was the Trump/Kim meeting in Singapore and the ECB announcement. Hereafter a neutral period with no major news in the market.

Last week, the fundamental and technical analysis as well as the ML prediction indicated a stronger EUR in relation to USD. It went in the opposite direction in the start of the week, but it then turned in the “right” direction resulting in some good days for ASA_ML. It is difficult to say whether there has been a relation or if the good results were a matter of coincidence.

All in all, I am satisfied with my improvements and my optimizations as well as my attempts to continuously innovate. I am excited to see whether the next month will bring good news or new challenges.

0 Comments

Leave a comment

Your email address will not be published. Required fields are marked *

en_USEnglish
da_DKDansk en_USEnglish