Algorithmic and Mechanical Forex Strategies | OneStepRemoved

  • Articles
  • Sophisticated Web Sites
  • Automated Trading
  • Testimonials
  • Contact

The Top Six Currencies for Quantitative Forex Trading

December 19, 2013 by Andrew Selby Leave a Comment

When designing a quantitative Forex strategy, one of the major concerns is what currency pairs it will trade. The currencies you are planning to trade could make a significant difference on how any given strategy will perform.

As a general rule, you will want to focus on currencies that are commonly traded with plenty of volume. This will make sure that your strategy will have the ability to enter and exit without any complications or slippage regardless of your account size.

quantitative forex trading

Making sure that you are trading the right currency is a great way to optimize the performance of your quantitative Forex strategy.

FXTM published a post on Forex Crunch last week that breaks down the six most popular currencies among Forex traders. While there are plenty of other currencies available from most brokers, these are the six that Forex traders tend to gravitate towards.

Each of these currencies have their own unique characteristics, and studying those differences could allow you to exploit your strategy’s ability to trade one currency better than another.

US Dollar

The most popular currency in the world:

Clearly, the US dollar, also known as the greenback, is the most popular currency to trade and is the world’s main reserve currency – since the majority of transactions around the world are priced in USD.

Euro

A popular currency for now:

With the sovereign debt crisis in Europe there are indications that the euro might one day break up as peripheral nations struggle to cope without the benefit of having their own flexible currency.

Japanese Yen

One of the more volatile currencies:

The currency can be volatile on occasions but on average also exhibits a daily trading range of around 30-40 pips. Due to the extremely low interest rate environment in Japan, there is always a very strong carry trade element to the Japanese yen.

British Pound

The Queen’s Currency can be even more volatile:

GBP is typically more volatile than the preceding three currencies and swings of 100-150 pips are not uncommon.

Swiss Franc

The consistently reliable currency:

Traders will move into the swissie during times of panic and fear.

To stop the currency from becoming too strong, however, the SNB have pledged to keep the currency pegged to a certain level against the euro. The result is that lately the Swiss Franc trades within a very tight range.

Canadian Dollar

The commodity currency:

Since the Canadian economy is very much tied to raw materials and commodity prices, the Canadian dollar is often a reflection of this and will often move in tandem with commodities – particularly crude oil, of which Canada is a big exporter.

Filed Under: How does the forex market work? Tagged With: dollar, euro, franc, pound, yen

How Does Your Euro Strategy Respond to Economic Reports?

December 3, 2013 by Andrew Selby Leave a Comment

Any quantitative forex strategy should be robust enough to handle any and all types of markets. However, some perform better than others when markets experience different types of volatility. Understanding how your strategy responds to different types of markets could be a key piece of information if you are forced to decide whether or not to continue trading the system.

One of the main drivers behind many major market moves is economic reports. While your quantitative system almost certainly wouldn’t be trading based on these types of fundamental reports, there are many other Forex traders who will be trading the news. The trading that follows these types of news events could cause markets to turn quickly, or dramatically increase or reduce volatility.

euro economic reports

While economic reports might not directly influence your quantitative system, they could have an indirect impact on your account by altering the market environment.

 

Any of those changes could impact the way your system trades. Even if you have no desire to trade based on the different economic reports that impact the Euro, you should still be aware of them and how they might impact your Euro strategy.

There was a post on Forex Crunch last week that detailed some of the key news releases that impact the Euro. Here are some of the reports that article covered:

ECB Announcements

The ECB, like all central banks, meet once a month to decide on interest rates and discuss future prospects for the Eurozone economy.

As you would expect, the monthly ECB meeting, headed by ECB Chief, Mario Draghi, is the most widely anticipated event on the euro traders calendar.

Decisions by the ECB can have wide ranging implications for the future of the euro.

Eurozone GDP

Traders sometimes refer to GDP (gross domestic product) as being a lagging indicator. Nevertheless, its release does bring significant volatility to the euro.

A worse than expected number will likely lead to a drop in the euro since it shows a deteriorating economic picture and that increases the chance that the ECB will cut rates.

If GDP is improves upon expectations, the euro will likely rise.

Eurozone Core CPI

Since the ECB’s mandate is to keep a lid on inflation, a rise in Eurozone core CPI means the bank could potentially begin to raise interest rates and this would lead to a rise in the euro.

Conversely, if inflation is below expectations, the ECB has more room to cut rates, which would quickly lead to a weaker euro.

The article also covers the Eurozone Balance of Payments Report and the German ZEW Survey.

While none of these reports would have a direct impact on a robust quantitative strategy, there is certainly a possibility that they could set off a chain reaction that results in an indirect impact on your account.

Just because you likely aren’t basing your trading decisions on these reports doesn’t mean that there aren’t many other traders who are. If you are trading a strategy that thrives on volatility, these could be the best times for you to be actively trading.

Filed Under: How does the forex market work? Tagged With: economic reports, euro

Easy Ways To Enhance Simple Moving Average Crossover Systems

November 12, 2013 by Andrew Selby Leave a Comment

