Getting Better at Monte Carlo : Distribution Based Simulations of Trading Strategies

Last week I wrote a post about our new Asirikuy Monte Carlo simulator and how it now enabled us to adequately evaluate our systems through the use of this powerful statistical method. Although the initial implementation of the simulator was quite powerful, it neglected to contain a very important feature which would allow us to have even more accurate simulations of our trading strategies. This feature, which deals with the accurate evaluation of the systems through their particular trading distribution, allows us to carry out simulations in which all strategies are appropriately distinguished from each other through a trade-class structure built from the probabilities to have trades with certain outcomes. Through the following post I will talk about this new feature and the whole new world it opens for the accurate evaluation of Asirikuy systems through Monte Carlo Simulations.

The first version of the Asirikuy Monte Carlo simulator included a simple simulation method which carried out Monte Carlo simulations based solely on the simple long term statistical characteristics of a strategy such as the risk to reward ratio, win to loss ratio, etc. The problem with this method was that the simulations for certain systems weren’t accurate as the trade distribution of the strategy was ignored. For example a system that has a 50% winning percentage, a 2% average losing trade and a 2:1 reward to risk ratio would be simulated with all winning trades giving a 4% profit and all losing trades giving a 2% loss. Although this way of simulating strategies works good for almost all strategies – especially those that only take trades based on an SL/TP – it gives quite inaccurate results for some strategies with internal closing mechanisms (and very bad for those with ONLY internal closing mechanisms) as the distribution of trades was ignored.

After an Asirikuy member posted on the forum about the idea of a Monte Carlo distribution based simulation, I decided to implement this feature so that we could have the most possibly accurate simulations of our trading systems within Asirikuy. The new version of the simulator – which will be released this weekend –  now uses a CSV input with the system’s trade distribution to carry out a Monte Carlo simulation using the exact way in which the system took trades.  For example if the system had 3 classes with -1-0%, 0-1% and 1-2% trades with probabilities of 50%, 30% and 20% the program carries out a simulation such that the average distribution of trades through all iterations of the simulation is that of the input distribution, weighting probabilities amongst the classes as specified by the CSV file.

The results are impressive and MUCH better than those of the simple Monte Carlo simulations, allowing us to get an accurate statistical picture of ALL Asirikuy trading systems (including systems such as Ayotl and the God’s Gift ATRwhich were previously difficult to evaluate or evaluated inaccurately on our previous implementation) . The simulator also allow us to see how the distribution of each iteration looks and how it compares to the input distribution using a chi square test. This way you will be able to see how deviated a distribution has to be from the original one to fail a statistical goodness-of-fit chi square test, allowing you to see how powerful this method is for evaluating statistical deviations from the input distribution.

Another great thing here is that coming up with the input distribution will not be any trouble since we have also come up with – through the invaluable help of a very hard working Asirikuy member – with an implementation of our profit and draw down analysis tool which automatically generates this distribution file and loads it into the Monte Carlo simulator which it calls directly with the adequate command prompt parameters. The new version of this tool will also be released this weekend including some very interesting features such as the analysis of monthly return distributions (something I will talk about on a later post with more detail).

As you see the Asirikuy Monte Carlo simulator is quickly becoming a very powerful tool for system evaluation, allowing us to accurately determine the worst case scenarios for our trading strategies with very good accuracy and without limiting ourselves to any particular type of trading strategy. The distribution based simulations now implemented within the tool are a big step towards a much better understanding of Asirikuy trading systems. If you would like to learn more about this simulator and the evaluation of strategies through Monte Carlo simulations please consider joining Asirikuy.com, a website filled with educational videos, trading systems, development and a sound, honest and transparent approach to automated trading in general . I hope you enjoyed this crossword ! :o)

Print Friendly, PDF & Email
You can leave a response, or trackback from your own site.

