FPI - Fractional Product Inefficiency: The Impeccable Hedge

NeoTicker indicators

Moderator: moderators

User avatar
Mr. H
rank: <50 posts
rank: <50 posts
Posts: 5
Joined: Fri Jul 06, 2007 5:05 pm
Reputation: 0
Gender: None specified

(Product/Componenets) Ratio Indicator for Amibroker

Postby Mr. H » Tue Jul 17, 2007 8:43 pm

Hi Michal and All,

Here is GBPJPY/Components Ratio Indicator for Amibroker.
This Indicator for anyone likes the Oscillation around 1.0000
If (GBPJPY / its components) < 1.0000 then there is an opportunity
to buy GBPJPY and sell (GBPUSD * USDJPY) at the same time.
The reverse is true.

////////////////////////////////////////////////////////////////////////////////////

Spread = Foreign( "GBP/JPY", "ASK") / (Foreign( "GBP/USD", "BID") *
Foreign( "USD/JPY", "BID"));
Plot( spread, "spread", colorRed);

/////////////////////////////////////////////////////////////////////////////////////
Last edited by Mr. H on Fri Jul 20, 2007 4:38 pm, edited 2 times in total.
Keep It Simple,

Mr. H

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.

mojoyoyo
rank: <50 posts
rank: <50 posts
Posts: 3
Joined: Tue Jul 17, 2007 5:27 pm
Reputation: 0
Gender: None specified

FPI in practice

Postby mojoyoyo » Wed Jul 18, 2007 5:53 pm

In practice I wanted to mention that there is a fact about the FPI that I don't think has been mentioned. It is that when you trade between FPI extremes, your results will be either diminished or enhanced, depending on whether or not your net transaction went with the dominant currency pair.

For example, suppose you have a steady state FPI=1.0 situation with the USD-EUR-CHF ring:

EUR/USD 1.3800
USD/CHF 1.2000
EUR/CHF 1.6560
FPI=0.0 (in practice I find it easier to view this index by subtracting one then multiplying by 10000, then it ranges correctly between -10 and 10 most of the time)

Then, something comes unglued, EUR/USD drops 10, USD/CHF gains 20 and EUR/CHF is snoozing thru the affair. Leaving out the math so those following along at home can get some practice in, you will see that the FPI is now about +9. Since we will be going +FPI to -FPI, you take out short, short, long positions (respectively).

S - EUR/USD 1.3790
S - USD/CHF 1.2020
L - EUR/CHF 1.6560

A little while later you exit at

EUR/USD 1.3820
USD/CHF 1.1980
EUR/CHF 1.6560
FPI = -9

Disregarding FX fees, you show:

-20pips * $1(per EUR/USD pip) = -$20.00
+40pips * $0.83(per USD/CHF pip) = +$33.40

So, yer up about $13.40 before fees.

Now, consider *this* example:

EUR/USD 1.3800 in at 1.3820 out at 1.3780
USD/CHF 1.2000 in at 1.1990 out at 1.2010
EUR/CHF 1.6560 still sleeping

In this case the FPI was +6 and -6.
But look at the profit:

+40pips * $1(per EUR/USD pip) = +$40.00
-20pips * $0.83(per USD/CHF pip) = -$16.70

So now you are up $23.30 almost double,
but the FPI was only +6..-6, not +9..-9

If you are on tighter FPI margins, your trade might not even be profitable if you are trading against the dominant currency pair.

Anyway, just food for thought.
Regards,
-mojo

mojoyoyo
rank: <50 posts
rank: <50 posts
Posts: 3
Joined: Tue Jul 17, 2007 5:27 pm
Reputation: 0
Gender: None specified

The first step is to know the pip costs

Postby mojoyoyo » Thu Jul 19, 2007 7:45 am

The first step then is to know the pip costs per pair back to your native currency, in this case USD. Here are the costs I used:

USD 1.000
CHF 0.832
GBP 2.520
JPY 0.820
AUD 0.878
CAD 0.956
NZD 0.791

So you look at a pair, suppose EURAUD, and take the pip cost for the 2nd currency in the pair, in this case AUD, so the pip cost is 0.878.

mojoyoyo
rank: <50 posts
rank: <50 posts
Posts: 3
Joined: Tue Jul 17, 2007 5:27 pm
Reputation: 0
Gender: None specified

Next: does the ring have a dominant component?

Postby mojoyoyo » Thu Jul 19, 2007 7:52 am

The next step is to look at each ring, and determine if it has a dominant component(s). This is done by comparing the pip costs for each of the 3 pairs, then comparing the maximum pip cost to the minimum. The ratio is the relative weight of the pips for the ring.