One of the first types of systems that many people experiment with are simple moving average crossover systems. While there is a wide range of different parameters that quantitative traders can use to build these types of systems, the basic idea behind them is fairly straightforward. This is what makes simple moving average crossover systems so appealing.

One of the biggest problems with these types of systems is the amount of whipsaws that can be generated when a market is trading within a certain range. Jeff from System Trader Success recently posted a few different ways that simple moving average crossover systems could be enhanced in order to eliminate some of those whipsaws.

moving average crossover strategy

Jeff took a simple moving average crossover strategy on the Euro and looked at different ways to reduce the number of whipsaws.

Jeff began his post by describing the baseline crossover system he would be using:

Our baseline system will consist of two simple moving averages (SMA) executed on a daily chart of the Euro futures.

I’m picking the Euro because it has demonstrated solid trending characteristics as opposed to the stock index markets which tend to be mean reverting.

If you will recall, signals are generated when a faster moving average (trigger SMA or trigger line) crosses a slower moving average (slow SMA or slow line).

Jeff sets his slow moving average to 50 and his fast moving average to 3 and backtests the simple system from May 2001 through the end of September 2013. The results indicate a profitable system that struggles with whipsaws at times.

The first method that he suggests to improve this is a delayed entry. He suggests waiting ten bars after the signal and then entering on the eleventh as long as the fast moving average does not cross back below the slow moving average. This forces the system to confirm its signal before taking a position:

The idea behind this method is if a new bull market is about to start, price should not fall back below the slow SMA.

In short, it’s another way to measure the amount of conviction for the next market phase. However, we will keep the exit the same

The results of this method reduce the overall profitability of the system, but also eliminate almost all of the whipsaws. The resulting equity curve is much smoother.

The next improvement Jeff suggests is another way to require confirmation of an entry signal:

For example, picture another band above the slow SMA that is 1 ATR above the slow SMA.

In order to open a new long position we require the trigger line to penetrate that ATR band above the slow line.

Now picture another band that is one ATR below the SMA.

This band represents our short trigger when we open a short position. We hope to eliminate some whipsaws by delaying our entry and forcing the market to show us some strength.

This method results in an equity curve that is somewhere in between the original and the first enhancement. This method allows the system to keep most of its returns, while reducing the volatility slightly.

Another method Jeff suggests is implementing a delay with a time decay feature:

Often you will notice a string of whipsaws on a moving average crossover system right after a great winning trade was closed. The market apparently is now morphing to a range bound market and will likely do this for sometime.

However, as the days or weeks wear on the likelihood of a breakout probably increases. Thus maybe we can reduce the delay amount as time goes by. After the close of a successful trade we begin looking for the next cross with our default X bar delay.

One final suggestion Jeff makes to enhance a simple moving average crossover system is probably the most obvious idea:

Maybe only taking long trades during a bull market or taking short trades during a bear market would improve results. This would be an interesting and simple test to perform.

None of these ideas on their own warrant the trading of real capital. However, they do a great job of encouraging traders to think about different ways to enhance their systems. The most successful systems are often very simple strategies that contain just a few key enhancements.

Filed Under: Trading strategy ideas Tagged With: crossover strategy, euro, SMA

Testing Shaun’s Euro Currency Scalping Strategy

October 13, 2013 by Andrew Selby Leave a Comment

Back in March, Shaun published a Scalping Expert Advisor that traded the Euro-USD five minute chart using moving average envelopes. In case you missed it, here is the video Shaun made explaining the strategy:

Shaun’s strategy was recently featured for an in-depth post by Jeff from System Trader Success. In that post, Jeff attempted to test and develop Shaun’s simple scalping strategy. Here is how Jeff described Shaun’s strategy:

Shaun noticed that extreme price moves as defined by 1% distance from a 200-period simple moving average (SMA) occurred very rarely. Going with the premise that price will soon retreat from such an extreme, this might be a potential location to open a trade. In short, Shawn’s Simple Scalping System (SSS) is a mean reverting strategy that utilizes a SMA envelope. When price closes beyond the envelope a trade is opened. The trade is closed when price returns to the envelope.

Jeff’s rules were exactly the same as Shaun’s. He tested the strategy from May 2001 through December 2011 starting with $10,000. The first thing he noticed was the severe impact slippage and commissions would have on the returns. After testing a few different combinations, he settled on using a $5 commission and 1 Tick slippage on each trade.

Jeff’s results show the system to have a profit factor of 1.10. He notes that the profit factor is 1.38 on the long side and 0.88 on the short side. Because of that, he elects to focus exclusively on the long side trades from that point forward.

currency scalping

Shaun’s simple currency scalping strategy has an edge.

The open ended downside of the system leaves Jeff thinking that adding a stop component may improve performance:

Notice that many of the trades that experience a 1000 or larger drawdown end up being red points on the chart. These are very expensive drawdowns that turn into large losers. Somewhere between $600 and $1,000 might be a good place to put a hard stop to limit those large losses.

However, finding the right stop proves to be challenging:

