Forums  > Basics  > Basic currency arbitrage question  
     
Page 1 of 2Goto to page: [1], 2 Next
Display using:  

talolard


Total Posts: 16
Joined: Jan 2010
 
Posted: 2010-04-08 10:18
Hi everyone,
I apologize for the very basic question, and gracefully accept the flak that will come with it, but if someone could also give an answer I would be most grateful.
I wrote a simple program that looks for "triangular arbitrage" opportunities in the spot forex market. I'm sure everyone knows what it is but just to make sure I haven’t mixed my terminology, I mean for example: Buy EURUSD, Sell EURJPY and Buy USDJPY which is eequivalent to buying and selling EURUSD (Because Sell EURJPY and buy USDJPY is essentially short EURUSD).
The program looked for arbitrage opportunities, taking the spread into account. I have found multiple opportunities for 1 or two pips and on occasion have seen the number go as high as 5.
My questions are:
1. Assuming I got filled at the correct prices, when do I close the positions? In other words, I will open a position when there is an arbitrage opportunity, but when do I close it?
2. Could someone refer me to any material about how to place the orders. I figure that since these opportunities are short lived I must handle not getting filled at the right price on all three positions. How do I approach this problem?

Thanks
Tal

macrotrader


Total Posts: 353
Joined: May 2009
 
Posted: 2010-04-08 10:49
1. When the spread closes.
2. You certainly want to automate a strategy like this. So you need a broker where you can trade with an API. The documentation will tell you how to place orders. Then you add your own logic, for example calculate a probability for a fill for each order.

"Risk comes from not knowing what you're doing" Warren Buffett

FDAXHunter
Founding Member

Total Posts: 8370
Joined: Mar 2004
 
Posted: 2010-04-08 11:36
I sure hope that both of you are kidding with regards to 1.!!!!

The Figs Protocol.

talolard


Total Posts: 16
Joined: Jan 2010
 
Posted: 2010-04-08 13:03
I wasn't kidding.
I can't figure out what my positions would look like once the arbitrage closes (is that the correct term). Would both positions be in profit, would one be at a profit and the other at a loss with a certain ratio between them?

I have an API and I can implement whatevere needs to be implemented. I am assuming I should use limit orders so that I can control my entry prices, but I think the obvious drawback is that I won't get filled instantly so it's likely the oportunity will have closed before I get all of my orders filled.
How should I aproach this problem. Is there some established methodology or articles or something to points me in the right direction?
Thanks

ThomasJ02


Total Posts: 38
Joined: Feb 2009
 
Posted: 2010-04-08 13:23
You don't have to worry about when to close a position in a triangle arbitrage because if all your orders get executed you make instantaneous risk-free profit.

Consider currencies USD, JPY, EUR
Normally, you have a relationship that's approximately:
1 USD=100 JPY
1.3 USD=1 EUR
Hence, 1 EUR=130 JPY if there's no triangle arb.

Today however, you have the following most excellent quotes that you can buy or sell at:
1 USD=100 JPY
1.3 USD=1 EUR
1 EUR=129 JPY

Let's make money!
Trade: Position
SELL 129 JPY, BUY 1 EUR: -129 JPY, +1 EUR
SELL 1 EUR, BUY 1.3 USD: -129 JPY, +1.3 USD
SELL 1.3 USD, BUY 130 JPY: +1 JPY

You will note that you have made one risk-free yen, and you have no position that you need to close.

As an aside, you're not going to be able to make money on this using a retail platform/API. People with systems that are about a zillion times faster than you are looking for triangle arb all the time.

In fact, I would go so far as to say that you could use a triangle arb check to see if your system is having problems. If you detect a triangle arb opportunity, your data is probably bad.

talolard


Total Posts: 16
Joined: Jan 2010
 
Posted: 2010-04-08 13:50
Thanks Thomas,
I think I see where I am getting confused. Via a retail broker I don't buy a currency, I buy "a pair". Then looking at your example, I have +1 JPY but three positions open, each one on a different currency pair.
As for the aside, This isn't so much an attempt to make money (though i wouldnt mind) as much as it is an effort to learn.
I do wonder though if people with systems zillions of times faster than mine couldnt put them to better use then finding such tiny arbitrages?

