Acrary's Confidence List

Discussion in 'Strategy Building' started by mark_mm, Oct 11, 2013.

  1. mark_mm

    mark_mm

    Hi folks,


    I have been reading through Acrary's excellent thread System Development with acrary and I am trying to build a program that generates the same tables as his examples. (See end of this post).

    Looking through his posts he states that he uses a Monte Carlo calculation to generate outcomes used to produce this table. He says he runs the # of trades (here 10) 10,000 times. In other posts he states he uses

    Outcome = Mean + (Zscore * Std. Dev.)

    to generate each outcome. In other posts he says he randomizes the Zscore so the outcome will be different each trade.

    A few things that aren't clear.

    1. In the example below the std dev is 0 so the outcome would always be the mean (as zscore * 0 is 0), so not sure how he generated the table below.

    2. Assuming the percentages are the confidence intervals, how is he generating the outcome/profit factor and max dd for each %?

    He also states the following after someone asked the question above.


    I went back and looked at the program to see exactly how it works. What I'm doing is loading a table of z scores for all values from .5 to 99.5 in .5 increments. For example, the z score value at 51.0 I'm using is .025. Then the program randomizes both the % win based on the win percentage input and the size based on random from .5% to 99.5% and ranked for outcome, profit factor, and MAX DD. When I created this, I was thinking of a VaR Analysis where you can see the distributions of outcomes and DD on graphs at various levels. I think the proper name for the test is Monte Carlo VaR Analysis if you want to look it up on the net. Sorry for the confusion.


    So he maps percentages onto zscores using a normal distribution. Then the part in bold which I think needs unpacking or elobrated?


    Thanks to anyone who can help out.

    --------------------------------------------------------------------

    Model name daytrade
    # of trades in series 10
    % of trades that are winners 70
    Mean of winning trades 500
    Std. Dev. of winning trades 0
    Mean of losing trades 500
    Std. Dev. of losing trades 0


    Outcome Profit Factor Max DD
    1% level 5,000.00 10.00 0
    5% level 4,000.00 9.00 -500
    10% level 4,000.00 9.00 -500
    20% level 3,000.00 4.00 -500
    30% level 3,000.00 4.00 -500
    40% level 2,000.00 2.33 -500
    50% level 2,000.00 2.33 -1,000
    60% level 2,000.00 2.33 -1,000
    70% level 1,000.00 1.50 -1,000
    80% level 1,000.00 1.50 -1,000
    90% level 0.00 1.00 -1,500
    95% level -1,000.00 0.67 -2,000
    99% level -2,000.00 0.43 -2,500
    Expected outcome 1,950.00
    Expectancy 200
     
  2. acrary

    acrary

    ok, I'll try to explain it a little better.

    In the example given the z score is not relevant as you explained because there is no variability in individual trades (0 std deviation).

    The mean win and loss then becomes the expected trade win 500 or lose 500 per-trade.

    The win/loss % is based on a random number generator from 1 - 100.
    Since the win % is 70 any number from 1 -70 would be a win of 500.
    Any number 71 - 100 would be a loss. The totals for end result, profit factor, and drawdown are the observed values after all series of 10 trades each * 100,000 passes. At the 50% level 70% of the trades are winners +3,500 and 30% of trades are losers -1,500 so the net is +2,000. Likewise the pf is 3,500/1,500 for 2.33. The drawdown is the maximum drawdown observed. In this case there was either 2 losing trades together or a combination of 1 win and 3 losses in a short series that produced the maximum drawdown.

    Hope that helps.
    Alan
     
    beginner66 and pisco like this.
  3. mark_mm

    mark_mm

    Thanks Alan,

    I appreciate you taking the time to reply and helping me understand better. I can continue on with the project, and thanks for the excellent information you have shared.

    Regards

    Mark
     
  4. mark_mm

    mark_mm

    This is a screenshot of software, it also includes a graph to show the equity curve paths from the monte carlo runs based on the inputs.
     
    beginner66 likes this.
  5. You could model your experiment as a random walk. There are closed-form mathematical formulas for what you want (stats, probs, confidence interval, etc.)
     
  6. In 10 trades there is a non-zero probability that all 10 trades are losses, which should lead to -5000 as a loss/drawdown. Why is this loss not in your listing of results? Is your 10K runs the cause?
     
  7. acrary

    acrary

    The tables only go up to 99% confidence level. The expected number of occurrences in a population of 100,000 trials with 10 losses is only .59. This is indeed a rare event. (.3^10)*100000 = .59

    Alan
     
    pisco likes this.
  8. I understand that the randomness is due to the random character of the set of trades drawn from the population of all possible 10-trade sets. A confidence level is associated with a variable being estimated. What is the estimate being studied in this case? If it is the mean, what is the formula for the confidence level? If it is based on normal distribution, I think it would need to be a bit adjusted to take into account the fact the size of the sets which are small.
     
  9. I derived a formula for the drawdown. With 95% confidence, for the example above, the drawdown would be less than 2030. This estimator should be an upper bound on the actual drawdown, and is therefore biased towards the safe side. What is the 95% confidence interval on the drawdown obtained from the simulation? It would help assess the formula.
     
  10. pisco

    pisco

    What is the name of this software? Appreciate your reply!
     
    #10     May 25, 2015