Stop values up through $2,000 really push our net profit down. Can anyone really trade a scalping system that might require a $2,000 or more catastrophic stop loss? This makes me wonder if we need to find an additional filter to help reduce unprofitable trades. Instead of simply applying a hard stop we might want to test trading only during certain hours, trading only during a bull market or adding a volatility filter. These are all good ideas and we’ll continue to explore this trading system in a future article.

Much like Shaun originally suggested, Jeff comes to the conclusion that this strategy has merit, but needs further development. He suggests a number of potential components that could improve the returns.

 

 

Filed Under: Test your concepts historically Tagged With: currency scalping, euro, expert advisor, moving average envelope

Forex Rollover Swap

October 19, 2012 by Shaun Overton 2 Comments

The video below was a class that I gave to the company’s employees on October 16, 2012. The goal is to explain the concept of rollover in the forex market, which is synonymous with the term swap. The transcript is below.

Shaun: Ok, so we’re going to go over rollover and what it is. It’s really the interest that accrues for holding an open forex position. When we place a trade, you guys know that we’re trading on leverage.

When we trade one lot of the EURUSD, we are trading €100,000 and then we’re selling whatever the equivalent is in USD at the time. Right now the rate is 1.30. That means that we are buying €100,000 and exchanging that for $130,000. This is when EURUSD is equal to 1.3000.

Make sense so far? Unfortunately, everybody wants interest and they want their pound of flesh. You’re not just paying it for the money in your account, you’re actually owing interest and earning interest for the positions that you have open. If you again use a current example, interest rates are at historic lows. They use the overnight rate for setting the rollover and swap rate on a position.The euro overnight lending rate is set at 0.01%. It’s basically free money.

The US dollar has an overnight lending rate of 0.15%. These are annual rates. It’s pretty equivalent to what you’re getting paid on a CD: almost nothing. But, that goes have a cost associated with it. When you look in MetaTrader, MT4 references it as the swap. In the industry, it’s more commonly known as rollover.

You have to pay interest for the positions that you do have open because they have value. When we decide to buy the EURUSD, that means that we own euros and we sold dollars. In interest terms, that means that we are owed interest on the euros and we owe interest on the dollars.

Chris: That would be bad because the US dollar is more?

Shaun: Right. If you’re buying the euro, and this is in magical fairy land where you earn and pay the exact same amount of rollover for buying and selling, and we’ll get into exceptions in a minute, but in the “pure scenario”, you’re only earning 0.01% annual interest on your euro position. You’re paying 0.15% interest on your dollar position. If you’re buying EUR/USD and held that position for a year, you would expect to accrue a loss of 0.14%, which is the euro overnight interest rate (0.01%) minus the dollar overnight interest rate (0.15%).

If you did the exact opposite and sold EUR/USD, you only owe 0.01% overnight interest, but you make 0.15% percent interest.

Chris: Are you assuming that you have the position open for an entire year?

Shaun: Yes. Now, of course these rates change. These are overnight rates, which means that over night they change on a daily basis. The amount will fluctuate – slowly – but, it does fluctuate.

This is in the hypothetical example where you bought EURSD, the overnight rates never change and you held the position for precisely one year.

Chris: It’s for one whole lot?

Shaun: Yes. It’s precisely one lot. One lot is the equivalent of 100,000 base currency units. Our base currency here is the euro. 100,000 of the base currency is 100,000 euros.

Let’s go through and calculate the rollover in our scenario of buying one standard lot of EURUSD. Apply the 0.01% rate to the €100,000 position. 0.0001 * €100,000 = €10. Of course, you must put that back in dollar terms. €10 * $1.3000/€ (the current exchange rate) equals $13. The $13 is the credit for the holding the EURUSD position for an entire year.

The calculations are the same for the dollar, except for the fact that it’s now a debit. The position of $130,000 * -0.015 (this is a negative number because we owe it) equals… does anyone have a calculator on their phone? We all do; we’re programmers.

Andy: $195

Shaun: We have a $13 credit and a $195 loss from the rollover. $182 is the amount of money that we’re going to lose after one year in our hypothetical scenario with the EURUSD exchange rate not fluctuating, the overnight interest rates not fluctuating and us holding our position for precisely one year.

The next thing is that we need to go over the mechanics of rollover and how it is charged. It’s a little quirky. I’m stating the obvious, but there are seven days per week.

Chris: What’s with MB Trading only giving 50:1 leverage. What does that mean?

Shaun: It doesn’t matter for the swap. If you have a position of €100,000, you owe interest on the €100,000.

Andy: You owe the interest on the leveraged amount?

Shaun: Yes. It’s on the leveraged amount. When we opened that €100,000 position, we did that with $2,000 on 50:1 leverage or $1,000 on 100:1 leverage. You’re not paying or receiving interest on your margin amount. You’re paying or receiving it on the leveraged amount.

Chris: So if I were doing that with MB Trading, I’d have to do it with two lots?

Shaun: No. The interest is the same. You have a €100,000 position.

Chris: To leverage that much, don’t I have to double my margin?

Shaun: Yes. Instead of using $1,000, now you use $2,000 to open the one lot trade.

Rollover is seven days a week, but we know that trading doesn’t happen on the weekends. In forex, trading really happens from Sunday afternoon to Friday afternoon. This is more of a technicality. The only really important days are Monday, Tuesday, Wednesday, Thursday and Friday.They need to charge interest for seven days even though there are only five days that are important.