ThomasJ02


Total Posts: 38
Joined: Feb 2009
 
Posted: 2010-04-08 13:56
Through a retail broker or anyone else, you never buy a pair. You buy one currency and sell another. It's just like going to the foreign exchange counter at the airport. You don't buy or sell ""EURUSD", even though the people at the foreign exchange counter will quote you rates to buy or sell EURUSD. You buy EUR and sell USD, or vice versa.

Suppose you go to a foreign exchange counter at the airport and do the transaction I described. You start out with 129 Yen in your hand, do all your transactions, and end up with 130 Yen in your hand. You don't have any positions open with the counter clerks at the airport when you're done.

talolard


Total Posts: 16
Joined: Jan 2010
 
Posted: 2010-04-08 14:16
Well, when I go to the clerk I give him dollars and get euros, then give him euros and get yen, then give him yen and get dollars. I understand that I am essentially doing the same thing with my broker, but when I am long EURUSD and Long USDJPY the position does not turn into long EURJPY. In other words that extra yen I made isn't isolated, it exists in the relationship between the three positions I have open, and I still need to close them.

macrotrader


Total Posts: 353
Joined: May 2009
 
Posted: 2010-04-08 14:40
No, your broker will show three accounts: EUR cash, USD cash and JPY cash and will offer you to trade EUR against USD, USD against JPY and EUR against JPY for certain rates (the cross rate). As I understand it a triangular arbitrage is only possible because two market makers post inconsistent cross rates.

"Risk comes from not knowing what you're doing" Warren Buffett

autokor


Total Posts: 49
Joined: Mar 2008
 
Posted: 2010-04-08 16:43

Your data is bad or not tradable.

 

Assuming it would be tradable data and your retail broker really only lets you trade certain lots/contracts than you would just wait till you find the opposite opportunity .  

You can wait as long as you want because in that moment you just would not have any real position nor any risk.


talolard


Total Posts: 16
Joined: Jan 2010
 
Posted: 2010-04-08 17:34
autokor, could you please elaborate?
Thanks

FDAXHunter
Founding Member

Total Posts: 8370
Joined: Mar 2004
 
Posted: 2010-04-08 17:59
His point is that there is no way you are finding 5 pips in terms of triangle violation (or even 1 pip for that matter. Why would a broker even offer that to you, instead of just trading it for themselves?).

You don't have to worry about taking off the position (it's not even a position, it's just an accounting thing your broker is showing you), because you are not exposed to any risk.

We need, like a "Basic Basics" phorum.



The Figs Protocol.

sidml


Total Posts: 39
Joined: Sep 2009
 
Posted: 2010-04-08 19:04
Prof. Fama and Prof. French were walking down the street when one of them saw a twenty dollar note on the sidewalk. As Fama was bending down to pick it up, Jim Simons came on a motorbike and swooped it away. Simons also somehow managed to steal another dollar from French's wallet.

ast4


Total Posts: 390
Joined: Aug 2007
 
Posted: 2010-04-08 22:24
Talolard and MT, you guys do understand replication right?

"Mathematicians are machines for turning coffee into theorems!"

FDAXHunter
Founding Member

Total Posts: 8370
Joined: Mar 2004
 
Posted: 2010-04-09 07:37
sidml:Prof. Fama and Prof. French were walking down the street when one of them saw a twenty dollar note on the sidewalk.

Well, in this example it's more a case of Messrs. Fama and French walking into a bank, with a guard, insisting that there is a twenty dollar note in the locked vault that doesn't belong to anyone.

The Figs Protocol.

maninmoon


Total Posts: 56
Joined: May 2010
 
Posted: 2010-05-11 12:36

macrotrader,

You mention "calculating the porbability of getting a fill on each order". This suggests that you are able to to backtest a market-making strategy - is that the case?


autokor


Total Posts: 49
Joined: Mar 2008
 
Posted: 2010-05-11 15:49

All your last posts show that you are thinking of a high Frequency Market Making /Mean Reversion strategy.

In non fragmented markets like ES you can calculate it by trying to  track your position in the order book.   But in FX this will not be possible because there is no time priority over all markets.  Therefore it is quite likely that you will get many  "arbitrage fills" that are not in favour for you  and miss many potential good fills with sudden mean reversion to the other side of the spread.

