Composing Synthetic Prices For Extended Historical ETF Data

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

Harvesting Momentum: Let's Kick Tires With AmiBroker [ Part III - Final ]

The previous posts in this series covered a basic Tactical Asset Allocation approach with with signals taken from the daily and the weekly time frames. This final post will be dedicated to portfolio rotation based on monthly and quarterly time frame. Only two asset class universes will be covered. Multi asset class universes are going to be the subject of a future post.


Taking the monthly time frame into consideration basically means rotation decisions are made once a month, after the close of the month. For the quarterly time frames this comes to only 4 re-balancing opportunities per year: at the end of each quarter. However, usually the re-balancing frequency is way lower.

For backtesting once again the source code provided in the opening post will be used, basically allowing the DIY retail investor to engineer his own alpha. Even if you don't have access to thinkorswim or Amibroker, the strategy at hand can be fairly easy implemented using Excel, since momentum is the only metric taken into consideration for re-balancing decisions.

Monthly Periodicity

The typical US stock market year has 252 trading days (= 12 months with 21 days on average). So for the previously used 85 days/17 weeks lookback period, momentum calculated over a 4 month period (= 4 x 21 days) is suitable. Applied to the base pair (SPY-TLT) this 4 month lookback period renders the following results.

Portfolio Equity SPY - TLT (4 months), drawdown periods in red