What they do is charge a single day of interest on Monday, Tuesday, Thursday and Friday. By convention and for no good reason, Wednesday’s rollover carries the interest charges for Wednesday, Saturday and Sunday.

Chris: Why don’t they do it on Monday?

Shaun: I don’t know. Why don’t they do it on Thursday?

Terry: Or why don’t they spread it out across the week evenly?

Shaun: Why don’t you pay 1.5 days? That’s just the way it is.

This is referred to as triple rollover Wednesday.

Andy: That’s the for the past weekend, correct?

Shaun: No. It has nothing to do with the weekends. Rollover occurs precisely at 5 pm ET. When you look at the charts of most brokers, they are mostly based on broker time. But in the forex industry by convention, 5 pm ET is the start of a new day. 5 pm ET on Sunday is actually the start of Monday. 5 pm ET on Monday is actually the start of Tuesday’s trading day. Tuesday’s trading day concludes at 4:59 pm on Tuesday.

Andy: But on Wednesday, you get charged for the past Saturday and Sunday?

Shaun: Even if you didn’t have the trade open! If you decide – very poorly – at 4:59 pm on Wednesday that you’re going to open a trade, and you close the trade two minues later at 5:01 pm on Wednesday, you are going to earn or pay triple rollover.

Andy: Oh, so it has nothing to do with the last weekend. They just charge you three times for whatever happens on that day.

Shaun: It’s a market quirk. If you hold that position precisely at 5 pm, you owe interest. If you do not, you do not owe interest. If you had the trade open for 23 hours and 59 minutes, but you closed it before 5 pm, no triple rollover. But if you have it at 5 pm, then you pay triple rollover.

It’s the same concept on Monday, Tuesday, Thursday and Friday, except it’s only single rollover.

Chris: What’s to keep people from finding a favorable currency comparison and just opening trades for two minutes every day?

Shaun: Lots of people try that and it doesn’t work because of spread costs. Notice that the rollover rates are so tiny. We’re talking about 0.01% per annum. Divide that per day and it’s a silly amount. It’s so negligible that you don’t really care.

There are exceptions. There’s Golden Week and this involves the yen. There are days where triple rollover Wednesday becomes nine times Wednesday. You earn the interest for two weeks of trading.

Andy: Do brokers do that to get people to trade with them or something? Is that a for fun thing or is there an actual reason:

Shaun: It’s because Japan shuts down for two weeks.

Chris: It’s only in yen pairs?

Shaun: Yes. Anything involving a yen pair in May has Golden Week where you have a monster rollover day. It’s kind of the way it is.

People do try to take advantage of it. When interest rates were higher a couple of years ago, there was a big differential between the pound and the yen. The pound had an interest rate of 5.25% and the yen, as it is today, had an annual interest rate near zero at 0.25%. I think today that it’s 0.1. The point is that there was a massive difference between the two of 5%. You could earn that on the leveraged position.

Chris: Does that make the price spike?

Shaun: Yeah, it does. People want to earn this money. This is what drives currency market, the shift in the interest rates. People chase yield. If I can open an account in GBP and I can earn 5.25%, if I’m holding yen, that’s looking really attractive to me.

I might consider the idea of converting my yen into pounds so that I can the extra 5%. This is referred to as a carry trade. It’s the idea of using leveraged money to earn the difference in the interest rates. It’s possible and it can be lucrative. The problem is that it depends on your timing of exchange rates.

If you expect that… let me think of a scenario that applies to today. Let’s say that the ECB decides to reverse course, and this is not likely to happen at all. Right now, they’re trying to keep their interest almost at zero. Let’s say they decided to stop intervening in the market and to charge a real interest rate. The euro interest rate would go through the roof, which motivates people to put their money into euros instead of dollars, yen, Australian dollars, whatever. If you expect that trend to continue for several years, that is a great motivation for buying that currency. Not only do you earn the increasing differential in the two currencies’ interest rates, but more people are likely to follow the trade. The higher an interest rate is, the more likely people are to buy that currency.

That was the reason behind Brazil’s hot market as of about two years ago. Interest rates were 13-14% and everything was appreciating through the roof. You could sit back and know that you were going to make 14% in reals. The problem is that if you top the market like when the market yielded 14%, you earned 14% in reals and then the price plummeted by 30%. Timing is critical.

That’s the fundamental reason that the market exists. That’s why people trade currencies. Not just for exchanges of payments, but for speculation, that is entirely why people participate. It looks like free money. There are all sorts of examples.

Oddly enough, most of the mortgages in Poland are denominated in Swiss francs. The reason is that the Swiss had a very, very low interest rate compared to what the Polish zloty was charging at the time. If you could pay 0.5%, why are you going to pay 5% interest to have it denominated in zlotys?

Well, the reason is because the Swiss franc has been appreciating for several years. Now half of Polish homeowners are severely underwater because the value of their loans has appreciated by 20 or 30%. They only make their income in zlotys. That’s the risk of the market. Those are the kind of real world examples of why people decide to participate and why rollover is really important.

