Well, I think anyone here is familiar with slippage and commission, so I don't need to really explain those terms.Quote from ssrrkk:
I am familiar with resampling and permutations, so-called bootstrapping techniques to improve the confidence on your parameter estimates. But rather than those details, I still would like to see your slippage and commission models within sellShort and buyLong functions.
When you test a strategy, you simulate trades under realistic conditions. That means you have a broker model that simulates a certain broker; the results would be different with any broker. The broker model should be managed and updated by the trade platform. Otherwise you'd be forced to script such a model with slippage or commission in your strategy, and change it anytime when your broker changes the spread. The results that I posted in this thread use the FXCM model, at a spread of 2.6 Pip. As FXCM is not a cheap broker, you will probably get slightly better results when simulating other brokers. But FXCM is the only model that I have at the moment.
Most broker parameters such as rollover, commission, spread, are trivial or can be even zero, as in the case of commission. Slippage is not trivial and depends on the overall trade volume as well as on the price slope. It must be measured using a real money account for getting a slippage matrix that you then use in the test. Otherwise you have to estimate it. By the way, contrary to what I've seen on some trader websites, slippage is measured in seconds, not in percent or Pip or Dollars.
