Algorithmic and Mechanical Forex Strategies | OneStepRemoved

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

Free blow up insurance?

January 19, 2015 by Shaun Overton 17 Comments

Last week’s drama with the collapse in the EURCHF peg hammers home an uncomfortable truth: you can lose more in your account than you deposit.

Trading on leverage is inherently dangerous. Although an instant 20% move in a major currency is a once in a lifetime event, it goes to show just how quickly the markets can charge over alleged safety features.

Did placing a stop loss at 1.19 for an open EURCHF trade do any good last week? Not a bit! As soon as the market breached 1.20, it instantly gapped down 10%.

When markets go bidless, it means that there is no liqudity in the market. That’s jargon that means everyone is too scared to do any buying or selling. There literally is no price at the moment where anyone is willing to trade.

It was at 1.20. The next thing you see is 1.08 and the price falling fast.

I was fortunate enough to be awake at 3 a.m. when the proverbial cow-pie hit the fan. Although I’m an alogrithmic trader, I confess that my immediate instinct was to hop on the bandwagon and buy!, Buy!, BUY! all the Swiss francs that I could handle (when you go short EURCHF, you’re selling euros and buying francs).

Every inch of my body wants to go short with the $EURCHF collapse, but I run an algo system and I’m sticking to it.

— OneStepRemoved.com (@_OneStepRemoved) January 15, 2015

The way I coped with the urge was to IM a friend and pass a running commentary on the insanity. Posting on Facebook and Twitter also kept me busy. Basically, it was a strategy to keep myself wholly occupied and distracted so that I wouldn’t be tempted to jump in.

I’ve seen mega moves before and, more importantly, I know from experience how badly people can get hurt. My favorite war story from working as a broker was a wealthy client in Kuwait that opened an account with $250,000 the night before NFP. He went long on 100:1 leverage and of course the report was the complete opposite of expectations. The market gapped instantly and before his trade could close, his account balance was -$20,000.

You don’t read stories like this on the forums because… who on earth wants to go advertise their financial destruction on the internet? It’s embarrassing and, if we’re honest with ourselves, that person is probably doing everything humanly possible to not think about their situation.

raised hands

Nobody raised their hand to tell me about catastrophic losses in the CHF

 

Free insurance

The primary reason to trade with maximum leverage is because it’s like free insurance against devastating losses. You never know when a peg will go bust or the next 9/11 is going to happen.

Let’s game this out. You were long USDCHF on Thursday and there was no stop loss in the world that could protect you against an instant 10% gap. Consider two scenarios:

  • You had a $30,000 account balance and were trading an institutional level of leverage like 5:1. That means your position value was 30k * 5 = $150,000. The instant gap created a loss of 10% * $150,000 = $15,000.
  • You had a $3,000 account and were trading the “crazy” leverage of 50:1. The position value was also $150,000 and yields a $15,000 loss.

Now let’s talk about what happens in the real world. In the first sceario, the money is on deposit with the broker and you 100% have lost $15,000. It’s a guaranteed fact and you can safely kiss the money goodbye.

In the second scenario, you may legally owe the broker $12,000 (3k-15k=-12k). However, what is the broker’s likelihood of recovering the money? If you’re in the UK and you trade at Pepperstone in Australia, they’d have to sue you in an Australian court. The attorney’s fees alone would be several thousand dollars. And most convincingly, you probably don’t have any assets that the court could award to the broker.

Even if you are in Australia, think about all the bad PR hitting the forums when the big dog starts suing little retail traders. There’s almost no business-case for pursuing the negative balances of retail forex traders.

You’re going to see a lot of hooplah this week about brokers “forgiving negative balances.” It’s great PR and it’s the best way for them to play it. They know darn well that there’s almost no chance of recovering that money. It’s the best way to turn lemons into lemonade because the brokers lost an epic amount of money.

How to protect yourself

Chris Zimmer, the programmer here at OneStepRemoved, sent me this as soon as the day ended.

I was already on board with it but this recent event makes your method of pulling money out of FX accounts look very obvious.

I just checked and the USDCHF dropped over 1600 pips on that bar. That really hits close to home as we could have easily been Long that pair and something tells me any stop would not have been filled.

Trade on leverage and, for goodness sake, withdraw the money at regular intervals. Nobody can take it away if you don’t keep it in their hands.

Filed Under: How does the forex market work?, What's happening in the current markets? Tagged With: eurchf, forex, franc, leverage, maximum leverage, usdchf

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

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

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 © 2021 OneStepRemoved.com, Inc. All Rights Reserved.