This is the electronic form of how it applies to our traders and our customers speculating in markets. The real mechanics behind it are more tangible like in the mortgage example.

Andy: Is it common for strategies to keep track of I would make money, so I want to hold my trade until I hit my interest point for the day?

Shaun: You could, but it’s a silly risk. If you think that it’s dangerous to be in now, you’re going to stay in risking an average of 120 pips of movement in the EURUSD so that you can capture the equivalent of 0.25 pips.

Andy: Ok, so it’s pretty much worthless.

Shaun: Yeah.

Terry: Your current interest rate, is that something that a strategy has access to at the market level? Are we able to go out and query that?

Shaun: No.

Terry: So, it means that it has to be fed that values from some other source, which means…

Shaun: Nope. It has nothing to do with backtesting. It doesn’t make assumptions about rollover. It isn’t present in MetaTrader on a historical basis. It is available in real time and I can show you guys where to find that. It’s not something that most people look at as part of a strategy. It is an important part, but it shouldn’t be the maker or breaker. It should be a little bit of juice. You use it to pad the margins a little bit or it might be a drag on performance. It should not be the primary reason why you’re entering a trade now at  4:59 pm so that you can capture the tenth of a pip in interest cost and pay 2.5 pips in the process.

The one thing that I wanted to point out, too, is that everything that I explained is kind of hypothetical. You either lose 0.14% or you make 0.14% on an annual basis.  In reality, that’s not how most brokers work. It’s a good way that they pad their margins.

This is how they make a slight amount of money on traders that aren’t trading, through the difference in the rollover rates that they charge. In the example that I sent you, and assuming that we opened MetaTrader and that it was a perfectly equal market, you would see that buying costs you. MetaTrader shows you in dollars, but I’m just going to put it in percentages. You expect a return of -0.14% for buying EURUSD and a return of +0.14%  for selling EURUSD.

What happens most of the time is that everything gets skewed against you. The cost becomes a bigger number and the profit becomes a smaller number.

Chris: You’re saying it’s the broker that does this?

Shaun: Yes. It can be the broker or it can be the ultimate liquidity provider behind the broker, but yes, the interest rates are set and then they get shifted. Obviously, someone earns that differential.

Terry: So, obviously, these are within the bounds of legal priorities based on trading rules?

Shaun: Yes. It is a cost. I don’t know of anybody that discloses it. I don’t know who the ultimate beneficiary is to be honest.

Terry: It’s the broker.

Shaun: That’s my assumption that the broker is making the difference. If they net their trades, they should be capturing that difference. If you have 50,000 clients and most of them are piled into the EURUSD, there’s only going to be a certain amount of net exposure. Only say 10% of that difference is going to be net long or short. You can net out the difference between these two and keep all of it.

It’s not super lucrative, but it’s money sitting there and they take it.

Terry: A dime times 50,000 is lucrative.

Shaun: Yes. It adds up.

Terry: Especially when it’s all electronic.

Shaun. Yes.

Chris: Maybe I’m behind the times, but I thought they were pressuring the euro zone to ease.

Shaun: They are.

Chris: But they’re already way below the dollar.

Shaun. Well, the target headline rate in the euro zone is 1.25%, which is the result of the central bank intervening. They’re buying Spanish bonds, Italian bonds. Basically, the bonds that literally nobody wants. They’re buying them so that the interest rates go down.

If I’m going to loan money, you have to make the call for your business or multinational corporation. You have to decide. Do you  want to tie up money in junk debt for a year and get 6% in Spanish bonds? Or do you want to loan to the ECB directly at 0.01%. You get paid almost nothing, but at least you know you’ll get your euros back.

Terry: Well, it depends on how long you’re planning on being in it and what you think the future is going to turn. If you think that’s going to turn, then go ahead and camp on it now and get it for nothing.

Shaun: Right.

Terry: If you can afford to be in it that long.

Shaun: Yes, and that’s why there are interest rate curves. That’s a whole different subject.

If you lend for a day, and let’s use the US Treasury as the simplest example, we start out with bills at the short end of the duration. Bills are anything about a 90 day coupon and out to a year. You can buy a treasury note for the one year, two year, five year and ten year. Each duration is supposed to get higher and higher, but the further out you go, you’re supposed to get a higher rate of interest.  It’s rather negligible compared to the duration. The difference between the overnight and the 3 month is pretty substantial. The difference between the 10 year and 30 year is supposed to be more substantial, but obviously the time involved is almost beyond comparison.

That’s why in the original EURUSD example I said that the overnight rate is this, because that’s what we use in forex. What people are really looking at when they’re deciding whether or not to take out mortgages or to loan money in different sovereign bonds, they’re looking at one year yields, ten year yields.

Terry: It seems like it doesn’t make sense to go past ten years. Three decades is a long time to tie something up.

Shaun: In that market I would agree, but there were people in the 1970s that caught the US Treasury in the height of the stagflation when interest rates in the US were at 17%. They loaned money when the short term rates were actually inverted. People were taking the easy money earning 17% annually over 3-6 months. The smart money locked up those interest rates at 14% for thirty years. They made 14% per annum.

Terry: Compounded.

