## FPI - Fractional Product Inefficiency: The Impeccable Hedge

NeoTicker indicators

Moderator: moderators

apfx
rank: <50 posts
Posts: 8
Joined: Fri Oct 13, 2006 8:26 am
Reputation: 0
Gender:

### Triangular Arbitrage

What do I get when I tell my broker to Buy EUR/JPY out of my USD Account?

Suppose You are given the following quotes:

USD/JPY = 100

EUR/USD = 1.60

EUR/JPY = 140

Take the first two quotes. Then, the no-arbitrage EUR/JPY quote should be EUR/JPY = 160

EUR/JPY = 140, EUR is undervalued the against the JPY (with respect to the first two quotes).

Sketch of Triangular Arbitrage (Key: Buy undervalued EUR with the overvalued JPY):

(1) Borrow USD 1

(2) Sell the USD for JPY 100 ( at USD/JPY = 100)

(3) buy the Eur for JPY ( at EUR/JPY = 140). Get EUR 0.7143

(4) Sell the EUR for USD (at EUR/USD = 1.60 ). Get USD 1.1429

Profit: USD 0.1429 (14.29% per USD borrowed)

Does that correctly translates into:

Sell: 1 lot USD/JPY (sell 1 USD and get 100 JPY)
Buy: 0.7143 lot EUR/JPY (get 0.7143 EUR selling 100 JPY you bought)
Sell: 0.7143 lot EUR/USD (sell 0.7143 EUR you bought and get 1.429 USD)

or simply:

Buy: 0.7143 lot EUR/JPY (broker does the math and Banks do the rest)
Attachments
Heuristic Exercise on Triangular Arbitrage.pdf

silverpike
rank: <50 posts
Posts: 4
Joined: Fri Oct 13, 2006 5:19 pm
Reputation: 0
Location: Los Angeles, CA
Gender:

### Re: Triangular Arbitrage

apfx wrote:Buy: 0.7143 lot EUR/JPY (broker does the math and Banks do the rest)

The error is that in order to form a "perfect" hedge, it requires a non-"lot"-sized trade in at least one currency. For example:

Buy 1.2734 0.0001 1.2735 1.8905 0.0002 1.8903 0.6740 0.0001 0.6739
Sell 1.2725 0.0001 1.2724 1.8865 0.0002 1.8867 0.6741 0.0001 0.6742
Buy 100000 Sell 67357.84184 Sell 100000
(\$110.00) \$242.49 (\$56.59) \$75.89

Buy 1.2734 0.0001 1.2733 1.8905 0.0002 1.8907 0.6740 0.0001 0.6741
Sell 1.2725 0.0001 1.2726 1.8865 0.0002 1.8863 0.6741 0.0001 0.6740
\$70.00 (\$296.37) (\$18.86) (\$245.24)

This is kind of hard to read, but it is a cut/paste from my Excel calculations. In this case, it requires that you buy 67357.84 units of GBP/USD. I know of no broker, other than Oanda, that will allow this type of order execution (not even the ECNs like IB).

This is the essential point for Metatraders users. As I said above, I don't think any Metatrader broker allows fractional lots. This is an absolute requirement for trading this system. If only whole lots are traded, there is residual exposure on one or more currencies, which means there is potential to lose money on these trades.

Anyone asking about an MT4 EA is wasting time. You may be able to get a pretty indicator to look at, but you can only trade this idea with a broker supporting fractional lots. Also, it is interesting to note that the indicator posted earlier in this thread produces incorrect values. It is not the fault of the indicator, however. Either the broker data or the computation engine of MT4 is broken. When I look at the indicator over time, it changes it's historical values. This occurs with both Moneytec servers and Alpari. I wouldn't be surprised if it's a bug in the MT4 engine, because my experience is that it's horribly buggy.

michal.kreslik
rank: 1000+ posts
Posts: 1045
Joined: Sat May 13, 2006 2:40 am
Reputation: 28
Location: Monte Carlo, Monaco
Real name: Michal Kreslik
Gender:
Contact:
Marci wrote:Hello Michal,

i found this thread by a fluke and I'm really impressed!
Is there any way to test this strategy using Tradestation? I know that there is no historically ask / bid data available but can't i make use of current data?

Within this it should be possible to calculate loss or profit?

Hi, Marci,

certainly it can be written for Tradestation backtest, too. Tradestation only records Bid data, so you only need to add your broker's average spread for the particular pair to the Bid price and you get the average Ask price.

Actually, only the absolute difference between the open FPI and the close FPI matters. Values below 1 and above 1 I picked just to demonstrate the concept more readily. You can do well with open @ FPI = 0.9960 and close @ FPI = 0. 9997 as well.

Michal

michal.kreslik
rank: 1000+ posts
Posts: 1045
Joined: Sat May 13, 2006 2:40 am
Reputation: 28
Location: Monte Carlo, Monaco
Real name: Michal Kreslik
Gender:
Contact:

### Re: Triangular Arbitrage

silverpike wrote:The error is that in order to form a "perfect" hedge, it requires a non-"lot"-sized trade in at least one currency.

Precisely.

As I said above, one unit must be matched by one unit of currency.

If you don't match one by one, you are not hedging, thus you are still trading with a risk. The outcome of such a trade then depends on the non-hedged portion(s) of your position(s).

Technically, this can be done in two ways:
• by trading a large number of minilots (like 12773 minilots at once)
• by trading at a broker that supports fractional positions

