Sari la conținut
  • intrări
    29
  • comentarii
    230
  • citiri
    1.163.013

Swap Arbitrage


TheEconomist

734.420 citiri

First of all, for who doesn't know what swaps are, they are implementation of differential interest rates. We aren't going to present here the implementation of swaps starting from the differentials, but the purpose of the article is to show how the swaps may be used to make money with a small amount of risk.

 

Swap Arbitrage, as a hedging for interest technique, is another application of Kreslik currency rings: this time there is no need for FPI calculation or generation of virtuals. All it matters is that the currency ring to be correctly placed, and to generate interest by its simple existence. I called it "Swap Arbitrage", because, if we cut out the forex impact, which is usually fixed due to hedging, it's like buying lower and selling higher swaps. The tinier the results, the more risky Swap Arbitrage is, because the swaps need longer time to recover spread loss, time in which fundamental events may alter the interest rates.

 

 

1. Generating all the possible versions of available Kreslik rings on a broker

======================================================

 

In my previous article about the Intercross Arbitrage I covered some BcLib functions helpful in reading MetaTrader content. The first function that needs to be called is GetSymbolsAppendix() to retrieve the symbols appendix, then the GetCurrenciesAndPairs() to get available currencies and pairs. The think pattern of this strategy is the one from Triangular or N-angular Arbitrage. We suppose that we have funds denominated in a currency, that we sell for the next proposed one, and so on, until the ring is completed. This would be hard to implement if we'd use directly the pairs. So we start using the currency list available in UsedCurrencies[] . Suppose we have n currencies (in fact, CurrenciesNo). Every one of them may be , or be not, in a currency ring. Thus we have 2^n combinations. Of course the 2^n include invalid rings, such as 0 , which includes no currency, and others with one or two currencies inside. These are sent to scrapyard and we focus on almost valid currency rings with at least three currencies. I said almost because at the time of their generation we don't know that the pairs to link up the currencies exist for real. Generation is simple, by using a simple cycle from 0 to (2^n)-1 and converting the number to binary, then completing the result with leading zeros. Say for example UsedCurrencies[] has EUR, USD, GBP, JPY and CHF (only these five). Then for example 13 would be translated to binary as 1101, completed with leading zeros to 01101 (to be five digits length), and then we can read the what the 1s mean: USD, GBP and CHF. Once that we have this combination, we could then permutate it to generate the same ring from all possible directions. Then we test each resulted ring for validity (if all pairs exist (of course, if the ring has three currencies, a test on original combination is enough, if it has more, there must be a test on each permuted combination). Once valid, we calculate the overall swap, and, if posible, we keep its combination and permutation numbers on hand (I couldn't generate arrangements, nor combinations directly ; arrangements are nothing more than permuted combinations). After studying all possible combinations or only some of them (say only 3-currency rings) we may have already a best ring, which is the maximum that can be got in given conditions. If there is no best ring, swap arbitrage is impossible.

 

Powerful BcLib functions to achieve this:

 

string ConvertTo(int base,int number)

The function converts the number in given base. It's reverse function is int ReconvertFrom(int base,string number) that converts back to base 10.

 

string Padl(string s,int total,string fillwith)

The function fills string <s> with <fillwith> strings (intended to be chars) to fill up the total length; similar functions: Padr and Padc. These functions originate from FoxPro.

 

void GenPermutation(int n,int elem,int &perm[])

Generates the permutation <n> (0 - based) of <elem> elements inside array perm. Array will contain numbers from 1 to n.

The opposite of this function is int FindPermutation(int elem,int perm[]) , which will return given's permutation index.

 

bool ContractExists(string symbol)

Returns true if given symbol exists in the datafeed. It's runtime based, doesn't look up the UsedPairs[] as it can be used for any symbol, not only forex pairs.

 

bool ContractIsTraded(string symbol)

This is an older function, written by me before I realised MarketInfo(...,MODE_TRADEALLOWED) is available. Now the function will ultimately return MODE_TRADEALLOWED inquiry, however this aspect is a bit controversial, although MODE_TRADEALLOWED inquiry may return False when trade context is busy, so when the contract is really traded.

 

This is a code excerpt from the SwapFinder (one of the first implementations of this algorithm):

 

for (icomb=maxim;icomb>=0;icomb--)
 {
 image=Padl(ConvertTo(2,icomb),CurrenciesNo,"0");
 crrcies=Occurs("1",image);
 valid=false; 
 if (crrcies>=3&&crrcies<=maxcrrcies)
	{		 
	maxperm=Factorial(crrcies)-1;
	combimg="";
	for (iimg=0;iimg<CurrenciesNo;iimg++)
	   {
	   if (StringElement(image,iimg)=="1")
		   combimg=StringConcatenate(combimg,UsableCurrencies[iimg]," ");
	   }	   
   WriteLn(StringConcatenate("Studying ",combimg," having ",DoubleToStr(maxperm+1,0)," permutations"));
   for (iperm=0;iperm<=maxperm;iperm++)
	   {
	   ROA=-1;
	   ROE=-1;
	   valid=IsConfigValid(image,iperm,crrcies,Contracts,Ops);
	   if (valid==True)
		  {
		  EstablishRing(crrcies,Contracts,Ops,Volumes,Usage,TotalUsed,Swaps,Interests,NormalROA,WeightedROA,ROA,ROE,FXResult,FinalROE,False);

 

 

As you see, the code is not complete, as none of the for cycles is completed; See how <image> is made up by ConvertTo() and Padl() , number of currencies is counted in <crrcies>, then currencies are extracted in the <iimg> cycle (only to be displayed), then permutations are being generated inside the <iperm> cycle, upon validation by IsConfigValid() function, and finally ring is being constructed by the EstablishRing procedure.

 

2. The mysterious realm of the swaps

============================

 

The swaps implementation in MetaTrader was always a mystery: the OrderSwap() function works ex-post, it retrieves the total interest cashed/payed on a order. The only way of knowing before is by using MarketInfo's MODE_SWAPLONG and MODE_SWAPSHORT. However, what it gives is a mysterious "swap". Is it an interest rate ? NO. Is it an interest ? NO. Ok. Enough fooling around with "Let's twist again". Let's see what it really is.

First of all, the result meaning is given by MODE_SWAPTYPE inquiry:

 

MODE_SWAPTYPE inquiry answer : 0

Metaquotes documentation : in points;

BcLib coverage: Yes;

Meaning: In pips;

Behaviour: the most stable ever seen;

Broker examples: ATC Brokers, Finex, FXLQ

==============================================

MODE_SWAPTYPE inquiry answer : 1

Metaquotes documentation : In the symbol base currency

BcLib coverage: No*

Meaning: In the first currency of the pair

Behaviour: Unknown,

but probably jumpy due to needed conversion in that currency

Broker examples: FXLQ recently (yes they have them different)

==============================================

MODE_SWAPTYPE inquiry answer : 2

Metaquotes documentation : by interest

BcLib coverage: No

Meaning: Unknown

Behaviour: Unknown

Broker examples: Never reported in wild

==============================================

MODE_SWAPTYPE inquiry answer : 3

Metaquotes documentation : In the margin currency

BcLib coverage: Yes

Meaning: In pips of the account currency

Behaviour: Very unstable

Broker examples: InterbankFX, FXDD

==============================================

 

The Swap2Interest_Volume from BcLib converts the swap to interest on a given volume (not lot). Useful when building swap strategies because you can find the actual swap before it would come.

 

*Not in the last version of BcLib. Find and replace the Swap2Interest_Volume function with the next body for this swap type to be included:

 

double Swap2Interest_Volume(double volume,int swapmode,string contract,string appendix)
 {  
 double m_tick;
 double m_lotsize;
 double swap;
 double gc;
 double res;
 if (PairsNo==0)
GetCurrenciesAndPairs(appendix);
 string contractf=StringConcatenate(contract,appendix);
 int swt=MarketInfo(contractf,MODE_SWAPTYPE);
 if (swt!=0&&swt!=1&&swt!=3)
{
 if (BcLibAlerts==True)
	Alert("Swap2Interest***** : swap type "+DoubleToStr(swt,0)+" not implemented !");
 return(0);
}
 if (swapmode==MODE_SWAPLONG||swapmode==OP_BUY||swapmode==OP_BUYLIMIT||swapmode==OP_BUYSTOP)
 swap=MarketInfo(contractf,MODE_SWAPLONG);
 else
 swap=MarketInfo(contractf,MODE_SWAPSHORT);
 if (swt==0)
{
 m_tick=MarketInfo(contractf,MODE_TICKVALUE);
 m_lotsize=MarketInfo(contractf,MODE_LOTSIZE);
 return(swap*m_tick*(volume/m_lotsize));	 
}
 if (swt==1)
{
 m_lotsize=MarketInfo(contractf,MODE_LOTSIZE);  
 gc=GetCurrency(StringSubstr(contractf,0,3),AccountCurrency(),appendix);
 res=swap*gc*(volume/m_lotsize);
 if (gc==0)
   {
   if (BcLibAlerts==True)
	 Alert("Swap2Interest***** : could not convert swap type 1 for "+contractf+" as GetCurrency() failed! Check contract and appendix!");	 
   }
 return(res);
}
 if (swt==3)
{
 m_lotsize=MarketInfo(contractf,MODE_LOTSIZE);	 
 return((volume*swap)/m_lotsize);	 
}
 }

 

 

You can easily see in the code how the swap types were implemented:

 

Type 0: swap*m_tick*(volume/m_lotsize)

 

Type 1: swap*gc*(volume/m_lotsize), where gc is the first currency of the pair converted to account currency

 

Type 3: (volume*swap)/m_lotsize , similar to type 0 but without multiplicating with the tick value;

 

Picture of the SwapFinder_script running on ATC Brokers:

 

http://img222.imageshack.us/img222/2171/pictureofswapfinderscricm4.jpg

 

SwapFinder parameters:

 

extern int MarginUsage=90;

extern int MaxCurrenciesUsed=3;

extern bool JustTesting=False;

extern int Slippage=3;

extern bool ShowNegatives=False;

 

MarginUsage - the percent of the margin (or the leverage) that's used for the trades altogether;

MaxCurrenciesUsed - for 0, scans all the combinations (from 3 to n) currencies; for another value, scans combinations having from 3 to that value;

JustTesting - is a safety measure; it will trade only when the script is allowed to trade from the properties and JustTesting is set to True;

Slippage - trading slippage admitted;

ShowNegatives - if true, will display financial data gathered on negative swap rings too.

 

Again, be cautious about the MarginUsage. Don't set it too to near 100%, as your effective margin during initiation of trades might get under the required margin and you would run out of funds before completion of trades. Also, be careful that in dangerous situations broker's datafeed may be damaged (the problem I've been talking on the Intercross Arbitrage article) and you won't be fully hedged, your trades being placed in profit/loss territory until the issue being solved.

 

How to read the SwapFinder window

 

Usage - the volume , in account currency , of the trade. Under the usages there is their sum, interpreted as Total Assets

% - the weight of the trade volume in total traded. The trades must be hedged, so the % value must be almost the same at them all equal to (1/no. of trades)*100

Op. - trade direction

Volume - the volume of the trade, in units of the first currency of the pair

Lots - the volume, in lots

Contract - the pair symbol

Swap - the exact swaps for one lot, as answered by MODE_SWAPLONG and MODE_SWAPSHORT inquiries

Interest - the real interest earned/payed on the trade

NormalROA - the ROA (Return on Assets) of the trade as (Interest/Usage * 100) * 365 (later edited)

WeightedROA - the Normal ROA as weighted (by the percent occupied in Total Assets)

 

ROA is the sum of Weighted ROAs.

ROE (Return on Equity) calculated as ((ROA * Total Assets) / Account Equity) * 100

 

Forex result = costs of spreads

 

Final ROE = ROE - Forex result

 

 

3. Butterfly : a nonlinear hedge

=======================

 

Some time ago, as I was playing with pencil on paper drawing currency rings and trying to imagine a different kind of hedge that could make more swaps, I came up with the idea of a butterfly hedge ( because two currency rings with a common currency (common tip) look like the wings of a butterfly). However, two completed currency rings, with or without a common tip, are independant rings. They cannot produce more swaps, as one would be , say the best ring, and the other one, a lesser ring. However, this measure could add more safety to swap arbitrage, as it produces a slight diversification of the "investments" (the two currency rings). If we link up N currencies we obtain a simple , linear , currency ring, where EVERY CURRENCY IS EQUALLY BOUGHT AND SOLD. However, noone says it must be bought and sold once!

 

 

http://img166.imageshack.us/img166/8964/butterflyfm1.jpg

 

This was the first version of the butterfly hedge. The points are currencies. Among them O is mirrored (the two O represent the same currency). Features:

- the Z currency is bought 3 times (OZ, YZ, XZ) and sold 3 times (ZO, ZP, ZQ).

- the O currency is bought 3 times (PO, QO, ZO) and sold 3 times (OZ, OY, OX).

 

A better version of this hedge would be one without the needless ZO and OZ relationships and still the hedge would be a butterfly, since the "wings" could not work seperately.

 

Each model has a mirror. Just like any atom from Intercross Arbitrage could have played the role of bid or ask, similar any butterfly can be mirrorized simply by reversing the direction of the arrows.

 

This model doesn't look like a butterfly at all but it respects the same principles.

 

Looks like electronic circuitry huh?

http://img514.imageshack.us/img514/2331/rectanglehedgeoe2.jpg

(The double arrowed edges mean that volume , in account currency, is double than the one used on the other edges).

 

Now I don't say the butterfly hedges are necesarilly better than the currency rings. It may be worse in many situations, but tt's a different way of thinking hedge.

 

SwapButterfly's parameter list is similar to SwapFinder's. However, in the start(), you must assign UseModel to one of the preexistent models defined, or to a new one.

 

*TIP ABOUT BROKERS: If you find a swap hole in the broker's datafeed (meaning for one pair the cashed swap is bigger than the payed swap, don't just go long and short simultaneously, as this will alert the broker to repair the datafeed. Better place it as a ring or a butterfly, sure this opportunity will be included in the best provided solution).

70 Comentarii


Comentarii Recomandate



I would add something Bog, the swap rates during a year may easily change. Central banks policies can change as a snap of a finger. So if swap rates change during the year , the swap hedge can increase or decrease its pay out..the only way this is to jump to another "butterfly"..and that costs i terms of return.

In summary, you may or may not get 100% return, it depends how stable interest rates are during that period.

Anyway, I like this strategy but as Bog said it depends how muh money you put at work...is not the same putting 500usd than 5000USD... :tongue:

Link spre comentariu
I would add something Bog, the swap rates during a year may easily change. Central banks policies can change as a snap of a finger. So if swap rates change during the year , the swap hedge can increase or decrease its pay out..the only way this is to jump to another "butterfly"..and that costs i terms of return.

In summary, you may or may not get 100% return, it depends how stable interest rates are during that period.

Anyway, I like this strategy but as Bog said it depends how muh money you put at work...is not the same putting 500usd than 5000USD... :tongue:

 

I knew that, this is why I didn't even claim it would be risk free, especially if it happens during recovery of swaps.

Link spre comentariu
Vizitator andi

Postat

Finally checked out every single MT4 Platform available.

Here's the result for the "working" platforms:

 

Working for Swap Arb:

- ATC FX

- FxCast Pro

- ODL

- PFG FX

- Real Trader

- Royal Trader

 

Showing Arbs on Intercross Arbitrage:

- MIG FX

- NeuImeXX

- TadawulFX

- WCF

- (also some of the platforms working for swap arb)

 

Andi

Link spre comentariu
Finally checked out every single MT4 Platform available.

Here's the result for the "working" platforms:

 

Working for Swap Arb:

- ATC FX

- FxCast Pro

- ODL

- PFG FX

- Real Trader

- Royal Trader

 

Showing Arbs on Intercross Arbitrage:

- MIG FX

- NeuImeXX

- TadawulFX

- WCF

- (also some of the platforms working for swap arb)

 

Andi

 

 

Lol, I don't quite remember it working on MiG. As for Neuimex, everyone knows it's bankrupt. However, you did a great job testing both Intercross and Swap Arbitrage. Swap Arbitrage is really nice especially on extremely high leverage accounts.

 

Bogdan

Link spre comentariu

Andi, be carefull where you put your money. May be you find the best arbitrage opportunities in the worst creditfull brokers. Take your time and research them thoroughly... check if they are regulated, opinion from users at forexbastards,etc.

have a nice day

Link spre comentariu

Just wanted to open up a live account with ATC Brokers. They are not allowing Microlots and their leverage is 100:1.

Why the hell they are allowing it within their Demo account ???

Link spre comentariu
Just wanted to open up a live account with ATC Brokers. They are not allowing Microlots and their leverage is 100:1.

Why the hell they are allowing it within their Demo account ???

 

Couldn't reach Dave on Skype. However, he's a Velocity IB, try with them.

Link spre comentariu

I would be interested to open up an account with ATC. Trading only Minilots is OK, but 100:1 leverage is too small.

Could you get in contact with this IB?

 

Andi

Link spre comentariu
I would be interested to open up an account with ATC. Trading only Minilots is OK, but 100:1 leverage is too small.

Could you get in contact with this IB?

 

Andi

 

Dave is ATC's president... Contact me on skype or yahoo messenger "fxeconomist" ... I will give you his skype ID

Link spre comentariu
Vizitator Bogusz

Postat

> Why are they exluded? Just opened an Arb (eraud, eurjpy, audjpy) with FXDD Demo.> AndiBe careful with DEMO accounts seeking for swap arbitrage. I'm still checking about 9 brokers to evaluate if it will be possible to use swap or other arbitrage techniques and I've found that differences between DEMO and real swaps could be as high as 6 times.In example from +1.0 points in DEMO to +0.15 REAL account.There is need to confirm DEMO swaps by email or chat if broker dosen't show it clear on his web site.

Link spre comentariu
> Why are they exluded? Just opened an Arb (eraud, eurjpy, audjpy) with FXDD Demo.

> Andi

 

 

 

Be careful with DEMO accounts seeking for swap arbitrage. I'm still checking about 9 brokers to evaluate if it will be possible to use swap or other arbitrage techniques and I've found that differences between DEMO and real swaps could be as high as 6 times.

 

In example from +1.0 points in DEMO to +0.15 REAL account.

 

There is need to confirm DEMO swaps by email or chat if broker dosen't show it clear on his web site.

 

Good point about checking by mail the swaps! At least you don't wire the money just to see the bank fee lost and no arb opportunities.

Now about FXDD experience and swap volatility : For one of my friends, when we tested, SwapFinder recommended and a traded a 7-currency ring (sorry I no longer have the picture). Then I found out that, if I run the script over 20 minutes, I get other results! It seemed there were just a few "versions" but only one version would exist at that split of a second when swaps are wired. And if it's not the one you traded, you won't feel too good!

 

Regards,

Bogdan

Link spre comentariu
Vizitator chrono

Postat

The formula to calculate swaps is

 

2nd named currency t%/36000/1st named currency t%/36000 * close price of cross= swap in 2nd named currency.

 

The t% (rates) utilized are BBA LIBOR Overnight (www.bba.org.uk) at the date shown in the image posted.

 

Now, I have calculated swap of the ring shown before and the results is different.

 

Sell 0,22 Eur/Gbp (close price 0,6785, t% 1st 4,04, t% 2nd 5,9)= 0,771141794 GBP

 

Sell 0,15 Gbp/Aud (close price 2,4439, t% 1st 5,90, t% 2nd 6,525)= 0,636328005 AUD

 

Buy 0,22 Eur/Aud (close price 1,6578, t% 1st 4,04, t% 2nd 6,525)= - 2,517271 AUD

 

Converting in Euro utilizing close price of the crosses (as it right and as it done on the forex) the results

is 0,0019372 euro.

 

I don't believe that broker can give these kind of swaps, it will be ever in loss in order to financing this trade.

 

After, I've calculated an actually profitable ring swap arbitrage and I show the results.

 

Buy 0,1 Eur/Jpy (close price 162,10, t% 1st 3,84, t% 2nd 0,555)= 147,900474 JPY

 

Sell 0,1 Eur/Aud (close price 1,6299, t% 1st 3,84, t% 2nd 6,97)= 1,416956 AUD

 

Sell 0,1 Aud/Jpy (close price 99,47, t% 1st 6,97, t% 2nd 0,555)= - 177,215703 JPY

 

Converting in Euro utilizing close price of the crosses (as it right and as it done on the forex) the results

is 0,6885051 euro.

 

It's best, true, but I don't put financing rate banks ask you to pay in add to calculate swaps.

Considering a financing rate of 1% p.a., the two eg shown before gave a negative results.

 

I conclude that it's possible to find profitable ring swap arbitrage, but it's very difficult to put it in really profitable trade.

 

I'm sorry to write bad english.

 

 

P.S.: To Bogdan

 

I've tried to run your spreadsheet program to find ring arbitrage swap, but I haven't been able to run it. I'm sure that is because I don't know as to play metaquotes in Metatrader, I'm just able to trade.

Can you explain me how to run your program in Metatrader.

Thank you for all the good works are on this forum. I think you are a genius.

 

:wink:

Link spre comentariu
Vizitator chrono

Postat

The formula to calculate swaps is

 

........... CUT .......

 

Converting in Euro utilizing close price of the crosses (as it right and as it done on the forex) the results

is 0,0019372 euro.

 

I don't believe that broker can give these kind of swaps, it will be ever in loss in order to financing this trade.

 

 

........CUT......

 

:wink:

 

I want to say I don't believe that brokers can gave you always the swaps you have posted in the image, because it will be ever in loss to financing the clients trade.

 

:wink:

Link spre comentariu
The formula to calculate swaps is

 

2nd named currency t%/36000/1st named currency t%/36000 * close price of cross= swap in 2nd named currency.

 

The t% (rates) utilized are BBA LIBOR Overnight (www.bba.org.uk) at the date shown in the image posted.

 

Now, I have calculated swap of the ring shown before and the results is different.

 

Sell 0,22 Eur/Gbp (close price 0,6785, t% 1st 4,04, t% 2nd 5,9)= 0,771141794 GBP

 

Sell 0,15 Gbp/Aud (close price 2,4439, t% 1st 5,90, t% 2nd 6,525)= 0,636328005 AUD

 

Buy 0,22 Eur/Aud (close price 1,6578, t% 1st 4,04, t% 2nd 6,525)= - 2,517271 AUD

 

Converting in Euro utilizing close price of the crosses (as it right and as it done on the forex) the results

is 0,0019372 euro.

 

I don't believe that broker can give these kind of swaps, it will be ever in loss in order to financing this trade.

 

After, I've calculated an actually profitable ring swap arbitrage and I show the results.

 

Buy 0,1 Eur/Jpy (close price 162,10, t% 1st 3,84, t% 2nd 0,555)= 147,900474 JPY

 

Sell 0,1 Eur/Aud (close price 1,6299, t% 1st 3,84, t% 2nd 6,97)= 1,416956 AUD

 

Sell 0,1 Aud/Jpy (close price 99,47, t% 1st 6,97, t% 2nd 0,555)= - 177,215703 JPY

 

Converting in Euro utilizing close price of the crosses (as it right and as it done on the forex) the results

is 0,6885051 euro.

 

It's best, true, but I don't put financing rate banks ask you to pay in add to calculate swaps.

Considering a financing rate of 1% p.a., the two eg shown before gave a negative results.

 

I conclude that it's possible to find profitable ring swap arbitrage, but it's very difficult to put it in really profitable trade.

 

I'm sorry to write bad english.

 

 

P.S.: To Bogdan

 

I've tried to run your spreadsheet program to find ring arbitrage swap, but I haven't been able to run it. I'm sure that is because I don't know as to play metaquotes in Metatrader, I'm just able to trade.

Can you explain me how to run your program in Metatrader.

Thank you for all the good works are on this forum. I think you are a genius.

 

:wink:

 

Sorry for answering so late, had some health issues...

Ok there is quite some time since I looked on this arbitrage. First make sure that BcLib (BcArb should be there also, but not needed) in the experts\include folder.

First compile bclib, then bcarb. Make sure the scripts (SwapButterfly, SwapFinder) are in experts\scripts folder. Compile and run each of them. Try some time when all pairs are active.

 

Regards,

Bogdan

 

 

P.S. Don't forget the initial algorithm was Kreslik's... I just modified it and posted it clearly so that everyone could understand. On the broker stuff, remember, this is a risky arb. The smaller the results, the bigger time to breakthru; time in which the Fed or anyone else involved in your trades with its interest rate can alter everything, or the broker might notice and correct...

 

P.S.no 2. It jumped into my eyes the 0.1 Sell Aud/Jpy... Should be about 0.16 to hold the hedge...

Link spre comentariu
Vizitator chrono

Postat

The formula to calculate swaps is

 

2nd named currency t%/36000/1st named currency t%/36000 * close price of cross= swap in 2nd named currency.

 

The t% (rates) utilized are BBA LIBOR Overnight (www.bba.org.uk) at the date shown in the image posted.

 

Now, I have calculated swap of the ring shown before and the results is different.

 

Sell 0,22 Eur/Gbp (close price 0,6785, t% 1st 4,04, t% 2nd 5,9)= 0,771141794 GBP

 

Sell 0,15 Gbp/Aud (close price 2,4439, t% 1st 5,90, t% 2nd 6,525)= 0,636328005 AUD

 

Buy 0,22 Eur/Aud (close price 1,6578, t% 1st 4,04, t% 2nd 6,525)= - 2,517271 AUD

 

Converting in Euro utilizing close price of the crosses (as it right and as it done on the forex) the results

is 0,0019372 euro.

 

I don't believe that broker can give these kind of swaps, it will be ever in loss in order to financing this trade.

 

After, I've calculated an actually profitable ring swap arbitrage and I show the results.

 

Buy 0,1 Eur/Jpy (close price 162,10, t% 1st 3,84, t% 2nd 0,555)= 147,900474 JPY

 

Sell 0,1 Eur/Aud (close price 1,6299, t% 1st 3,84, t% 2nd 6,97)= 1,416956 AUD

 

Sell 0,1 Aud/Jpy (close price 99,47, t% 1st 6,97, t% 2nd 0,555)= - 177,215703 JPY

 

Converting in Euro utilizing close price of the crosses (as it right and as it done on the forex) the results

is 0,6885051 euro.

 

It's best, true, but I don't put financing rate banks ask you to pay in add to calculate swaps.

Considering a financing rate of 1% p.a., the two eg shown before gave a negative results.

 

I conclude that it's possible to find profitable ring swap arbitrage, but it's very difficult to put it in really profitable trade.

 

I'm sorry to write bad english.

 

 

P.S.: To Bogdan

 

I've tried to run your spreadsheet program to find ring arbitrage swap, but I haven't been able to run it. I'm sure that is because I don't know as to play metaquotes in Metatrader, I'm just able to trade.

Can you explain me how to run your program in Metatrader.

Thank you for all the good works are on this forum. I think you are a genius.

 

:wink:

 

Sorry for answering so late, had some health issues...

Ok there is quite some time since I looked on this arbitrage. First make sure that BcLib (BcArb should be there also, but not needed) in the experts\include folder.

First compile bclib, then bcarb. Make sure the scripts (SwapButterfly, SwapFinder) are in experts\scripts folder. Compile and run each of them. Try some time when all pairs are active.

 

Regards,

Bogdan

 

 

P.S. Don't forget the initial algorithm was Kreslik's... I just modified it and posted it clearly so that everyone could understand. On the broker stuff, remember, this is a risky arb. The smaller the results, the bigger time to breakthru; time in which the Fed or anyone else involved in your trades with its interest rate can alter everything, or the broker might notice and correct...

 

P.S.no 2. It jumped into my eyes the 0.1 Sell Aud/Jpy... Should be about 0.16 to hold the hedge...

 

Hi, Bogdan.

 

Yes, you have seen right. It's about 1,6.

 

Now, I've found a bigger triangular ring swap. It's Sell 0,1 EUR/JPY - Buy 0,2 NZD/JPY - Buy 0,1 EUR/NZD. It's possible to gain up to 1 euro in one day trading with some brokers that give good swaps condition to retails.

 

I'm searching on internet for best brokers swap, it's very difficult. In this case the real arbitrage is found the best brokers in swaps, spread and regulation.

 

P.S.: I've not been able to run bclibs and swap finder following your indication. Maybe i don't understood.

 

See you soon.

 

Chrono

Link spre comentariu
The formula to calculate swaps is

 

2nd named currency t%/36000/1st named currency t%/36000 * close price of cross= swap in 2nd named currency.

 

The t% (rates) utilized are BBA LIBOR Overnight (www.bba.org.uk) at the date shown in the image posted.

 

Now, I have calculated swap of the ring shown before and the results is different.

 

Sell 0,22 Eur/Gbp (close price 0,6785, t% 1st 4,04, t% 2nd 5,9)= 0,771141794 GBP

 

Sell 0,15 Gbp/Aud (close price 2,4439, t% 1st 5,90, t% 2nd 6,525)= 0,636328005 AUD

 

Buy 0,22 Eur/Aud (close price 1,6578, t% 1st 4,04, t% 2nd 6,525)= - 2,517271 AUD

 

Converting in Euro utilizing close price of the crosses (as it right and as it done on the forex) the results

is 0,0019372 euro.

 

I don't believe that broker can give these kind of swaps, it will be ever in loss in order to financing this trade.

 

After, I've calculated an actually profitable ring swap arbitrage and I show the results.

 

Buy 0,1 Eur/Jpy (close price 162,10, t% 1st 3,84, t% 2nd 0,555)= 147,900474 JPY

 

Sell 0,1 Eur/Aud (close price 1,6299, t% 1st 3,84, t% 2nd 6,97)= 1,416956 AUD

 

Sell 0,1 Aud/Jpy (close price 99,47, t% 1st 6,97, t% 2nd 0,555)= - 177,215703 JPY

 

Converting in Euro utilizing close price of the crosses (as it right and as it done on the forex) the results

is 0,6885051 euro.

 

It's best, true, but I don't put financing rate banks ask you to pay in add to calculate swaps.

Considering a financing rate of 1% p.a., the two eg shown before gave a negative results.

 

I conclude that it's possible to find profitable ring swap arbitrage, but it's very difficult to put it in really profitable trade.

 

I'm sorry to write bad english.

 

 

P.S.: To Bogdan

 

I've tried to run your spreadsheet program to find ring arbitrage swap, but I haven't been able to run it. I'm sure that is because I don't know as to play metaquotes in Metatrader, I'm just able to trade.

Can you explain me how to run your program in Metatrader.

Thank you for all the good works are on this forum. I think you are a genius.

 

:wink:

 

Sorry for answering so late, had some health issues...

Ok there is quite some time since I looked on this arbitrage. First make sure that BcLib (BcArb should be there also, but not needed) in the experts\include folder.

First compile bclib, then bcarb. Make sure the scripts (SwapButterfly, SwapFinder) are in experts\scripts folder. Compile and run each of them. Try some time when all pairs are active.

 

Regards,

Bogdan

 

 

P.S. Don't forget the initial algorithm was Kreslik's... I just modified it and posted it clearly so that everyone could understand. On the broker stuff, remember, this is a risky arb. The smaller the results, the bigger time to breakthru; time in which the Fed or anyone else involved in your trades with its interest rate can alter everything, or the broker might notice and correct...

 

P.S.no 2. It jumped into my eyes the 0.1 Sell Aud/Jpy... Should be about 0.16 to hold the hedge...

 

Hi, Bogdan.

 

Yes, you have seen right. It's about 1,6.

 

Now, I've found a bigger triangular ring swap. It's Sell 0,1 EUR/JPY - Buy 0,2 NZD/JPY - Buy 0,1 EUR/NZD. It's possible to gain up to 1 euro in one day trading with some brokers that give good swaps condition to retails.

 

I'm searching on internet for best brokers swap, it's very difficult. In this case the real arbitrage is found the best brokers in swaps, spread and regulation.

 

P.S.: I've not been able to run bclibs and swap finder following your indication. Maybe i don't understood.

 

See you soon.

 

Chrono

 

Hi,

 

place BcLib and BcArb in experts\include.

first compile BcLib, then BcArb.

place the swapfinder and swapbutterfly in experts\scripts then compile.

 

Regards,

Bogdan

Link spre comentariu
Vizitator Ulterior

Postat

Hi, Bogdan,

 

great work, appreciate the code.

 

I came independently with the same idea and looking forward for arbitrage on currency rings.

 

One question though related to hedge - why currency pair rings lot amounts are different? If the rings should be in equilibrium - doesn't lot sizes need to be equal? Or are you betting that certain currency pair will repay itself with swap over time so you are making larger or smaller amounts so the hedge will eventually hold the difference?

 

Rgrds

Link spre comentariu
Hi, Bogdan,

 

great work, appreciate the code.

 

I came independently with the same idea and looking forward for arbitrage on currency rings.

 

One question though related to hedge - why currency pair rings lot amounts are different? If the rings should be in equilibrium - doesn't lot sizes need to be equal? Or are you betting that certain currency pair will repay itself with swap over time so you are making larger or smaller amounts so the hedge will eventually hold the difference?

 

Rgrds

 

Hi,

 

Well it's simple, and I explained that in the Intercross article, the volumes should be equivalent, not the lotsizes to be equal. For example, 1 lot EURUSD is 100K EUR, and 1 lot of GBPUSD is 100K GBP. They become equal by the EURGBP rate , that is, for example now that I write these lines, ~0.7928. So 100K EUR values about 0.7928K GBP, which reflects in the lotsize calculus.

 

Regards,

Bogdan

Link spre comentariu
Vizitator Ulterior

Postat

Hi, Bogdan,

 

great work, appreciate the code.

 

I came independently with the same idea and looking forward for arbitrage on currency rings.

 

One question though related to hedge - why currency pair rings lot amounts are different? If the rings should be in equilibrium - doesn't lot sizes need to be equal? Or are you betting that certain currency pair will repay itself with swap over time so you are making larger or smaller amounts so the hedge will eventually hold the difference?

 

Rgrds

 

Hi,

 

Well it's simple, and I explained that in the Intercross article, the volumes should be equivalent, not the lotsizes to be equal. For example, 1 lot EURUSD is 100K EUR, and 1 lot of GBPUSD is 100K GBP. They become equal by the EURGBP rate , that is, for example now that I write these lines, ~0.7928. So 100K EUR values about 0.7928K GBP, which reflects in the lotsize calculus.

 

Regards,

Bogdan

 

Thank you, with your answer I made a step forward.

 

Keep up the good work,

(Also the economist/programmer ;) )

Link spre comentariu
Vizitator David

Postat

Hi Bogdan,

 

Keen to try your code but when I compile BcLib.mq4 it gives a warning "Start function not found and cannot be run" (and then proceeds to remove all of the functions from the output) and then when compiling BcArb.mq4 I get one error "'BcLib.mq4' - cannot open the program file'.

 

Any suggestions?

 

Thanks,

David

Link spre comentariu
Hi Bogdan,

 

Keen to try your code but when I compile BcLib.mq4 it gives a warning "Start function not found and cannot be run" (and then proceeds to remove all of the functions from the output) and then when compiling BcArb.mq4 I get one error "'BcLib.mq4' - cannot open the program file'.

 

Any suggestions?

 

Thanks,

David

 

Hi David,

 

Sorry for the delay caused by technical problems, first you have to make sure both BcLib and BcArb are in the experts\include folder. Otherwise, BcLib may be compiled, but BcArb won't find it. The message "Start function..." and the procedure removal is natural, whatever if you compile an include or an ea or script, functions are removed selectively, only the ones not called at all by what you compile.

 

Regards,

Bogdan

Link spre comentariu
Vizitator David

Postat

Hi Bogdan,

 

Keen to try your code but when I compile BcLib.mq4 it gives a warning "Start function not found and cannot be run" (and then proceeds to remove all of the functions from the output) and then when compiling BcArb.mq4 I get one error "'BcLib.mq4' - cannot open the program file'.

 

Any suggestions?

 

Thanks,

David

 

Hi David,

 

Sorry for the delay caused by technical problems, first you have to make sure both BcLib and BcArb are in the experts\include folder. Otherwise, BcLib may be compiled, but BcArb won't find it. The message "Start function..." and the procedure removal is natural, whatever if you compile an include or an ea or script, functions are removed selectively, only the ones not called at all by what you compile.

 

Regards,

Bogdan

 

Thanks Bogdan.

 

Still won't work for me. I'm obviously doing something stupid. I'll try again when I return from leave in a couple of weeks.

 

Many thanks,

David

Link spre comentariu

Hi,

 

I've run the SwapFinder_script on both demo and real account and it found a ring on the real but nothing on the demo! I've checked swap rates and the swap type (in points) on both accounts and they seem to be the same. Is there any reason why it shows different results for both accounts at the same broker?

 

Regards,

 

Michal

Link spre comentariu
Hi,

 

I've run the SwapFinder_script on both demo and real account and it found a ring on the real but nothing on the demo! I've checked swap rates and the swap type (in points) on both accounts and they seem to be the same. Is there any reason why it shows different results for both accounts at the same broker?

 

Regards,

 

Michal

 

Hi Michal,

 

Well the script can't give different results but in two cases:

a) the swaps are a volatile type ;

b) swaps on demo are different from the ones on real.

Check with MarketInfo both accounts for MODE_SWAPLONG, MODE_SWAPSHORT and MODE_SWAPTYPE.

 

Regards,

Bogdan

 

P.S. Are you Michal Kreslik ?

Link spre comentariu

Vizitator
Adaugă un comentariu...

×   Alipit ca text avansat.   Alipește ca text simplu

  Doar 75 emoji sunt permise.

×   Linkul tău a fost încorporat automat.   Afișează ca link în schimb

×   Conținutul tău precedent a fost resetat.   Curăță editor

×   Nu poți lipi imagini direct. Încarcă sau inserează imagini din URL.

×
×
  • Creează nouă...

Informații Importante

Am plasat cookie-uri pe dispozitivul tău pentru a îmbunătății navigarea pe acest site. Poți modifica setările cookie, altfel considerăm că ești de acord să continui.