Shaun: … compounded for 30 years. They guys that made the thirty years made a killing and as close to risk free as you could get at the time.

Today, I would argue that’s suicide. I don’t think the dollar will be around in 30 years. But, that’s a different story.

Andy: When do these costs get calculated? Every day at 5 o’clock, they say you gained two cents or whatever. When did that fee get charged.

Shaun: Interest rates are a really complicated subject. They’re actually the result of a huge scandal right now that I know none of you know about, none of the people that I know know about, but that everyone should be up in arms about.  It’s called the LIBOR Scandal.

LIBOR is where overnight interest rates are set. It’s not a free market. It’s voted on by a group of 30 some-odd banks. It’s all the normal culprits, the people that are despised and rightfully so: the Goldman Sachs of the world, Barclay’s, RBS, Bank of America. Any bank that you’ve heard of that’s international, they’re probably one of the banks that set the LIBOR rates.

They all get to vote and decide what is tonight’s interest rate for the US dollar. When they set the rate, that’s what every bank in the world uses to set its overnight lending rate.

Chris: They just pull it out of thin air or they base it on something?

Shaun: They pull it out of thin air. They just vote. There’s a formulawhere they throw out the most extreme votes and keep the average of the middle ones.

It’s the most important market in the world because it affects everything that connects to money. It affects stocks, real companies, bonds, mortgages, currencies… it affects everything.

What happened this summer was that the Bank of England got caught encouraging Barclay’s to manipulate the LIBOR rate. As you can image, banks have a strong interest in voting whether the LIBOR goes up or down. It affects all sorts of things like how much they have to pay savers in their CDs. How much do they charge for a mortgage. They have all sorts of motivations to keep the interest rates as absolutely low as possible to benefit themselves. That’s what happened.

LIBOR is set in London, but it really doesn’t matter. All the banks are international. It’s really just a committee.

Andy: With no government oversight?

Shaun: It was with the active collusion of the Bank of England and the Federal Reserve. They encouraged the banks to keep the interest rates low because it aligned with their policy objectives.

Filed Under: How does the forex market work?, MetaTrader Tips Tagged With: Carry Trade, dollar, euro, eurusd, franc, Golden Week, interest, LIBOR, LIBOR Scandal, Rollover, swap, US Treasury, yen, zloty

Forex Liquidity

August 24, 2012 by Shaun Overton 3 Comments

Peter from Ireland wrote in asking me to do a piece on liquidity on the forex market. Although the market trades 5 trillion dollars per day in volume, even forex traders face limitations in how much volume they can push through in a short period of time.

A Zero Hedge article on the Reuters 3000 platform outage cited some interesting statistics for the currency markets and where the trading actually occurs. Although I was familiar with Reuters and EBS previously, the Dow Jones article was the first place where I’ve seen volume statistics published. Apparently Reuters, the biggest platform, trades approximately $130 billion dollars in volume per day.

That’s an astronomical amount of money. Intuition makes it feel like hitting the ceiling on executing large transactions might be a problem for only the biggest institutions. Let’s take a look at where we might expect to run into problems.

When I went through broker training at FXCM, the team leader cited the EUR and USD as being involved with 60% of all forex trading volume. That number does not imply how much volume occurs in the specific EURUSD pair. Also, that that was seven years ago. I dug around looking for more up to date numbers. Forex trading volume is notoriously hard to track due to it being an over the counter market. The best proxy that I know of is the FX futures market.

The CME publishes FX futures contracts volume (page 16), which I used to estimate the proportion of the EURUSD pair in relation to all traded volume. FX futures contracts, like their spot counterparts,  are all denominated in different currencies. Except for the e-mini and e-micro contracts, which resemble the mini lots of retail forex trading, the contract size is roughly $150,000. I’m counting contracts rather than actual notional value to speed up the calculations. You can double check my calculations by downloading this spreadsheet. The EURUSD pair represents 33% of all forex trading volume based on my rough estimates.

The EURUSD value traded per day on Reuters is 33% of $130 billion, which is 43.33 billion. The average trading consists of 1,440 minutes per day. 43.33 billion trades per day / 1,440 minutes per day yields an average traded amount of $30,092,592 traded per minute. Again, this is a huge number.

Everyone in forex trades on margin. Institutions traditionally keep their margin very low. Assume that 3:1 is the norm for the big players. That means that the actual funding in the account only needs to be $10 million dollars (30/3). That’s a lot of money, but that is chump change by institutional standards. That’s more on par with a wet behind the ears CTA that launched within the past few years. This scenario is for the most liquid currency pair on the largest currency trading platform in the world.

Dropping down to the retail scenario, the numbers involved get much, much smaller. The Financial Times cites FXCM’s average trading volume as $55 billion per day. This is tens of multiples higher than an average broker’s volume. I picked it because it’s the highest that I know of and I wanted to demonstrate a big scenario. 33% of $55 billion is $18.15 billion traded on the EURUSD. $18.15 billion / 1,440 minutes per day is $12.6 million traded per minute.

