Portfolio backtesting

Discussion in 'Strategy Development' started by kut2k2, Aug 25, 2006.

  1. kut2k2


    Any ideas on what to use for an outside-generated indicator that can be imported? I'm looking for a commercial program that will do the backtesting or a spreadsheet/custom program. TIA.
  2. If you don't mind making the outside indicator into an ASCII file that looks like a "price data" file to the analysis software, you can call it "Data2" and almost every TA package can deal with that. You're using its intermarket analysis capability except that market#2 is really your outside indicator. Tradestation, for example, can work this way.

    Trading Recipes and Mechanica can read the outside indicator as a "Companion File"and let you use it thataway.
  3. kut2k2


    Thanks for your reply, horribilicus. :)

    Do you know if that works for portfolio backtesting where there will be a separate indicator column for each stock in the portfolio? I'd like to backtest at least 10 years for a basket of about 30 stocks. TIA.
  4. hans37


    I think backtesting is flawed by pretending buying here or selling there in the past would not have affected the market 1 iota in an ongoing manner.
  5. I am performing similar simulations. I write my own software. I am not able to understand my own complex and cluttered spreadsheets. I find programming makes my analysis easier. I find this analysis to be complex. I think it is a useful exercise. I find modeling a portfolio reveals important information about risk, equity growth and draw downs.

    You may send me a private message if you are interested in programming services.
  6. Do you want to backtest on intraday data or daily bars? I do all of my backtesting on portfolios of at least 500 stocks and I use tick data for the stocks.
  7. It all depends on the size that you're trading relative to the liquidity of the trading instrument and your timeframe. All of my trading is very short term (most trades last less than 5 minutes) and my backtests match my actual results very closely. The biggest mistake most people make is they use daily bars to backtest short term swing trading systems on stocks and then think that they're going to get actual results that match the backtests.
  8. Slippage is very important, especially for shorter term swing trading. I suspect slippage is the biggest cost factor since the cost of slippage increases with position size.
  9. kut2k2


    The trading will be eod so the bars will be daily. I'd prefer a spreadsheet solution because that is how my indicator values are generated, but I'll settle for a commercial program that will do portfolio backtesting while allowing input of separate indicator values for each stock. Otherwise it's no good for me.

    I'd only go to a custom program solution after thoroughly vetting it to make sure the programmer's assumptions don't conflict with my own.
  10. If you are using daily bars you still need to use intraday data to create those bars. It is extremely common for the open and close of a daily bar to NOT match the actual trading session open and close prices i.e. premarket and afterhours trading is included in the daily bar data. Your system will not be able execute trades at these prices and it's common for a stock to run-up/down after the close or in the premarket. Your system based on daily bars will book these imaginary profits and your real world results could be vastly different.

    I use NeoTicker for all of my portfolio trading system development, backtesting and implementation. I personally believe it's the best trading package on the market and can do almost anything you can dream up. They are an advertiser on ET, and I can't say enough good things about them. It takes some effort to learn to use it, but that is true for any extremely powerful package.


    #10     Sep 6, 2006