Backtesting of strategies is best done with at least 10+ years of historical price data, preferably even more. However, ETF's with such prolonged historical data are rare. The obvious escape would be to replace ETF's with look-a-likes from mutual fund companies like Vanguard or Fidelity. Can't we have both ways at the same time?
Actually we can, thanks to Michael Kapler's excellent
Systematic Investor Toolbox for R: SIT. Some time ago Michael added a special function to his SIT:
getSymbols.extra. Using "
R", the language for statistical computing and graphics (get it
here), the code composes synthetic ETF's with extended historical data retrieved from suitable mutual funds on full auto while taking care of a seamless fit along the way. With a minor addition to Michael's code, in one and the same run for each ETF the newly created synthetic prices can be saved to CSV-file. Next, with its Import Wizard, these CSV-files can be imported into
AmiBroker's database quite easy. Alternatively, pulling the CSV-data into
Excel is another achievable option.
|
CSV-data after import in Excel |
The chart below shows the extended price history of $VWO. First the data of EEM is added and calibrated to fit and extend VWO. Next the same is done with the addition of VEIEX' data. Finally the data of FEMKX is added, thus prolongating VWO's history
from 2005 back into 1990 adding almost 15 years of
backtestable data.
|
$VWO: VWO extended with EEM extended with VEIEX extended with FEMKX |