Showing posts with label Strategy. Show all posts
Showing posts with label Strategy. Show all posts

Sunday, March 27, 2016

Urban Forex CCI Divergence Breakout Strategy Testing Setup



Urban Forex CCI Divergence Breakout Strategy Testing Setup






In my search for excellent trading strategies, I keep an open mind and review as many methods as I can. This strategy caught my eye, so I thought that I would document the testing process here on the blog.


This will be a three part series. In this first part, I will explain the trading method and show you how to setup the forward and back test. The second part of the series will show my results from the testing. Finally, the third part of the series will evaluate how to possibly improve on the results.



I’m not sure if this method will work or not, that is why we test. The great thing about this method is that it is available publicly, so I can show it to everyone and you can do your own tests. I’ve tried to make this post as detailed as possible so you feel comfortable doing it yourself and so you can apply the process to other strategies that you come across.


But before we get started, here are a few things that you have to understand…



Why I Am Writing These Posts



My goal is NOT to discredit any of these trading methods that I feature. I’m done trying to expose scams. I strongly believe that it is a much better use of my time to uncover excellence. The methods I feature are strategies that I feel have a good chance of being profitable systems.

I feel that there is a huge gap between free trading strategies that are presented on forums/blogs and what is required to figure out if the trading method is viable and if it fits a trader’s personality. I want to bridge that gap with these posts. Instead of jumping in with real money in the beginning, these posts will show you the safe way to get started.

To stimulate meaningful discussion from people who trade these methods with real money.

I want to uncover the best trading methods in the world. Deconstructing and writing about trading methods helps me understand them much better.

Keep These Things In Mind

Of course, past performance does not guarantee future results

I don’t have any affiliation to this strategy. The only things I know, I have read from their website.

Backesting and demo trading is much different than trading real money

Even if you give the exact same trading system to 10 traders, you will get 10 different results. That is the nature of trading.
Not all trading methods are testable. Very discretionary systems are difficult to test and some are downright impossible. If a trading method is more discretionary, testing might not be an accurate measure of its profit potential.

I only test methods that are provided for free on blogs and forums. I do not take strategies out of paid courses.

All information is for educational purposes only. It is not trading or investment advice.


Now that we have that out of the way, let’s get down to it.

Presenting The Urban Forex CCI Divergence Breakout Strategy

The CCI Divergence Breakout Strategy s courtesy of Urban Forex. It is a trading community created by Navin Prithyani that is based on a core set of Forex trading strategies. Their trading methods are provided for free as a lead for their Forex Watchers training website.

First, we need a plan. Here are is the testing plan for this strategy.


Testing Plan

The first thing you need is a testing plan. Here are the parameters for my first test. You can test on any pair or any time frame above the 15 minute (according to the Urban Forex website), but I want to provide a concrete place to start, so I have picked a specific time and pair.




Currency Pair: EURUSD




Indicators: Commodity Channel Index (CCI), 14 period




Time Period: Daily




Entry: Conservative







Entry







As the name suggests, this is a strategy that looks for divergence between price and the CCI indicator. For a long entry, price must be trending upwards and CCI must also trend upwards, then bounce. After a CCI bounce, connect the lows in price with a trendline. Once price breaks the trendline, wait for a retest of the trendline from the underside. Look for a closed candle that bounces to enter the trade.







Do the opposite for a short trade. I will provide chart examples of both long and short trades at the end of the testing plan.










Stops










The Urban Forex site says to set the stop, depending on how steep the trendline is. The steepness of the trendline can really depend of how your chart is setup. Since I’m not a big fan of subjective rules like this (at least not on the first test), so I’m going to set a rule that is going to use the more conservative stop.










Therefore the stop will go one pip above the nearest swing low, for a long. At the close of each candle, move the stop to one pip below the low of the last candle, for a long.










Do the opposite for a short trade.










Profit Target







Use two lots. The longer term target for the second lot should be the next 00 or 50 level. This should be at least a 1:1 reward to risk ratio. The first profit target should be at 1:1 reward to risk, if it is less than the 00 or 50 target. If there is less than a 1:1 ratio on this first profit target, do not take the trade.










Exit







If the first profit target is hit, then exit at the nearest 00 for 50. Otherwise, stay in the trade until the stop is hit.










