Click here to Login




Create Profitable Trading Strategies with Exchange Traded Funds (ETFs)

Updated on 2013-02-28





ETFs Selection (Correlation matrix)

One way to select exchange-traded funds (ETFs) to include in your trading systems is by using a correlation matrix.

The idea is to pick two or three ETFs then select the remaining (depends on the number of exchange traded funds you want to use in your trading strategy) by choosing the ones that are less correlated with the first ETFs you have chosen.

Here is how to create the correlation matrix:
How to create a correlation matrix of several securities


In the next paragraphs, we will show you how to implement and optimize a trading system based on ETFs. This system will include the following ETFs:

SPY: SPDR S&P 500 ETF
=> Represents the stock market of the world's largest economy

IWM: iShares Russell 2000 Index
=> Small caps often behave differently from large cap stocks. One average, the annual return of small cap stocks exceeds the return of large cap stocks.

EFA: iShares MSCI EAFE Index ETF
=> Represents developed economies of several countries (Europe, Australia, Asia...)

EEM: iShares MSCI Emerging Markets
=> Emerging countries are very important because they are major contributors to the global economic growth. They have higher volatility (riskier) but they also offer great potential for higher returns.

AGG: iShares Barclays Aggregate Bond ETF
=> The Bond market is usually less volatile than the stock market and thus could reduce the drawdown and volatility of our strategies

VNQ: Vanguard REIT ETF
=> To add further diversification, it is important to include REITs (real estate investment trusts) investments.

GLD: SPDR Gold Shares
=> This ETF allows us to invest in a very attractive market: the gold market

DBC: PowerShares DB Commodity Index Tracking Fund
=> Based on the DBIQ Optimum Yield Diversified Commodity Index Excess Return, this fund invests in commodities futures, including light, Sweet Crude Oil (WTI), Heating Oil, RBOB Gasoline, Natural Gas, Brent Crude, Gold, Silver, Aluminum, Zinc, Copper Grade A, Corn, Wheat, Soybeans, and Sugar.


ETFs-based Trading System

The trading system consists of a buying the top four ETFs based on their momentum (or any other measure) and rebalance monthly. This means that each month, we will sell all active positions and buy the new top four ETFs.


Implementing the Trading System

Select "Analysis -> Simulator" then create a new trading system.

In order to buy the top 4 exchange traded funds, we will use the "comp" function. This function ranks securities, each trading bar, based on a specific criterion. In our case, we want to rank ETFs based on momentum and thus we will use the 25-bar (one month) rate of return to do this.
We should exit any position on the beginning of a new month only if it is not on the new buy list (top 4).

Here is the trading system formula:
buy = comp(roc(25), "rank") <= 4;
sell = month() != ref(month(), 1) and !buy;


Now, select "Symbols & Dates" tab, add a "Custom Symbols" condition under "Symbols" then copy the symbol names of the different exchange traded funds (see above).

Don't forget to set "The number of positions" field of the trading system to "4".


Momentum or any other measure

The next lines will show you how to choose a better measure to rank ETFs. We have previously used momentum as a measure but we can use QuantShare optimizer to analyze hundreds of measures and choose the one that performs best in our trading system.

This technique consists of creating several trading rules (measures in this case) then use the "ApplyRule" function to create several trading systems each one using a rule from the trading rules list.

Steps:

- Select "Analysis" then "Rules Manager"
- Click on "Create" to add a new list
- Select your list then add several measures

Example:

roc(25)
roc(100)
rsi(2)
rsi(14)
close - sma(30)
hhv(30) - llv(30)
sharpe(close, 25)
stddev(25)
...



Here is how to create thousands of trading rules using the "Rules Manager" tool:
How to create and backtest thousands of trading rules in less than 10 minutes
10 masks to create thousands of rules to use into your trading system


Optimize your trading system

Now that we have created the initial trading system and a list of measures, let us combine them to create and backtest several trading systems in order to find the most profitable ones.

Update the original trading system then replace its formula by this one:

nbRules = ApplyRule("", "MyList", -1);
Optimize("m", 0, nbRules - 1, 1);
measure1 = ApplyRule("", "MyList", m);
buy = comp(measure1, "rank") <= 2;
sell = month() != ref(month(), 1) and !buy;


Explanation:

Line 1: Get the total number of rules/measures in your trading rules list "MyList" by specifying "-1" as last argument of the "ApplyRule" function
Line 2: Create an optimizable variable "m"
Line 3: Calculates the measure that is located at index (m) in the trading rules list "MyList"
Line 4: Use that measure when ranking ETFs




Save your trading system then click on "Optimize" to backtest the different variations of the trading system. Pick the most profitable one or choose one given your own metrics.

After selecting the best trading system, note the "m" index value, open the "Rules Manager", select your list of rules then select "Tools -> Display All Rules".
In the new form that appears, you can get the measure formula that corresponds to the "m" index.














no comments (Log in)

QuantShare Blog
QuantShare
Search Posts




QuantShare
Recent Posts

Create Graphs using the Grid Tool
Posted 1461 days ago

Profile Graphs
Posted 1566 days ago

QuantShare
Previous Posts

More Posts

Back







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.