Retail traders leverage far higher than institutions. Again, let’s be kind and make the assumption that the average retail trader employes 15:1 leverage on the account (hint: it’s much higher). $12.6 million / 15 implies that it only takes an account balance of $840,277 to trade all of the expected trading volume in an average minute. One trader is unlikely to have a balance that large, but a segment of a broker’s customers most certainly do.

The fragmentation of the market combined with leverage makes it strikingly easy for a group of traders to suck up all of the liquidity available on a given platform. Even though trillions are available across the broader market, the broker or platform where a trader participates is substantially more limited. The scenarios modeled use the EURUSD, the most liquid pair in the world. Liquidity gets exponentially worse when examining exotics or cross currencies. The volumes are far lower, but the available leverage and account balances remain the same.

When too many traders buy the same EA, all orders fire off at the same time. Blockbuster EAs easily reach the combined account equity floor where demand overwhelms supply. Finer details like all of the supply is being one sided make the situation all the worse.

Filed Under: How does the forex market work?, What's happening in the current markets? Tagged With: CME, dollar, euro, forex, liquidity

Martingale Lessons

December 30, 2011 by Chris Zimmer Leave a Comment

In the spring of 2011, there was no denying it.  I adopted a decidely jaded view of the stock market and had grown to despise an industry full of self proclaimed oracles.  Most of these people in my view were a bunch of textbook salesmen and women selling various dreams of financial security and fame.

Through sheer stubborness I remained invested and recovered from the down years of 2008 and 2009. However, single digit gains were taxing my patience. I was miles from my longterm goals. There was no doubt I would be working well into my 60s and if I suffered any type of dementia, it was not hard to imagine myself greeting people at Walmart.  When I stumbled upon Forex, you could say I was open to a change.

The Allure of the Martingale

Through my work as an expert advisor programmer, I became involved in coding all manner of peoples trading strategies into small trading robots called expert advisors or custom indicators.  I am still surprised by all the permutations of indicators, chart patterns, money management mechanisms, etc, that trader are dreaming up out there.

I would code them all up according to their specifications, slap them in a backtester to put them through their paces, fix any problems. Rinse and repeat until all was working to everyone’s satisfaction.  Many if not most were flawed for one reason or another, some would work exceptionally well in one type of market but perform poorly in others.

Some were tied to faulty indicators that would change their earlier output signals. Some were based on what I viewed as various arcane chart patterns which seemed one step removed (no pun intended) from witchcraft. Others were complex to the point where they would rarely trade and when they did would do so at the most inopportune time.

After perhaps a year of this, I received a Martingale strategy to code for an overseas customer.  After coding and running his EA in the strategy tester, I remember becoming very excited with how well it was performing on every time period and data set in all markets.  I spent more time testing this EA that day than most, even though I was not finding any problems with the coding.  After seeing so many crash and burn that week, I enjoyed watching it do its thing.

To be sure, it was not the first Martingale I had seen and I had always discounted that ilk as being to closely tied to Vegas and gambling. But, like the ones I had seen before, it was doing a bangup job of piling up cash during my test runs.  I guess after seeing the nth Martingale doing that I could no longer ignore this method of trading.

That afternoon and for many days following, whenever my thoughts would wander ideas would pop into my head as to what sort of Martingale I would program in MetaTrader for myself.  It was truly something of an epiphany. Up to that point my whole view of forex was that of a high stakes market best left to big banks, institutional investors, and governments.  I had never thought of running one of these programs on my own money.

Like most Martingales, mine would double its lot size with every loss.  I suppose what was different about my Martingale from many but certainly not all others, is that mine would reverse the direction of its trades.  This would solve trending markets, the achilles heal of single-direction-trade martingales.  It would also use a Take Profit and Stop Loss that would be somewhat sensitive and self-adjusting to Average True Range. This was my answer to excessive volatility.  Finally, I put in logic to have hidden take profits and stops.  This would satisfy my probably unwarranted suspicion of brokers.

I’m not going to get too detailed on leverage, margin requirements and such.  With a Martingale, you need to consider how many levels you’re going to let it go before it gives up or resets its lot size.  And don’t kid yourself; it will go deep more often then you would think.  You need to make sure you have enough money in a Martingale trading account to support your biggest possible trade.

Happy Days and Riding the Martingale bull

I went through the trouble of setting up a forex account and started trading.  The first month felt underwhelming.  I recall the EA only did a little better than breakeven but my enthusiasm was still intact.  The fact that I did not lose any money comforted me, making it feel safe to press on.

I continued tweaking the EA and adjusting how I would use it.  By the end of the 2nd month, mostly through trial an error I found the EA worked best on the EURUSD and the 15 min period. That’s when the results started to give me that euphoria that I had so badly wanted.  By the end of the fourth month, morale was sky high.

I’m not going to give actual numbers since I used to always suspect other type articles of fish tails when they did that, but it was enough to make me a changed person.  If you can recall the nursery rhyme “Sing a Song of Sixpence”.  The line “The King was in his counting house, Counting out his money” pretty much sums it up.  That was me.  It almost felt illegal and I actually hid the results from others fearing that I would jinx everything if I mentioned it. I would often pick up a calculator or paper and pencil calculate out what the sum might be after 5 10 20 years at the current rate of returns.

