Click here to Login





                                                   Receate ETFReplay strategy

  2

0
Jeff D
2014-01-15 22:30:28


I'm trying to recreate the strategy put forward by ETFreplay.com

The interesting thing about their strategy is that its an extension to Mebane Faber's IVY Portfolio idea. On their site it seems to work well, but it is extremely limited because they only have ETFs in the db.

I got so far as setting up the system with the two factors (ROC and Volatility) and the weights (Thanks QS for your help!). Problem is the results are not the same as ETFReplay.

This is to give you an idea to see where I am going wrong:

Return A is 6 months weight 50%
Volatility is 20 days weight 50%
Rebalance once per month

These ETFs: TIP, TLT, VEU, VNQ, VTI

Here the results 2013 - today from their site you can see the stock that ranked 'top' each month (don't worry about the percentages after they are return for the month, return SPY benchmark, volatility return, vol benchmark:

Jan 02, 2013 Feb 01, 2013 VEU +1.68 % +3.55 % 9.7 % 6.2 % 5
Feb 01, 2013 Mar 01, 2013 VTI +0.54 % +0.58 % 12.7 % 12.9 % 5
Mar 01, 2013 Apr 01, 2013 VNQ +2.83 % +3.05 % 7.0 % 7.9 % 5
Apr 01, 2013 May 01, 2013 VTI +1.11 % +1.43 % 15.0 % 14.4 % 5
May 01, 2013 Jun 03, 2013 VNQ -4.69 % +3.83 % 15.8 % 10.0 % 5
Jun 03, 2013 Jul 01, 2013 VTI -1.01 % -1.30 % 17.5 % 17.4 % 5
Jul 01, 2013 Aug 01, 2013 VTI +6.20 % +5.76 % 8.0 % 7.6 % 5
Aug 01, 2013 Sep 03, 2013 VTI -3.76 % -3.67 % 10.4 % 9.6 % 5
Sep 03, 2013 Oct 01, 2013 VTI +4.27 % +3.52 % 8.9 % 8.8 % 5
Oct 01, 2013 Nov 01, 2013 VTI +3.51 % +4.06 % 12.8 % 12.2 % 5
Nov 01, 2013 Dec 02, 2013 TIP -0.82 % +2.45 % 5.8 % 8.9 % 5
Dec 02, 2013 Jan 02, 2014 VTI +2.05 % +1.87 % 10.1 % 10.3 % 5
Jan 02, 2014 Jan 14, 2014 VTI +0.62 % +0.41 % 10.9 % 11.2 % 5

CAGR 12,7% Sharpe 1.03

I used this script for QS:

filter1 = close * sma(volume, 10) > 5; //volume filter should be much higher, low just for all stocks in this case

value1 = rocr100(close, 120); //rate of return
weight1 = 0.5;

value2 = Stddev(close, 20); //std dev
weight2 = 0.5;

newmonth = month() != ref(month(), 1); //once per month

// This will calculate percentile (0 - 100) - The higher the better percentile - rank
res = comp(value1, "percentile", 1, filter1) * weight1 + comp(-value2, "percentile", 1, filter1) * weight2;
// Then calculate ranking
res = comp(res, "rank", 1, filter1);

buy = (res == 1) and newmonth;
sell = (res > 1) and newmonth;


The results here are very different with CAGR 2.64% sharpe 0.40

To implement the ETFReplay system this is what they "explain" to us:

How The ETF Screener Works

The ETF screener, is a statistical model that uses 3-factors to rank ETFs by their relative strength. (Note: The various relative strength backtests on the website are automated applications of the screener.)

The following simple example will demonstrate how the Screener works:
The screener will include only those ETFs in the chosen list that have sufficient trading history to qualify for the return and volatility time periods selected. For example, if 6-month Returns, 3-month Returns and 3-month Volatility are chosen, the screen will exclude any ETFs with less than a 6-month trading history.
The ETFs are ranked for EACH factor (Returns are ranked high to low. Volatility is considered a negative and is therefore ranked low to high)
Symbol 6-month Returns 3-month Returns 3-month Volatility
AAA +7% +17% 16%
BBB +24% +11% 23%
CCC +6% +5% 5%

Would be ranked as:
Symbol ReturnA Rank ReturnB Rank Volatility Rank
AAA 2 1 2
BBB 1 2 3
CCC 3 3 1
The factor ranks are then weighted to produce an overall rank.
If the weights chosen were:
ReturnA: 40%
ReturnB: 30%
Volatility: 30%

The weighted ranks would be:
Symbol Weight Factor Ranks Weighted Rank Overall Rank
AAA (0.4x2)+(0.3x1)+(0.3x2) 1.7 1
BBB (0.4x1)+(0.3x2)+(0.3x3) 1.9 2
CCC (0.4x3)+(0.3x3)+(0.3x1) 2.4 3

In the event of a tie, where two or more ETFs have the same weighted rank, then the factor that has been assigned the largest weighting determines the order.
If there is a tie and the weights are equal, such as ReturnA: 50%, ReturnB: 50%, Volatility: 0%, then the first non-zero weighted factor is used as the tiebreaker.

Any suggestions ideas on how I can replicate this as closely as possible? I want to use the "concept" with other stocks.

Thanks.



QuantShare
2014-01-16 12:00:19

  1

Best Answer
Hi,

I am getting results almost similar to the ones reported by ETFReplay, so you will need to check if all historical data was downloaded for (TIP, TLT, VEU, VNQ, VTI) and also make sure that strategy is set to "Long" only and that the number of positions is set to 1.

The small difference could be explained by the difference in volatility's calculation.




Jeff D
2014-01-16 18:47:03

  0

Perfect! Shows I'm learning QS. I started looking into the programmatic way of adding long only and number of positions when all I had to do was Click Long and Number above the code!!! :-)

Works fine now. There is a difference and that is because there is some interpretation to their system. The long term results are close but not exact.



Frank
2014-01-17 13:39:55

  0

You should not use standard deviation to replace volatility. SD of an ETF with a high closing price is automatically much higher than SD of an ETF with low closing price. You would have to normalize SD. But better use historical volatility.

Here is the formula:
logchange=log(close/Ref(close,1));
sdlogchange=stddev(logchange,21);
HisVol=sdlogchange*100*sqrt(252);

Regards
Frank



Jeff D
2014-01-18 15:14:04

  0

I know there are lots of different ways to measure volatility and return. In fact this was the premise of my thread. My goal was to recreate in QS the ETFReplay system. Even if they published their system (see above) they leave a lot out. My objective firstly is to reproduce their results, then to make changes, optimize, improve. This is where I will try different volatiles such as the ideas from Frank and Alex.

For now, I have come very close:

Volatility to use is ATR method

And Return ROC.

This gives a very close result. Not perfect but I think the other step is stock data. I'm pretty sure they use dividend and split adjusted data. I have come even closer with Portoflio123 and their data is similar.



No more messages
0




Reply:

No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"










QuantShare

Trading Items
Strategy Indicator - Percent winning trades for a trading rule
Adaptive BuyInd MR_Mom Strategy
Sleep Well Bond Rotation Strategy V1.0
FRAMA Adaptive Strategy
Trading Strategy based on the Number of Buy Signals

How-to Lessons
Difference between the watchlist and the screener tools
How to create a trading system
How to generate buy/sell signals from a trading system
How to create and trade a Neural Network model
How to add a metric in the trading system simulation report

Related Forum Threads
Momemtum Strategy
Set Position Size by Ticker Within Main Strategy
Advice on building a trading simulator strategy
Compare strategy total returns or benchmarks on a percentage scal...
Testing intraday strategy , but couldn't replicate thru formula.

Blog Posts
Create a trading strategy using the money management tool - Part ...
Trading the Strategy Equity Curve
How to Backtest a Strategy from a Chart
Backtesting a Strategy Based on Bond and Stock Index ETFs
Money Management: Scale-in Trading Strategy









QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2024 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.