Ring: USD-EUR-CHF balance: 1.20 dominant: EURUSD
Ring: USD-EUR-GBP balance: 2.52 dominant: EURGBP
Ring: USD-EUR-JPY balance: 1.22 dominant: EURUSD
Ring: USD-EUR-AUD balance: 1.14 dominant: EURUSD AUDUSD
Ring: USD-EUR-CAD balance: 1.05 dominant: EURUSD
Ring: USD-EUR-NZD balance: 1.26 dominant: EURUSD NZDUSD
Ring: USD-CHF-GBP balance: 1.20 dominant: GBPUSD
Ring: USD-CHF-JPY balance: 1.01 dominant: USDCHF
Ring: USD-CHF-AUD balance: 1.20 dominant: AUDUSD
Ring: USD-GBP-JPY balance: 1.22 dominant: GBPUSD
Ring: USD-GBP-AUD balance: 1.14 dominant: GBPUSD AUDUSD
Ring: USD-JPY-AUD balance: 1.22 dominant: AUDUSD
Ring: USD-JPY-CAD balance: 1.17 dominant: USDCAD
Ring: USD-JPY-NZD balance: 1.22 dominant: NZDUSD
Ring: USD-AUD-CAD balance: 1.05 dominant: AUDUSD
Ring: USD-AUD-NZD balance: 1.26 dominant: AUDUSD NZDUSD
Ring: EUR-CHF-GBP balance: 3.03 dominant: EURGBP
Ring: EUR-CHF-JPY balance: 1.01 dominant: EURCHF
Ring: EUR-CHF-AUD balance: 1.06 dominant: EURAUD
Ring: EUR-GBP-JPY balance: 3.07 dominant: EURGBP
Ring: EUR-GBP-AUD balance: 2.87 dominant: EURGBP
Ring: EUR-JPY-AUD balance: 1.07 dominant: EURAUD
Ring: EUR-JPY-CAD balance: 1.17 dominant: EURCAD
Ring: EUR-JPY-NZD balance: 1.04 dominant: EURJPY NZDJPY
Ring: EUR-AUD-CAD balance: 1.09 dominant: EURCAD AUDCAD
Ring: EUR-AUD-NZD balance: 1.11 dominant: EURAUD
Ring: CHF-GBP-JPY balance: 1.01 dominant: GBPCHF
Ring: CHF-GBP-AUD balance: 1.06 dominant: GBPAUD
Ring: CHF-JPY-AUD balance: 1.01 dominant: AUDCHF
Ring: GBP-JPY-AUD balance: 1.07 dominant: GBPAUD
Ring: JPY-AUD-CAD balance: 1.17 dominant: AUDCAD
Ring: JPY-AUD-NZD balance: 1.04 dominant: AUDJPY NZDJPY

A ring would be balanced if the ratio was near 1.0, and fairly well unbalanced the bigger it gets. Notice that on the ring EUR-GBP-JPY which is dominated by EURGBP you are effectively out of the risk-free business and into your success being determined whether you have chosen the correct direction of move for one of the pairs.

I suppose on platforms were you can take variable lot sizes, this can be effectively counteracted. On platforms with fixed lot sizes, you may be either a) taking your chances, or b) trading rings that are naturally balanced.

Regards,
-mojo

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

Re: (Product/Componenets) Ratio Indicator for Amibroker

Postby michal.kreslik » Thu Jul 19, 2007 9:14 am

Mr. H wrote:Hi Michal and All,

Here is GBPJPY/Components Ratio Indicator for Amibroker.
This Indicator for anyone likes the Oscillation around 1.0000
If (GBPJPY / its components) < 1.0000 then there is an opportunity
to buy GBPJPY and sell (GBPUSD * USDJPY) at the same time.
The reverse is true.

////////////////////////////////////////////////////////////////////////

Spread = Foreign( "GBPJPY", "C") / (Foreign( "GBPUSD", "C") *
Foreign( "USDJPY", "C"));
Plot( spread, "spread", colorRed);

////////////////////////////////////////////////////////////////////////


From your AmiBroker code, it seems like "C" translates to close, right? Which is not correct - you always ought to use appropriate Bids and Asks.

Michal

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.

User avatar
Mr. H
rank: <50 posts
rank: <50 posts
Posts: 5
Joined: Fri Jul 06, 2007 5:05 pm
Reputation: 0
Gender: None specified

Re: (Product/Componenets) Ratio Indicator for Amibroker

Postby Mr. H » Thu Jul 19, 2007 11:44 am

michal.kreslik wrote:
Mr. H wrote:Hi Michal and All,

Here is GBPJPY/Components Ratio Indicator for Amibroker.
This Indicator for anyone likes the Oscillation around 1.0000
If (GBPJPY / its components) < 1.0000 then there is an opportunity
to buy GBPJPY and sell (GBPUSD * USDJPY) at the same time.
The reverse is true.

////////////////////////////////////////////////////////////////////////

Spread = Foreign( "GBPJPY", "C") / (Foreign( "GBPUSD", "C") *
Foreign( "USDJPY", "C"));
Plot( spread, "spread", colorRed);

////////////////////////////////////////////////////////////////////////


From your AmiBroker code, it seems like "C" translates to close, right?
Which is not correct - you always ought to use appropriate Bids and Asks.

Michal


Yes, you are right Michal so I changed the code in my post to reflect that
I am coding to Buy GBPJPY and sell (GBPUSD * USDJPY).
Sorry for the typo.
Keep It Simple,



