Algorithmic and Mechanical Forex Strategies | OneStepRemoved

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

Monitoring my live trade execution

February 10, 2016 by Shaun Overton 29 Comments

Dominari’s biggest risk is its trading costs. In the midst of losing 6 days in a row, I found myself extremely concerned about Dominari’s performance. Did the signals go bad all of a sudden or is this a normal drawdown? Is Dominari losing because of trading costs?

I decided to start analyzing my FXCM account. Part of the nerves were driven by the fact that it took 2 weeks to setup the account. The compliance process took far longer than usual because I’m a former employee. Two weeks later, I turned on the account just in time to a) miss the biggest equity growth and b) to catch the biggest drawdown.

I felt more hostile to the FXCM account performance because I didn’t have any profits to pad the losses. This is all coming from my original risk capital. And I’m having my third child soon. Giving birth to kids in the US is incredibly expensive. I’ve got better uses for the money than to throw it away in the markets!

So, the real question is: am I losing because it’s just a rough patch or because FXCM is eating my lunch?

backtest-equity-fxcm

This image is a backtested equity curve over the same period of my live performance. I’ve traded live since January 28, but the trading didn’t begin until the afternoon. As you can see, I again missed another patch of strong performance.

The rest shows something of a fairy tale. The backtest shows a return of 19.13% over that period, whereas my live performance is down 10%. How much of that is due to commissions, spread, rollover and slippage?

The backtest shows a profit of $956.65 with no trading costs.

My real results, which 1) show a profit on the backtest but 2) are actually showing a loss in real life, can be used to estimate a floor for my trading costs. The formula for that is
( Total profit and loss + commissions + rollover) / total trades, which is currently $1.58 in costs per trade.

The commissions and rollover are easy to separate out using either Myfxbook or the FXCM account report. The grand total spent so far on commissions is -$239.80 and -$3.05 on rollover.

The hardest part to separate is the spread paid. I’m not recording the spread paid on every trade (maybe that’s a mistake and I need to add it). But I’m going to use the table below to estimate. I took a random sample of 30 trades from the 501 trades completed at the time of my analysis.

Spread PaidSlippage
0.0001985231.49E-05
0.000153951-5.13E-05
0.0004558230.000227912
9.98E-050
0.000161242-0.00313413
2.76E-05-9.19E-06
5.55E-056.94E-06
0.000110898-1.01E-05
9.24E-050
9.91E-05-1.57E-16
6.55E-051.31E-05
4.85E-052.08E-05
8.22E-05-1.67E-16
6.87E-050
6.95E-05-1.65E-16
0.00015173-2.17E-05
9.43E-05-2.36E-05
9.38E-05-0.00225922
7.61E-05-0.0024735
0.0001600381.00E-05
0.000135020
0.0035426254.52E-05
0.000222978-0.00376275
7.62E-050
0.0004327977.73E-06
2.61E-050

The average slippage (the right column) is a stunning -0.044%. I’m getting negative slippage on average with FXCM. That’s outstanding! FXCM is improving my fills even though my entries are requested at a worse price. Whatever misgivings I’ve had about FXCM in the past are alleviated. That’s impressive execution.

Estimating the spread paid is much more difficult. I’ve chosen to take my average trade profit on a $5,000 account as the starting point. The trouble is that the value of an average winner can depend on the account performance. If I use stagnant position sizing, then the drawdown doesn’t effect the value of the average winner. Under that assumption, the average winner is $3.48 per trade.

But if I use compound position sizing, the drawdown eats away most of the profits. That drops the average trade value down to $1.70.

I converted the spread paid from pips into percentages. Using EURUSD as an example, a 1 pip spread works out to 0.0001/1.12727 = 0.000089. The reason for doing this is so that I can compare the spread on EURUSD to something with a much wider spread like AUDNZD. The spread is wider on AUDNZD, but the value of a NZD pip isn’t the same as a USD pip. Percentages allow for an apples to apples comparison.

The average spread paid in my sample was 0.00026157605, which is 0.026%. Putting that back into terms relative to my account balance, I’m paying 0.026% * $5,000 = $1.31 per trade in spread. Across 420 trades, that’s -$550.20 in spreads.

Total costs are spread, commissions and rollover:
$550.20 + $239.80 + $3.05 = $793.05

On a per trade basis, that is $1.78 in costs per trade from my estimates.

The total profit on the backtest was $956.65, but I missed about $550 of it because trading didn’t start until 17:00 on the 28th of January. That leaves the backtest profit somewhere around $406.65.

That puts the re-estimated profit and loss at $406.65-$793.05 = -$386.40. The actual loss is -$469, which I feel is a reasonable discrepancy based on the fact that I’m estimating how much profit was contributed on January 28 instead of knowing for certain.

The conclusion is that I need to turn off this trading at FXCM. Even if I joined their active trader program and traded in the top tier, it would only save me half the commissions. Most of the trading costs are in the spread and not commissions. I’m seriously considering a move to a broker that will allow me to make a market by posting limit orders. But first, I’ll need to go over my Pepperstone account to review the trading costs for myself and clients.

Filed Under: Dominari, Test your concepts historically Tagged With: backtest, FXCM, Rollover, slippage, spread

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