Backtesting

Discussion in 'Automated Trading' started by DanFenner, Feb 9, 2010.

  1. I've developed a long-only, intraday system and am in the process of backtesting the algo. Hopefully the community can provide a little guidance.

    x. How much time/testing is necessary to provide a solid population of data?
    x. I've currently tested on 100 stocks from September 2005 - February 2010, so approximately 1100 trading days through 100 different stocks.

    x. What kind of results are considered worthwhile, in terms of units?
    x. Return per event? Aggregate return? Monthly? Daily?

    x. What are the most important performance ratios/metrics for a potential investor/partner?
    x. Is Sharpe applicable? What other risk-adjusted performance ratios should be put into the evaluation?

    Please offer any guidance you have found helpful.

    Thank you.
     
  2. x. How much time/testing is necessary to provide a solid population of data?

    2-3 different markets- trending up/down, down, sideways...

    I'd say 1000 different trades depending on how often it trades
    higher the frequency, the more trades req'd.


    x. What kind of results are considered worthwhile, in terms of units?

    I'd say to make it worthwhile for a small guy 2:1 including slippage and commissions.

    x. Return per event? Aggregate return? Monthly? Daily?

    This is subjective (scalability is also important here (how much money could be put to use given such an opportunity)

    Account for commissions + slippage

    Evaluate scalability- How many contracts, shares, options etc could be bought on average without adversely affecting the Market...

    x. What are the most important performance ratios/metrics for a potential investor/partner? x. Is Sharpe applicable? What other risk-adjusted performance ratios should be put into the evaluation?

    I'd say look carefully at scalability. Trading is a business and you only have a few critical moments in business to capitalize on them and allow people to give you a chance, not to mention oftentimes, one time kind of Market opportunities that exist if you are ready for them.. so don't invest time in something overoptimized or something that doesn't scale.

    By scalability - does it enable for returns for larger accounts, as you grow -- look at the number of ongoing trades (did the system make all its money during the tech bubble, or does it continually profit from ongoing Market opportunities? Is it good in long/short up/down/sideways Markets?Is it good in more than one asset class (shares, bonds, futures, options)?

    Sharpe ratio is important in general to avoid performance anxiety or impatent investors who bail on you (like trend followers often get) but look at option sellers- they blow up every 5 years on black-swan events, in spite of a high sharpe ratio. (develop your own common-sense sharpe ratio to justify ongoing and one-time risks to your own capital)
     
  3. psytrade/

    Great response... will look over it in further depth.

    I'm calculating the Sharpe right now. If you have a second, I'd appreciate some further clarification. Assume the following hypothetical...

    Return over 4 years (1000 trading days) = 600% total, with every day contributing a change.

    Risk free = (5%/360)*1000 = Correct?

    StDev.... would I take the StDev of the cumulative total... as in, highlight the entire column of daily cumulative returns (equity curve) in Excel and take the StDev of that for my denominator?

    so....

    (600% - ((5%/360)*1000)) / StDev of cumulative returns?
     
  4. Great.

    The StDev part is confusing me. What data do I plug in for the StDev calc? Is it the daily % changes over the time period?
     
  5. average of the maximum(hi,low) in percent of the daily equity movement.
     
  6. So the average between the best day and worst day? For each year? 4 data points?

    Best = +100%
    Worst = -80%
    Avg = 10%?

    Sorry I'm not picking this up quicker.
     
  7. I'm pretty sure its done daily, thought some funds do it monthly...

    you can pick, but I'd do it daily, its more honest IMO.

    The article investopedia says you can calculate daily/monthly/annually.
     
  8. Net profit and ROR are the only sensible measure for speculators.
     
  9. Out of curiosity, why did you design a system with Long only? Is it because of the account you are trading on (a company 401k where you can only buy certain mutual funds, etc)?
     
    #10     Feb 10, 2010