Examples










Here is what a long trade would look like.





















This is a short tade example.


















How To Setup A Backtest






















Since this trading method is so simple, it is easy to setup a backtest. Open your favorite backtesting software. I use Forex Tester 2, so I’ll use that as the example.






















If you want to see how to setup your first Forex Tester backtest, read this tutorial. Once you setup your backtest, come back to this post to see how to test this strategy specifically.






















Next click on the List of indicators icon to add an indicator.













































Then add the CCI indicator to the EURUSD chart.













































Make sure that it is set to 14 periods.













































When you see a trade setup, first calculate your stop loss. Then make sure that your 00/50 target is at least equal to the number of pips in your stop loss. If it is not, don’t take the trade. Follow the rest of the rules outlined above for each trade.






















Use a risk spreadsheet to calculate the number of lots to trade. You can create one yourself, or you can download one below for free.






















If you want to create one yourself, here is the calculation. First, figure out your maximum dollar loss, based on a percentage of your account. For example, if you have a $5,000 account and you only want to risk 1% per trade, that would be $50 of risk.






















$5,000 x 0.01 = $50






















Then calculate the cost per pip, based on the lot size that you set up above. If you are using my settings, then the cost per pip will be $0.10.






















This is based on a lot size of 1,000 currency units. If this is confusing, just follow my settings and do a test. You will start to get a feel for the numbers.






















Also compare your results in backtesting to the results in your demo account. That will help you adjust your backtesting settings, if necessary.






















Multiply your cost per pip by the number of pips of risk. So if your stop loss is 100 pips, your total dollar risk by your cost per pip. In this example, that means the following.






















100 pips x $0.10/pip = $10 risk per lot






















Then divide the total risk by the risk per lot to get the number of lots.






















$50 / $10 = 5 lots






















So you should trade 5 lots in this example. That would allow you to only take 1% risk of your total account on the trade. The calculator spreadsheet in the download section will help you do this easily or you can create one yourself.




How to Setup A Forward Test






















Now do that same thing in your broker’s trading platform. Since most people use Metatrader, I’ll use that as an example. The CCI is a default indicator in Metatrader. Add it to the Daily chart of the pair you backtested and monitor the signals.













































Next, setup a free account with MyFxBook. This website will connect to your demo account and collect your trading results. Follow their documentation to connect your account.






















It will give you reports that tell you things about your trading results that would otherwise take a long time to do manually. To learn how to use MyFxBook, watch this video.























How to Backtest the Forex Carry Trade Strategy

How to Backtest the Forex Carry Trade Strategy








Someone emailed me recently and noticed that I haven’t talked about the carry trade for a long time. The primary reason is that it is not a strategy that really resonates with me. But if you know what you are doing, it can be a strategy that provides a hands off income for the lifetime of the trade.



But what doesn’t work for me may work for you. If you want to find out how it works without risking any money in the market, you can easily backtest it.


If you have never heard of the carry trade, I will start by defining it. Then I will give you the exact steps you need to backtest it.

Definition of the Carry Trade Strategy



This strategy is called a “carry” trade because your goal is to make money on the interest or the carry. It takes advantage of the difference in interest rates between two financial instruments.



For example, if you could borrow money at 3%, then turn around and invest it in something yielding 6%, you would want to keep that trade as long as possible because you are making an easy 3% without doing anything and without putting up your own money.



In a similar way, you can take advantage of the positive rollover interest that some currency pairs pay. When you take a Forex trade, you are essentially borrowing one currency to buy the other in the pair.



If the difference between their interest rates is high enough (minus broker fees) you can actually get paid interest for holding the position. To find the pairs that pay the most interest, you can check out central bank interest rates on sites like FXStreet.


Here is what interest rates currently look like…


The two highest interest rate countries:

New Zealand (3.5%)

Australia (2.5%)


The three lowest interest rate countries:

Switzerland (0%)

European Central Bank (0.05%)

Japan (0.10%)


Therefore, you want to trade one of the highest interest rate countries against one of the lowest. One of the best carry trade pairs is the AUDJPY. To learn more about trading this pair, you can read this post.



Before we move on, keep in mind that although these are the interest rates that countries set, brokers charge a fee that reduces the interest rate that you get paid and increases the amount you pay. It is a spread, just like with trades. So the interest rate on the charts isn’t necessarily the rate you will get.

