Stress Testing an Intraday Strategy Through Monte Carlo Methods

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!

Author: Andrew Bannerman

Integrity Inspector. Quantitative Analysis is a favorite past time.

3 thoughts on “Stress Testing an Intraday Strategy Through Monte Carlo Methods”

  1. 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!!

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s