When a Martingale goes bad

I’m not a market statistician or financial wizard of any sort, so I can’t give a very elegant explanation of what happened. I do know that the financial problems in Europe during the fall of 2011 provided an extremely volatile and choppy market that did not agree with my reversing Martingale EA. It resulted in some whiplash-packed trading weeks and numerous reality checks.

All my gains for the year and then some were wiped out during a few weeks.  The deceptive thing about a Martingale is that 99.9% of time it will look good and make money. When you test it, it is likely you won’t catch it at its worst.  It feeds a sense of denial.  In this case results were good for several months before it lost money.

Once it starts losing, the trades become big very quickly. If you happen to be asleep when this happens, you’re in for a big surprise as you rub the sleep from your eyes and peer at your monitor in the morning.  I know some of you are thinking, “well,  duh”, and to be honest, knowledge of this possibility was always in the back of my head. I thought since the Martingale was a reversing one and would adjust to volatility I was at least somewhat immune to this. I suppose it could have been much worse with a more conventional Martingale.

Another thing to watch out for is meddling.  When things started going bad I slipped into the bad habit of supervising the EA.  I would stop trades just before they were about to recover and the net result was usually to make things worse.

Summary

Since that time, I have scaled back use of the Martingale.  In some type markets I won’t even run it.  I also added a non trading window feature to it.  Specifically I can set it up to shut itself down at specific times of the day.  Now when I go to bed, if there are multiple big financial news reports scheduled for the morning, I set the EA to go inactive before and for sometime after this time to let the associated volatility work itself out.

I sleep better when I know it won’t be running at night.  It’s no longer producing killer returns for me as the volatility will usually make you money, but I don’t have to worry so much about the times when it will create losses, either.  There’s a price to pay for peace of mind. If that means trading less often, I’m all in favor.

Filed Under: How does the forex market work?, MetaTrader Tips, Stop losing money, Trading strategy ideas, What's happening in the current markets? Tagged With: EA, euro, europe, expert advisor, Martingale, volatility

Euro collapse

December 18, 2011 by Shaun Overton Leave a Comment

I’m writing this over the Atlantic on my way home from Dublin. I’m absolutely convinced that the euro is at the start of its death spiral.

Many of you know that I travel to Ireland about once a month to work with Traders Now and their q algorithm. I love the math, the programming and all the strategizing that goes into developing a fully automated trading system. One of my favorite parts, however, is the Friday night before I leave. Kieran and I play a long game of poker with his buddies.

The first few hands did not treat me kindly. I was busy chewing my sour grapes when Kieran mentioned one tiny, little thing about the euro. The place exploded with rumors and opinions. The poker game stopped entirely for fifteen minutes.

Mind you, this is not a poker table full of financial professionals. It actually seems to be a good cross section of Irish society. We had everyone from a plumber and retired taxi driver to a multimillionaire real estate developer sitting at the table.

The first thing that came up were the rumors of what would happen if the euro did in fact collapse. Two out of the nine players had independently heard rumors of the government printing Irish pounds and stockpiling them. They also mentioned a rumor of plans to completely lock down the country for three days in the event of a collapse. Banks close, businesses close, the airport and ferries close. Life goes into suspended animation.

These are wild rumors, mind you. I’d argue that it’s really not important whether they’re hard facts or bold faced lies. Perception is reality. It’s becoming obvious to me that the foundations of the fiat euro are growing shaky.

Modern currencies depend entirely on faith in the government in order to continue. They are, after all, simply scraps of paper and electronic entries in a bank’s database. The value of the paper itself is negligible. When ordinary Joes are beginning to question the status quo and whether or not the system is viable, the jig is up (Irish pun intended).

As more people question the system, a small percentage of them begin to take real action. The guys at the poker table seemed to like the idea of Swiss francs in spite of the Swiss National Bank’s peg to the euro. They also mentioned the US dollar as a second best option. I don’t necessarily agree with that in the long run, although I’m sure that will be the short term affect.

The small increase in euro selling begets more people worrying about their savings and assets. They see the price moving adversely, which spurns them into taking action, too. The effect is that the rumors and fear cascade into an avalanche of collapse. It takes on exponential growth as anyone with anything of worth tries to offload it in an attempt to protect themselves financially. Actually, it looks just like the bank runs that Latvia recently experienced.

PS: I lost badly at the poker game. 25 hands that never came out on top, combined with players who will never be bet out of the game makes for a bad night. I walked away with EUR 50 loss. Too bad that’s still worth $65.

Filed Under: Uncategorized, What's happening in the current markets? Tagged With: euro, eurusd

FREE trading strategies by email

Trending

Sorry. No data so far.

Archives

  • Dominari
  • How does the forex market work?
  • Indicators
  • MetaTrader Tips
  • MQL (for nerds)
  • NinjaTrader Tips
  • Pilum
  • QB Pro
  • Stop losing money
  • Test your concepts historically
  • Trading strategy ideas
  • Uncategorized
  • What's happening in the current markets?

Translation


Free Trading Strategies

Privacy PolicyRisk Disclosure

Copyright © 2022 OneStepRemoved.com, Inc. All Rights Reserved.