When using Pad & Align, is there a parameter to set the "pad" value to the next valid price so empty days are filled in with the next available price?
As far as I know, you will always get prices from the previous bar. Looking ahead to the next bar seems like peeking into the future... even if it was possible, are you sure you want to do that?
If it was always the previous value, how is it padded when there is no previous value? For example if the SPY had a complete history but XLF started in late 1998, how would XLF be padded ? Also, if I had a signal "today" to enter at tomorrow's Open, but there was a gap in day's and it filled in with today's Open, that poses a problem as well.
I am getting padded values of -1000000 when writing to ASCII.
Thanks,
Mike
If there is no previous value then padded value is Null. Null in AFL currently is special value of -1e10 (-10000000000). Don't hard-code it though. You should be using ISNull function to detect it http://www.amibroker.com/f?isnull
I think you need to consider what these conditions would have meant in live trading, rather than focusing on the "inconvenience" to your backtest. Why try to test the results of trading XLF in the early 1990's if in fact it did not exist as a trading instrument until 1998? And if you have holes in your data, then either your data provider has errors which should be addressed, or else the instrument in question was so thinly traded that there were days with no trades and therefore no prices. No one can say what would have happened if you'd entered an order on that day: maybe someone would have taken the other side of your trade, and maybe not.
Thanks Tomasz , as long as -1000000 is the expected & normal behavior I can make it work on my end.
mradtke..Thanks as well. I understand your comments but I was not looking for XLF as a target but as an input into a model. I have rolling cutoffs for dates but they all need the same valid starting point, even if the value is stagnant when it does start to report values I can pick it up as a potential input. More of a coding issue on my end then a real time trade issue.
Thanks,
Mike