Mr. H

User avatar
daniil
rank: 50+ posts
rank: 50+ posts
Posts: 61
Joined: Mon May 07, 2007 6:40 am
Reputation: 0
Gender: Male

Postby daniil » Fri Jul 20, 2007 6:06 am

Hi Michal and everybody!

i want to try to code this strategy for MBTX API because i suppose it is the fastest way to execute orders. it seems you can place non-standard lot sizes with API (not 10'000, 100'000 but 33'333 for example) - so it is the right thing that we expect from Impeccable Hedge.

Some questions:


1. why i must use Open or Close prices? or not tick data? i mean my ring calculations may begin at OnQuoteData() event from any of 3 pairs.

2. for the ECN (or continuous double auction) - what is the market price for for example BUY order? is it the current Ask? or it is the last price the order was executed?

3. for ECN i suppose we must check the available lot size also or we are afraid our order will be partially filled. Am i right?while collecting tick data many times i saw that (Bid>Ask). some times this difference is 10 (ten!!!) pips. so we can even hedge by market orders with one pair if we are lucky. the only question - what is the lot size in this situation?

4. Stupid question :) Can we use limit orders instead of market? we can even take one more pip from each pair i suppose.

BRGDS, Dan

fiberangel
rank: <50 posts
rank: <50 posts
Posts: 17
Joined: Wed Apr 04, 2007 3:38 pm
Reputation: 0
Location: Chicago
Real name: Max
Gender: Male
Contact:

Postby fiberangel » Fri Jul 20, 2007 4:20 pm

daniil wrote:Hi Michal and everybody!

i want to try to code this strategy for MBTX API because i suppose it is the fastest way to execute orders. it seems you can place non-standard lot sizes with API (not 10'000, 100'000 but 33'333 for example) - so it is the right thing that we expect from Impeccable Hedge.

Some questions:


1. why i must use Open or Close prices? or not tick data? i mean my ring calculations may begin at OnQuoteData() event from any of 3 pairs.

2. for the ECN (or continuous double auction) - what is the market price for for example BUY order? is it the current Ask? or it is the last price the order was executed?

3. for ECN i suppose we must check the available lot size also or we are afraid our order will be partially filled. Am i right?while collecting tick data many times i saw that (Bid>Ask). some times this difference is 10 (ten!!!) pips. so we can even hedge by market orders with one pair if we are lucky. the only question - what is the lot size in this situation?

4. Stupid question :) Can we use limit orders instead of market? we can even take one more pip from each pair i suppose.

BRGDS, Dan


Dan,
1. I also use OnQuoteData() event to calculate the FPI for each firing of the event (this way you get up-to-the-moment FPI number).
2. I use last Ask
3. I don't check for the available lot size because unless you are doing HUGE volumes, it will not matter. I have had many partial fills and most of them are at the same price anyway.
4. This has been answered here before. Both have positives and negatives. In my personal experience, I get signals in fast markets, but those very same fast markets create a lot of slippage. So you are either risking getting filled AND slipped, or NOT filled at all with limit order. The choice is yours.

Also, as a side note. I think your connection latency is a HUGE factor in this strategy. MBT does offer hosting at their data center though so it should be considered if you are serious about it. I also am starting to think that MBT (as much as I like them) may not be a perfect broker for any high frequency trading. I hear that their FIX interface is MUCH faster, but it's a whole new beast to take on.

Good luck,

Max

P.S.
The answers to your questions are my own thoughts/observations and they could in theory be argued.

User avatar
daniil
rank: 50+ posts
rank: 50+ posts
Posts: 61
Joined: Mon May 07, 2007 6:40 am
Reputation: 0
Gender: Male

Postby daniil » Sat Jul 21, 2007 12:52 am

Hi Max!

as i understood you are familiar with MBTX API. would you tell me if "price vs speed" parameter is usefull while placing the orders for this strategy.

i suppose you already created the trading bot for this impeccable hedge. what's the perfomance of it?

P.S. i did not find any FIX at MBTX. only the article where they say that their API is FIX compliant. would you give me a link? :oops:

BRGDS, Dan

fiberangel
rank: <50 posts
rank: <50 posts
Posts: 17
Joined: Wed Apr 04, 2007 3:38 pm
Reputation: 0
Location: Chicago
Real name: Max
Gender: Male
Contact:

Postby fiberangel » Sat Jul 21, 2007 3:43 pm

daniil wrote:Hi Max!

as i understood you are familiar with MBTX API. would you tell me if "price vs speed" parameter is usefull while placing the orders for this strategy.

i suppose you already created the trading bot for this impeccable hedge. what's the perfomance of it?

P.S. i did not find any FIX at MBTX. only the article where they say that their API is FIX compliant. would you give me a link? :oops:

BRGDS, Dan


- I can't answer "price vs speed" question as I haven't tried that. You can experiment with it and let us know what you find.
- As I said in the previous post, I get signals in fast markets. This is something that you have to experiment with.
- http://www.mbtrading.com/MbtFIX.asp

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.


Return to “NeoTicker indicators”