[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Systems and System testing.



PureBytes Links

Trading Reference Links

>I actually have one very simple code question.  This summer I used
>LeoWeb software to trade.  Not bad software.  A few fills were late in
>getting back, but other than that it wasn't too bad.  I found most of my
>S&P trades (at market orders) were executed somewhere near the close of
>the next bar, after my signal, on one minute bars.  Sometimes they were
>faster than that, but I figure that is a good entry point for any
>systems I develop.  So what is the code to say - enter the market at the
>close of the next bar?

You could program your system to buy at the close of the next bar, however I
don't think this would solve your problem.  You're trying to simulate the
one bar lag in your fills. If you buy at the close of the next bar, your
signals will be delayed one bar, and then your fills will still be lagging
one bar after that. To simulate the lag in your fills I'd suggest you add
some code to your system which calculates the total slippage due to the one
bar fill lag.  So when your system gives the signal, you would then
calculate the slippage from that point to the most adverse point on the
following bar. Then subtract this number from your system net results.