8 Responses to “Getting Better at Monte Carlo : Distribution Based Simulations of Trading Strategies”

  1. andrea says:

    Hi Daniel,
    the new version of monte carlo simulator is a great thing and i’m very happy about this implementation.
    I’ve just finished to watch all your video, and now i’m going to deeply understand your asirikuy sistems (especially aytol and quimichi).
    Thank you very much for your work.
    Andrea

    • admin says:

      Hi Andrea,

      Thank you very much for your comment :o) I am glad you like this new version of the Monte Carlo simulator, it will definitely allow us to expand our understanding of Asirikuy trading systems and how they work from a statistical point of view. Make sure you watch the videos I will release this week end which will deal with the new features of our draw down analysis tool and the Monte Carlo simulator. I will certainly continue to work on the simulator to add even more features and even potentially link it to the EA analyzer indicator to be able to do more complex statistical analysis of Asirikuy systems on the go. Thank you very much again for your comment :o)

      Best Regards,

      Daniel

  2. Jon says:

    Hi Daniel,

    Why not, instead of taking an statistical summary of the trade types of the system, use all the historical trades of any particular system and re-order them randomly in n interations?

    As opposed to other clasical uses of Monte Carlo analysis, on trading systems we don’t need to generate random trades within a specific profile, we already have these on backtests.

    The purpose of using MC on systems is, in my opinion, to simulate a random order in the trades and stress test the consecutive losses/drawdowns risk. For this, I think using the actual backtested trades can offer you even more accuracy, on a simpler approach. My 2 cents..

    • admin says:

      Hi Jon,

      Thank you for your comment :o) You could say that this is exactly what is being done as the class separation used within the Monte Carlo simulator is quite low (just 0.1%) making the system take trades with the same distribution as on the backtests. However the advantage of doing the analysis this way instead of just a “random reordering” of trades is that you can test the system for longer or shorter numbers of trades. This way you could effectively test for a “15 year” worst case scenario assuming that the trade distribution would remain the same, something that a “random reordering” is not able to do. When you carry out a simulation with the exact same number of trades you are in fact doing something very similar to such reordering since you are simply making up results with the same distribution however more “realism” is taken into account as deviations from the “input probability distribution” do happen within the 100K iterations while along a simple reordering the trades would always be the same and have the same frequency. Playing with probabilities allows us to have much more accurate results and much more powerful simulations than a simple use of the backtesting trading results. I hope this answers your inquiry :o) Thank you very much again for your comment,

      Best Regards,

      Daniel

  3. Jon says:

    Well, I’d never do a 15 year MC with a backtested experience of, for example, just 1 year. I think 1 years experience can be randomized just within that particular year. And if you want to stress test the system on the other 14 years market conditions, you should instead try to backtest it over those years.

    On the rest, I thinl I can agree, but let me understand it better: what are your objectives with result sets? are you trying to analyze the pattern of the result outputs or just the P&L?

    Thanks,
    Jon.

    • admin says:

      Hello Jon,

      Thank you for your comment :o) Definitely you can do this randomization and get some useful results, however the Monte Carlo simulation based on the distribution of returns is more powerful since it also allows you to test deviations from the exact distribution of returns you have seen in backtests, small deviations which might be realistically expected due to differences between testing data (such as broker dependency) therefore worst case values obtained through such simulations yield more statistical value as they cover a much wider probability space. Obviously randomizing trades is one way to stress test systems but I decided to go with the distribution of monthly returns as it is a much more powerful technique.

      Our objectives with the results are also very varied. For example we want to analyze P&L loss values (particularly worst case draw downs and draw downs that happen with an X% probability) but we are also interested in the pattern of the results, particularly to see if the random distributions generated within the input distribution fail or past different sets of distribution tests (such as the chi-square goodness-of-fit test) something that will allow us to know whether or not a particular strategy can be discarded by the use of such tests. For some systems these tests work very well while for others the tests do not hold any predictive power due to the structure of their returns distribution. So overall we are interested in both things and for this reason the power of doing this analysis using the distribution data obtained from the backtests (instead of a simple randomization of backtesting data) becomes necessary. I hope this answers your questions :o) Thanks again for your comment,

      Best Regards,

      Daniel

  4. Bruno says:

    Hi Daniel and thanks for this post.

    I know about Asirikuy since about 1 month now and I really am considering joining, even more after reading quality content like this post.

    I would like to know if it is possible (for members or somehow else) to download this Monte Carlo simulator and use it with our own data from the strategies I am using for example?

    Also, does the randomizer considers the correlation between different strategies, from the input data provided to the program?

    Thanks a lot for your time

    • admin says:

      Hello Bruno,

      Thank you for your comment :o) Well, if you are looking to develop a much better understanding of automated trading then Asirikuy would most probably be a great choice for you ! I am definitely glad you find good quality in my posts as I make my best effort to post good content on this website :o)

      Regarding the simulator, certainly, the software can use input values from any strategy so you can definitely use it with anything you are running provided that you have the backtests. However it is very important to remember that the reliability of any simulation will depend on the quality fo the data you input so ensuring you have accurate simulations based on reliable data is a must.

      The distribution based simulations can also be loaded directly from our profit and draw down analysis tools so you can definitely load a portfolio distribution which matches that of the systems which are being simulated. I hope I have answered your questions :o) Thank you very much again for your comment,

      Best Regards,

      Daniel

Leave a Reply

WordPress › Error

There has been a critical error on this website.

Learn more about troubleshooting WordPress.