what the hell happened!?!?

Discussion in 'Strategy Building' started by feng456, Dec 23, 2011.

  1. What is this? A CEO talking to a quant about his CDO pricing pre-2008?
     
    #31     Dec 24, 2011
  2. feng456

    feng456

    my data was backtested manually. what i have is basically on list of 4 years of trades on excel done manually (yes it took a long time). it's a list consisting the following format:

    June 2011
    1st 5
    2nd -5
    3rd 5
    .
    .
    .
    Total for month: 10
    etc.etc.


    how do i do a monte carlo analysis on this? i have absolutely no idea because i never learned how to do it so thats why i was asking for a site where i could learn it. i looked it up on google and so far the tutorials ive gotten have no connection to my dataset.
     
    #32     Dec 24, 2011
  3. There are many variations of MC techniques, but the basic idea is to generate synthetic equity curves by resampling the equity curve generated from running your system on historical data.

    Here's one simple way you might do this:

    1) Run your system on historical data and compute your daily returns. For a four year run this generates ~1000 samples.

    2) Generate a synthetic 12mos equity curve by randomly chosing 252 samples from your historical returns in step #1. Compute the yield and max drawdown and save it.

    3) Repeat #2 many times (>1,000). This generates a distribution of synthetic 12mo returns and drawdowns that you can use to calculate confidence intervals and the like.

    Note that this method will scramble out any serial correlations that might exist, which will make your drawdowns look less severe than they might actually be. But you get the idea.

    Here's a paper from the group I mentioned that describes the technique in more detail:

    http://www.tradingblox.com/Files/MC_resampling_Nbars.pdf
     
    #33     Dec 24, 2011
  4. feng456

    feng456

    Thanks jazzy. An explanation I understand!
     
    #34     Dec 24, 2011
  5. 377OHMS

    377OHMS

    Excellent post. Really great stuff, I hope folks realize what your post contains. I've been working on serial correlation as well (random sampling, lag etc). Data that is serially correlated and is not randomly sampled will always yield optimistic results compared with results that have been randomly sampled with sufficient space between samples (lag) to achieve reasonable independence.

    I ran into this when I was working on some radar tracking data for a client. Closed-loop tracking system errors are not independent or are any outputs from a Kalman filter.

    Maybe the best post I've seen on ET, certainly in the Top-10. Thanks.
     
    #35     Dec 24, 2011
  6. Sorry to hear. And somewhat frightening. But I'm sure it will never happen to me. :eek:

    I'm curious about the frequency of trades. How many per month?



    Happy Solstice Holidays everyone.
     
    #36     Dec 24, 2011
  7. My pleasure, feng - hope its helpful.

    Happy Holidays to everyone!
     
    #37     Dec 24, 2011
  8. d08

    d08

    Awesome, sir. Just plain awesome :D
     
    #38     Dec 24, 2011
  9. Thanks for the kind words, ohms - appreciate it!

    For those interested in more techniques along these lines, try googling "White's Reality Check" (there's a WRC paper on the reddit group I mentioned as well).
     
    #39     Dec 24, 2011
  10. Well I guess you learned a lesson. The past is not indicative of the future. Chalk it up and move on...
     
    #40     Dec 24, 2011