Michal
Last edited by michal.kreslik on Thu Oct 19, 2006 7:23 am, edited 2 times in total.

rank: <50 posts
Posts: 34
Joined: Sat Aug 19, 2006 11:03 am
Reputation: 0
Location: Los Angeles
Real name: Bharat Bhardwaj
Gender:
Contact:
How would I go about writing a system in Neo that executes these trades all at the same time. I have been trying, and the only way I can think of is having 3 different systems running on each symbol?

There has to be a better way.. ?

davidf
rank: <50 posts
Posts: 24
Joined: Fri May 19, 2006 6:10 pm
Reputation: 0
Gender:
Contact:
To ryan:

maybe you could recompile indicator in meta editor = editng part of MT4. Standartly i run it on EUR/USD, but it do not matter.
DavidF

ryan
rank: <50 posts
Posts: 24
Joined: Wed Oct 18, 2006 9:57 am
Reputation: 0
Gender:
Contact:

### Re: Triangular Arbitrage

silverpike wrote: I know of no broker, other than Oanda, that will allow this type of order execution (not even the ECNs like IB).

Oanda also offers quite nice tight spreads which will also help 'insulate' us from any execution delays.
Last edited by ryan on Thu Oct 19, 2006 7:40 am, edited 1 time in total.

michal.kreslik
rank: 1000+ posts
Posts: 1045
Joined: Sat May 13, 2006 2:40 am
Reputation: 28
Location: Monte Carlo, Monaco
Real name: Michal Kreslik
Gender:
Contact:

### Re: Triangular Arbitrage

ryan wrote:Oanda also offers quite nice tight spreads will will also help 'insulate' us from any execution delays.

Well I guess nothing can entirely insulate us from execution delays until there's a "hedge order" available. But certainly Oanda seems to be the broker of choice for FPI.

Michal

davidf
rank: <50 posts
Posts: 24
Joined: Fri May 19, 2006 6:10 pm
Reputation: 0
Gender:
Contact:
Hi Michal,

great work! Congratulation. I have one guestion on part of your work, you wrote:
There’s money waiting to be made with FPI

The FPI might be used:
directly for trading the FPI extremes (explained above), or
to predict the behavior of one of the FX symbols in ring

a many forum reder speaks abou a first point FPI. Can you morewidely describe the secont part FPI > using it for prediction movemen one of three pairs?

Thanks

DavidF

michal.kreslik
rank: 1000+ posts
Posts: 1045
Joined: Sat May 13, 2006 2:40 am
Reputation: 28
Location: Monte Carlo, Monaco
Real name: Michal Kreslik
Gender:
Contact:
trader_hal wrote:How would I go about writing a system in Neo that executes these trades all at the same time. I have been trying, and the only way I can think of is having 3 different systems running on each symbol?

There has to be a better way.. ?

There is

Simply access the other symbols' datastreams on the chart. While it's not possible to send three orders literally at once, it's possible to send them one after another. For example:

Code: Select all

`        private void PlaceFPITrades()        {            TradeObj MyTrade = new TradeObj();            // FPI Ring selected:            // Buy EUR/USD            // Buy USD/CHF            // SellShort EUR/CHF            int PairsInRing = 3;            // FPI is an object array that holds information about the FPI position            // PairsInRing = pairs involved in the Impeccable Hedge ring            // 4 parameters for every pair:            //      0. int direction = Buy (1) or SellShort (-1)            //      1. int stream = FX symbol's datastream on chart            //      2. int size = Impeccable Hedge position size for the particular FX symbols            //      3. string comment = position annotation            object[,] FPI = new object[PairsInRing, 4];            FPI[0, 0] = 1; // Buy            FPI[0, 1] = 1; // first pair's stream # on chart            FPI[0, 2] = 0; // first pair's size            FPI[0, 3] = "FPI Buy EUR/USD"; // position annotation            FPI[1, 0] = 1; // Buy            FPI[1, 1] = 2; // second pair's stream # chart            FPI[1, 2] = 0; // second pair's size            FPI[1, 3] = "FPI Buy USD/CHF"; // position annotation            FPI[2, 0] = -1; // SellShort            FPI[2, 1] = 3; // third pair's stream # on chart            FPI[2, 2] = 0; // third pair's size            FPI[2, 3] = "FPI SellShort EUR/CHF"; // position annotation            CalculateSizes(PairsInRing, ref FPI);            for (int i = 0; i < PairsInRing; i++)            {                if ((int)FPI[i, 0] == 1) // Buy                {                    MyTrade.BuyAtMarketEx((int)FPI[i, 1], (int)FPI[i, 2], (string)FPI[i, 3]);                }                else // SellShort                {                    MyTrade.SellAtMarketEx((int)FPI[i, 1], (int)FPI[i, 2], (string)FPI[i, 3]);                }            }        }        private void CalculateSizes(int PairsInRing, ref object[,] FPIStreamSizeComment)        {            int CalculatedSize = 0;            for (int i = 0; i < PairsInRing; i++)            {                // proper Impeccable Hedge position sizes calculation goes here                FPIStreamSizeComment[i, 2] = CalculatedSize;            }        }`

The code is better readable as a screenshot from the VisualStudio (attached below).

Michal
Attachments
PlaceFPITradesCsharp.png (13.07 KiB) Viewed 2287 times