0
$\begingroup$

I am quite notice at the business of backtesting for an automated strategy. I was wondering, can I/should I use High and Low for this purpose? On one hand, the algorithm will see these prices, but on the other, the order in which they are seen is not defined, so there is a potential ambiguity there. Also, buying at "High" is not realistic since the algorithm will never know that's it is the highest price for the day.

What do you think or advise?

$\endgroup$

1 Answer 1

2
$\begingroup$

No you certainly should not use in simulation any data that you don't know in real environment because simply results will be much different.

Simulation should be created in environment as much possible similar to real environment.

You basically should use only Open values for making trades, High/Close/Low you can use for indicator calculation of past candles.

High/Close states are not usable because you don't know in what order they appear, this can be:

 - Open, High, Low, Close
 - Open, Low, High, Close
 - Open, High - 2, Low, High - 1, High, Close

If you are using OHLC data and you are calculating operation OnCandle appears then you can use OHLC from past candles and only Open from current.

In general you can use OHLC in current candle for making trades but current candle High/Low should be created online using TickData stream.

$\endgroup$
2
  • $\begingroup$ thanks a lot for your answer. Why can't I use Close though? $\endgroup$
    – elelias
    Oct 3, 2013 at 10:04
  • $\begingroup$ @elelias: because when Close price appears then is not valid any more, often close prices (on stock) are just fixed after live trading was end and are just for indicator of open price on next day. You should not use Close price because is not graduate price on what you can place order, for example market can be closed, you should use next candle open instead that are created only when market was opened or when market are open then you have after each close, valid open price immediately. $\endgroup$
    – Svisstack
    Oct 3, 2013 at 10:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.