How to Set Up Your Backtesting


The first thing that you have to do is find out the interest rates that your broker uses. This should be available on their site. Since I use Oanda, I will use them as the example. If you cannot find it on your broker’s website, contact the help desk to find out their current rates.

Oanda has a great calculator that I have provided at the end of this post. Since the AUDJPY is a common carry trade pair, let’s use that as the example pair.

Using the Oanda calculator, I’ll set the pair to AUDJPY and the interest rate type to trade. Since the AUD is the higher interest rate currency, a buy will generate positive interest.



This is what it would look like when I set it up after I clicked the Calculate button. The important fields to notice are the Lend Rate and Borrow Rate fields. They are filled in for you by the calculator, so you don’t have to worry about it. This will give us everything we need to setup our backtesting.



Just for fun, I entered some theoretical numbers so you can see how the calculator works. I used 10,000 units because that is a common lot size…otherwise known as a mini lot.



Then I ask the calculator to calculate the interest for one day, so I put 24 hours into the Hours Held field. When I click on the Calculate button, I get a total interest payment of $0.45.






Now, let’s move over to our backtesting software. Since I use Forex Tester 2, I’ll use that as the example.



If you need instructions on how to import data and setup the basics of Forex Tester 2, read this post. After you have read the setup, come back here.



To setup the correct interest rate, go into the symbol properties for the AUDJPY pair and change the Swap Long to the difference that your broker uses.


In this example, this is the difference calculation:



Borrow Rate – Lend Rate = Swap Long Rate


1.95% – 0.0625% = 1.8875%



So you would set the Swap Long rate in Forex Tester to 1.8875.






Don’t worry about calculating the short swap because you won’t be using that in this example. The positive carry is only earned on long positions, so you will never execute a short. Now generate the ticks again and setup your charts in Testing Mode.


One word of warning before you proceed with your backtesting. If you execute a demo trade to double check the interest against Forex Tester 2, it won’t be the same. This is because the rollover interest calculation takes the current price of the currency pair into account.


If you want the complete calculation explanation, you can read this post. To see this in action, simply change the quotes in the calculator at the bottom of this post.



In addition, leverage doesn’t matter for carry trade backtesting purposes. This is because the interest calculation takes into account the amount of currency that you control, not the amount of margin you put up. The margin is only your “good faith” deposit.



For example, if you control 10,000 currency units of AUDJPY at 1:1 leverage, your margin requirement will currently be $8,696.5. But if you use 50:1 leverage, your margin requirement will be $173.93. To see what I mean, you can use this margin calculator.


In either case, you will still be controlling 10,000 units and will be paid interest on that amount. Your return on margin will be much higher with higher leverage, but that is not what we are concerned with in this tutorial.



Now that you understand the technical aspects of the carry trade, let’s move on to the actual backtesting.

Start to Backtest the Forex Carry Trade Strategy


When implementing the carry trade, rollover interest should be your secondary concern. Trade risk is going to outweigh carry profit by a large margin.



So you need to implement a strategy that takes minimizes trading risk. There are many ways to do this, but the most obvious is to only buy at multi-year or multi-month lows or highs. Doing this gives your trade the best chance of accumulating he most interest possible.



There are many other possible strategies, so find the ones that appeal to you and test them out. Whatever system you test, pay attention to the trading risk that you are incurring versus the interest payout reward.



Backtest as far back as possible to make sure that your strategy works in different market conditions. Also be sure to have a chart of historical interest rates to be sure that you are not trading trading the pair when the interest rate spreads where not optimal.

Conclusion



If you are interested in trading the carry trade, you should backtest it and make sure that you understand your true risk and reward potential. It may sound really easy to accumulate interest without doing any work, but remember that there are no free lunches.


Before I end this post, let me give you a couple of things that you can try. First of all, you can test taking small initial positions around monthly or even yearly highs/lows instead of putting your entire position on at once. This allows you to be flexible and take small losses when you are wrong.



Second, don’t get too focused in interest alone. Think about taking some trading profits off the table to help yourself stay in the trade. You can also day trade or swing trade around your long-term carry positions.



I hope that this tutorial helped and if you have any questions or comments, let me know in the comments below.