This is an intraday ES strategy that I was testing for a client. The client was not interested in it due to the low frequency of trades, hence I may post it for others to view. It shows how a strategy was proved through stress testing and looking for optimal conditions to apply the strategy. The steps for strategy development are below:

*Strategy Development Example – Andrew Bannerman – 1.28.2018*

* Bannerman1985@gmail.com*

*Introduction:*

* Follow a scientific process in which a strategy is developed and stress tested before live incubation /*

* trading.*

*Tools used: R Statistical Programming Language*

*Strategy Development Procedure:*

* 1. General view, general statistics, tail risk*

* 2. Initial Back Testing*

* 3. Walk Forward Analysis (Cross validation) , Rolling and Fixed.*

* 4. Parameter Sensitivity Analysis (Random adjustments 0 to 50% parameter change, n times)*

* 5. Draw down expectation (sample without replacement net trade result, n times)*

* 6. Re-sample original time series (Maximum Entropy Bootstrapping, n times) and run strategy over new*

* series.*

* 7. Market Random Test (Test if strategy beats buying randomly)*

* 8. Noise Test (Adding random fixed % to open, high, low, close, simulate back test n times)*

* 9. Strategy Seasonality*

* 10. Layering non-correlated strategies*

Please see attached .pdf.

Download – Intraday Trading Strategy Development Using R – pdf

Let me know if you have any questions!

Awesome post Andrew! Thanks for walking through the analysis steps. Any chance you could share the R code? Thanks.

LikeLike

Great article, really looking forward that you share some R Code.

LikeLike

I post the bones of the in and out of sample testing here:

and described in this post https://flare9xblog.com/2018/01/01/testing-a-strategy-for-robustness-with-time-series-cross-validation/

The code shows how to subset the train and test sets.

The rest of the code, if your re-sampling a distribution of $ gain / loss from a strategy – see R function sample(). I performed without replacement.

As for the back test / statistics etc I will be covering this pretty soon. I used a for loop in R to run these stats and work out the $ gain / loss. I plan to port this to Julia in attempt to speed up the code. As you can imagine running R for loops on over 250,000 rows can get a bit slow!!

LikeLike