Montecarlo

Viewing 14 posts - 1 through 14 (of 14 total)
  • #8489

    Hi Nicolas… in a previous interesting post you mentioned that you were going to explain a little bit montecarlo and forward test analysis. http://www.prorealcode.com/blog/avoid-equity-curve-fitting-with-probacktest-trading-strategy-optimisation/

    This site is amazing and I found thousand of good thing in here but I found also some curve fitted strategies.

    We need all to learn more about montecarlo and forward test… Would you like to open the discussion?

     

    I have build with a friend  my own montecarlo excel file and we have tried together to understand it but the conclusion it is that for any kind of TS we make the analysis we got very similar results! this mean 2 things, or the montacralo is useful or I don’t know how to read the results well…

    Would you be so kind to teach us a little bit?

    If all the users will start to use it together with the backtest I am sure that we will get much better TS in the future in your library!

     

     

     

    2 users thanked author for this post.
    #8525

    I am also very interested in this. @Nicolas, can you share some links as background to understand Monte Carlo, and how one would go about building this in Excel?

    #8526

    I’ll be following this thread so close 🙂

    #8527

    If nicolas will teach us a little how to read it I can share the one created by me and my friend.

    At the moment all the Ts that I have tested with it gives similar result and no big decision can be made….

    In the mean time if anyone want to test his system with montecarlo can send me their data and I will send the results.

     

     

    #8631

    I’m following this! 🙂

    #8636

    Well, that’s a long debate and a big subject. Is Monte Carlo analysis trustable? I think it does. I don’t know how you made your matrix David, so maybe there are something that don’t make your random trades so “random”. There are many ways to deal with the trades PnL datas from backtest, and there are no “one way” to do it. What make sense to me is to introduce: 1/ non traded days 2/ a criteria to give an average of positive trades or not 3/ gain and loss must be adapted with std dev of their average to simulate spread, fees, slippage, etc.

    In any case, if your backtest average gain is superior to your average loss, your distribution will be likely other negative profits level with a large proportion. So what we want here is to simulate what we should expect with future market, so playing with 1/ and 2/ with much more simulated trades than your backtest/forward test has, is the main purpose of this test. Sometimes, reducing percentage of profitable trades of only 1% make things dramatic..

    There are a lot of academic papers that deal with Monte Carlo analysis and not only for financial purpose, if you have time to spend on maths theory and headaches don’t afraid you : http://www.jurn.org/#gsc.tab=0&gsc.q=monte%20carlo&gsc.sort=

    I just google it and found this nice page on Investopedia : http://www.investopedia.com/articles/financial-theory/08/monte-carlo-multivariate-model.asp

     

     

    #8660

    Nicolas, what do you think if we take a Ts that works with normal results and the same one curve fitted. After this we compare the montecarlo test between them? (In the mean time I check with my friend why my montecarlo does not work soo good)

    We will start to learn something on real tests. Maybe not everyone want to know the mathematics that there is behind it (really complicated) but only to know how to read the results. What the others thinks?

    #8662

    Well, that’s a good idea.

    #8716

    Do you have a TS to propose? I will make the optimization…

    #9266

    Hi Guys/Nicolas,

    What do you use Monte Carlo for? What is it that you are trying to determine? I am new to MC, and how it can be used in building strategies.

    What I have been able to do so far:

    1. Simulate/generate new data for an instrument by using drift, standard deviation, variance, PDR, etc.
    2. Calculate possible max drawdowns by randomizing/reordering trade/backtest data – in this test the profit stays the same for all simulations.

    Nicolas, how do you setup your simulated equity charts (MC simulations) specific to a trading strategy – what are your inputs, variables, etc? What do you vary for each simulation?

    I am happy to try to figure this out, but would appreciate some direction in this regard.

    Thanks

    Stef

     

     

    #9274

    Hi Stef / everyone,

    Setting up Monte Carlo to simulate a ‘random walk’ is the first step. The simulated data needs to possess the same characteristics as the backtest data (i.e. Open, high, low, close). Tick by tick data would be optimal however haven’t thought as to how this can be done.

    The next part, which is the trickiest – is to translate the Trading System from PRT to Excel so that it can perfectly execute the logic against the new simulated candlestick data (i.e. Forward testing). Would be interesting to see how this can be achieved.

    Any attempt to run MC on the TS backtested results will only be inherently biased.

    Thoughts welcome – cheers

     

     

     

    #9277

    @Grizzly

    You are right about biased results of the MC simulation because of use of the backtest data, that’s why in my own MC test I introduce a wide varieties of random behaviours of trades. In addition, you can add many more lines of trades than the backtest has done because of limitation of history.

    I already told what I do in these tests, in my previous reply: http://www.prorealcode.com/topic/montecarlo/#post-8636

    About totally random OHLC and test the strategy with, you have many other instruments to test with the same strategy in PRT already 🙂

    #9289

    @Nicholas

    Can you share your MC test file ? 😀

    #9290

    No I’m sorry I can’t, because it’s part of optimization report I send to my customers. It would be easier for anyone to understand I guess.. but I already gave here all the details.

Viewing 14 posts - 1 through 14 (of 14 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login