I think these strategies must be tested in reality. Backtests will not show anything real.


Maggette


Total Posts: 1066
Joined: Jun 2007
 
Posted: 2010-05-14 21:31
I can't believe that there are FX retail trader even considering this (circle arbitrage). I tell any of them who asked me (there were quite a few): no, won't work....but they don't seem to listen.

I visited some retail FX forums for some time. It is flat out incredible what people think is possible for them..... !

Ich kam hierher und sah dich und deine Leute lächeln, und sagte mir: Maggette, scheiss auf den small talk, lass lieber deine Fäuste sprechen...

Graeme


Total Posts: 1629
Joined: Jun 2004
 
Posted: 2010-05-15 12:26

Banks with significant retail buy-sells of various currencies might perform the triangle arbitrage in an automated fashion. Here, of course, the arbitrage exists because each of the two retail customers are willing to pay the double and the bank can close the deal by paying away only one double. Thus the bank makes a profit.

Example: a UK based bank has Mr. Jones going on holiday to the US and Mr. Smith returning from holiday from the Eurozone. Jones wants notes and Smith has notes left over. The bank pays Jones dollars, receives pounds; the bank pays Smith pounds, receives euros, and the bank closes the exposure by paying euro, receiving dollars on an exchange.

It's automated and it's small. But, if you are a large retail bank, the profits can add up quite nicely.


Graeme West

Maggette


Total Posts: 1066
Joined: Jun 2007
 
Posted: 2010-05-15 12:41
Definetly. The retail customer gets "arbitraged". No question about it. I was talking about retail trader whoi think they could be on the winning end of this strategy.

Ich kam hierher und sah dich und deine Leute lächeln, und sagte mir: Maggette, scheiss auf den small talk, lass lieber deine Fäuste sprechen...

Graeme


Total Posts: 1629
Joined: Jun 2004
 
Posted: 2010-05-15 14:16

What do you mean by a retail trader? A bloke at home trying his luck on these fx trading websites? (the one advertised on satellite TV here quite often is eToro, where 'there's always a currency going up'). 

Punters who buy into adverts like that, deserve what's coming to them, and don't deserve your wisdom.


Graeme West

Maggette


Total Posts: 1066
Joined: Jun 2007
 
Posted: 2010-05-15 15:59
"A bloke at home trying his luck on these fx trading websites? "

Yep. There is an industrie guranteeing "access" to "FX markets" for the bloke at home (which of course indicates that they hope that the bloke at home how FX markets are working..)

In Korea and Japan spot FX trading is a sport amongst bored moms (at least that is what I've been told.)

It is like the CFD business. Make the bloke at home believe he is part of something big, that he is so important, that you even offer him to trade from his I-phone Puke.....and then rip him off. Sell some "winners" to the crowd so that you have enough fresh meat buying into the game. Have a look at this:
http://www.youtube.com/watch?v=WzKHPJPYs2M

You guys might not believe it, but there are a lot of people out there who believe, that this is what all of you are doing on the job!


Ich kam hierher und sah dich und deine Leute lächeln, und sagte mir: Maggette, scheiss auf den small talk, lass lieber deine Fäuste sprechen...

quantie


Total Posts: 886
Joined: Jun 2004
 
Posted: 2010-05-16 05:29
let us put it this way assume you built some high falutin system to find these arbs and you manage to find that 1pip and trade on a gazillion dollar. The probability of you being able to trade on any of the platforms after your first trade rapidly approaches zero..

Graeme


Total Posts: 1629
Joined: Jun 2004
 
Posted: 2010-05-16 14:42
That youtube video is very interesting. I think it is entirely acting. That presentation: nowhere do you see what it is actually about, who the crowd are applauding, and when the watch is handed over there is a lot of uninvolved crowd noise.

Graeme West

ricko


Total Posts: 73
Joined: Apr 2010
 
Posted: 2010-06-09 14:56

Retail traders thinking of triangular arb with a retail pool platform?

I say, what can desperation make people think about...

 

 

Previous Thread :: Next Thread 
Page 1 of 2Goto to page: [1], 2 Next