- a Monte Carlo permutation test to accept or reject the null hypothesis that the results of the AFIRMA "system" are no better than could be expected from a random re-ordering of the system's position vector
- a Monte Carlo bootstrap test to accept or reject the null hypothesis that the returns of the AFIRMA "system" are randomly centred around a zero return
The next test was a simple visual check of the tick return equity, a simple plot of the cumulative number of ticks that the "system" would have returned. For this no allowance was made for commissions and slippage and a typical plot is shown below. This happens to be the S&P E-mini contract.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmS21NRlrbcH-ObWund7hmQSitzoS141qVK9nTFQNdRG1NvphJeQ8B1qapcd3WdFeJ-rf-nocxe_zWo-R7Da14mHLN7x-JQU8am_SQKrqYctBRfjPHVO932AnX0ykwO7pLdJrDlgrf0Uqq/s320/es+open+to+open+tick+return.png)
The AFIRMA is the blue line and the other lines are a simple benchmark suite I knocked up for comparative purposes, the benchmarks being
- the equivalent of a buy and hold strategy
- price closing above/below the 20 period simple moving average
- price closing above/below the 50 period simple moving average
- crossovers of the 20 and 50 period moving averages
- a Donchian breakout system with a parameter of 20 periods to enter and 10 to exit
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfIVxqPlxgs63waBEojUvFgW0X5cI1DEbFmcbfzwQ79-JW6zy8UuarKo9bRUE82KFRfqjEC6MrdbQlSnKj12AYOyKX6oq_6edDQH0O6Y8Oh4K-kaCFfCp60aYRZ4i3xDBXaFM0dOCUbg-i/s320/es+open+to+open+summary.png)
This final shot is a screen capture of the R session, using RStudio, used to create the performance summary chart. This was the first time I had used RStudio, and I am quite impressed with it.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoC39wybWbU1wdsWx3mJNtt6PpHdajaCiibHwNjjITL3quZBzLLYAkK0po7Z2bZ854GAH2gnTaYuhrMWoIOrqTqOZBWvjpCUIjEqAuxcaxx4zRzjfAYpO_Nb3QHQtXwaCCU5tyWLFROotM/s320/Screenshot-RStudio.png)
In summary I can say that the AFIRMA has passed the above tests sufficiently well that I am going to code the AFIRMA using the leading functions as described in my previous post.
No comments:
Post a Comment