Backtesting a forex portfolio
Backtesting a forex portfolio
Hi,
Suppose, we would like to test a system on a portfolio consisting of two forex markets: EUR/USD and USD/JPY. The problem is that the two markets are denominated in two different currencies. I wonder if you could convert USD/JPY into JPY/USD so that all the statistics were calculated and expressed in dollars? I wonder if it is a valid method to use and what the proper conversion should look like. Or maybe there is some other solution?
Any ideas will be appreciated. Thanks.
Suppose, we would like to test a system on a portfolio consisting of two forex markets: EUR/USD and USD/JPY. The problem is that the two markets are denominated in two different currencies. I wonder if you could convert USD/JPY into JPY/USD so that all the statistics were calculated and expressed in dollars? I wonder if it is a valid method to use and what the proper conversion should look like. Or maybe there is some other solution?
Any ideas will be appreciated. Thanks.
Last edited by TK on Thu Apr 08, 2010 10:45 am, edited 1 time in total.
Money management with different currencies
I'm working my way through a similar problem here. I had written some software a good while back to trade stocks and the money management worked like so (example is for long trades only):
So for example, if I were to enter at $100 and the system says place the initial stop at $95, $max_risk_per_trade / $risk_in_trade whould be .025 / .05, so $coefficient would be 0.5. If the value of my account were 1000, then $shares_to_buy would be (0.5 * 1000) / 100, or 5 shares.
Now I'm trying to get the same software to track forex, trading crossrates through oanda. In the case of pairs like EUR/USD, the system above works fine. However, I'm somewhat stuck on what to do with signals to buy other types of pairs, such as AUD/JPY where the price of the instrument is not denominated in dollars. Can any forex experts help me out here?
Jim
Code: Select all
$max_risk_per_trade = .025; #never lose more than 2.5% per trade
$risk_in_trade = $entry_price - $sell_stop; #percent decline to hit stop
$coefficient = $max_risk_per_trade / $risk_in_trade;
$shares_to_buy = ($coefficient * $equity) / $entry_price;
Now I'm trying to get the same software to track forex, trading crossrates through oanda. In the case of pairs like EUR/USD, the system above works fine. However, I'm somewhat stuck on what to do with signals to buy other types of pairs, such as AUD/JPY where the price of the instrument is not denominated in dollars. Can any forex experts help me out here?
Jim
Hi Jim,
(I am not an FX expert)
You can just use $equity converted (not literally, just on paper) to the terms currency of the currency pair that you are trading. In this case you take your USD $equity and find the JPY equivalent then use that in your position sizing formula. You would then have your equity expressed in the same base currency in which the commodity (AUD) is quoted, that being JPY.
Problem with this is that all other things being equal, except the exchange rate, you will never be able to have equal (volatility) risk on each AUDJPY trade as if USDJPY changes you will find yourself with perhaps heaps more JPY equivalent $equity than you had available for the last trade. You will risk 2.5% of this amount and the dollar amount at stake will be greater.... even though your actual USD equity base has not changed.
(I am not an FX expert)
You can just use $equity converted (not literally, just on paper) to the terms currency of the currency pair that you are trading. In this case you take your USD $equity and find the JPY equivalent then use that in your position sizing formula. You would then have your equity expressed in the same base currency in which the commodity (AUD) is quoted, that being JPY.
Problem with this is that all other things being equal, except the exchange rate, you will never be able to have equal (volatility) risk on each AUDJPY trade as if USDJPY changes you will find yourself with perhaps heaps more JPY equivalent $equity than you had available for the last trade. You will risk 2.5% of this amount and the dollar amount at stake will be greater.... even though your actual USD equity base has not changed.
Damian,
Thanks. The approach you describe is what I've elected to use, despite the problem you mention. It turned out that the routine in my software to determine my equity in the other currency was a mess and I was stumped on the math, which I was pretty sure was correct, when my coding was the problem. Again, thanks. It's always rewarding to learn from the posts in these forums.
Jim
Thanks. The approach you describe is what I've elected to use, despite the problem you mention. It turned out that the routine in my software to determine my equity in the other currency was a mess and I was stumped on the math, which I was pretty sure was correct, when my coding was the problem. Again, thanks. It's always rewarding to learn from the posts in these forums.
Jim
Conversion
If you have an FXCM.com account, then all currency pairs are in dollars. They have a spreadsheet for calculating pip prices. Email caitlin@fxcm.com for the spreadsheet.
backtesting forex portfolio
I can across this software, "real-time portfolio analzer" (http://www.traderssoft.com/sys/rtpa/)
It claims to calculate trading results in % term.
If so, it could perhaps assist in analysing forex portfolios, as results in % terms can be translated back to US$.
Has anybody tried this software, or could give an opinion on this?
Regrds
It claims to calculate trading results in % term.
If so, it could perhaps assist in analysing forex portfolios, as results in % terms can be translated back to US$.
Has anybody tried this software, or could give an opinion on this?
Regrds
-
- Roundtable Knight
- Posts: 1842
- Joined: Tue Apr 15, 2003 11:02 am
- Contact:
The latest VeriTrader 1.6 which has been released for about a month is shipping with forex trading specific features, it hasn't been announced on our main page yet, but has been announced here in the forums. It supports forex currency conversions to dollars on trade entry, for intra-trade position equity calculations, and on trade exit..
It also can account for the interet rate differential between the currency pairs.
- Forum Mgmnt
It also can account for the interet rate differential between the currency pairs.
- Forum Mgmnt
-
- Roundtable Knight
- Posts: 1842
- Joined: Tue Apr 15, 2003 11:02 am
- Contact:
Can you expand on your quote below. I did not follow.
Are you referring to the interest rates in the base currency ;
Interest rates are (% yield)
Aud Germ Japan UK USA (from Bloomberg 1 year note)
5.22 2.25 0.03 4.75 2.48
Go long AUD, Short Japan (Will that be AudJpy in Tradestation/FXCM)
Frank
San Diego
****************************************************
Are you referring to the interest rates in the base currency ;
Interest rates are (% yield)
Aud Germ Japan UK USA (from Bloomberg 1 year note)
5.22 2.25 0.03 4.75 2.48
Go long AUD, Short Japan (Will that be AudJpy in Tradestation/FXCM)
Frank
San Diego
****************************************************
Moodaeng wrote:Forum Mgmnt, Will veritrader 2.0 allow you to test the following system :
Consider a basket of, say, three currencies :
EUR, USD, JPY
Each month, go long the currency that has the highest interest rate and short the currency that has the lowest interest rate. Thanks.
Frank,
Yes, that's the idea. Except that I would consider 1 month libor rates (in Bloomberg, us0001m index, bp0001m index....) and would test the system with a monthly rebalancing of the portfolio. I have my own backtester in Vba that works well for testing futures; but it gets more complicated when I want to test what I call "basket rules" or "allocation rules".
Example : among 10 currencies, go long the 2 highest carry currencies, go short the 10 lowest. Among 500 stocks, go long the 10 lowest P/E, go short the 10 highest P/E. Rebalance monthly.
The logic is completely different from "classical" systems where you trade just one time series. That's why I was asking c.f..
So I have a choice to make now : either expand my backtester or just purchase Veritrader 2.0....by the way any idea when it will come out?
Thx...Moodaeng.
Yes, that's the idea. Except that I would consider 1 month libor rates (in Bloomberg, us0001m index, bp0001m index....) and would test the system with a monthly rebalancing of the portfolio. I have my own backtester in Vba that works well for testing futures; but it gets more complicated when I want to test what I call "basket rules" or "allocation rules".
Example : among 10 currencies, go long the 2 highest carry currencies, go short the 10 lowest. Among 500 stocks, go long the 10 lowest P/E, go short the 10 highest P/E. Rebalance monthly.
The logic is completely different from "classical" systems where you trade just one time series. That's why I was asking c.f..
So I have a choice to make now : either expand my backtester or just purchase Veritrader 2.0....by the way any idea when it will come out?
Thx...Moodaeng.
-
- Roundtable Knight
- Posts: 1842
- Joined: Tue Apr 15, 2003 11:02 am
- Contact:
Version 2.0 has been released to the Beta testing group for a couple of weeks now. It is not yet feature complete, and I expect it to be about a month before it will be.So I have a choice to make now : either expand my backtester or just purchase Veritrader 2.0....by the way any idea when it will come out?
I'm gearing up the marketing for a launch coincident with the Las Vegas Trader's Expo in late November. It seems very likely that we'll be able to get things wrapped up by then but not much before. As we get further into the Beta testing process, we will know more.
- Forum Mgmnt
Moodaeng
I checked around, TC2000, TradeStation, CSI, Fred St. Louis and did a search in google. Could NOT find 1 month libor. Other than Bloomberg (pricey for an individual) where can I find historical (5 years) for this data series. AND is Libor rates different for different countries (Aud, GB, Germany etc)
Thanks
Frank, San Diego
**********************************************************
I checked around, TC2000, TradeStation, CSI, Fred St. Louis and did a search in google. Could NOT find 1 month libor. Other than Bloomberg (pricey for an individual) where can I find historical (5 years) for this data series. AND is Libor rates different for different countries (Aud, GB, Germany etc)
Thanks
Frank, San Diego
**********************************************************
Moodaeng wrote:Frank,
Yes, that's the idea. Except that I would consider 1 month libor rates (in Bloomberg, us0001m index, bp0001m index....) and would test the Example : among 10 currencies, go long the 2 highest carry currencies, go short the 10 lowest. Among 500 stocks, go long the 10 lowest P/E, go short the 10 highest P/E. Rebalance monthly. Thx...Moodaeng.
-
- Contributing Member
- Posts: 9
- Joined: Thu Apr 01, 2004 9:45 am
- Location: London, UK
Try the source of the rates, the BBA:FrankWala wrote:where can I find historical (5 years) for this data series. AND is Libor rates different for different countries (Aud, GB, Germany etc)
http://www.bba.org.uk/bba/jsp/polopoly.jsp?d=141&a=627
I don’t understand this, but you might find the answer at the BBA site as well.FrankWala wrote:AND is Libor rates different for different countries (Aud, GB, Germany etc)
-
- Roundtable Knight
- Posts: 1842
- Joined: Tue Apr 15, 2003 11:02 am
- Contact:
Libor stands for London Interbank Offering Rate, and the aforementioned BBA is the British Bankers Association which sets/records the official Libor rates for each currency.
Libor is nothing more than the rates that the London banks agree to charge for lending money to each other in each of the major currencies. So if you represent a bank that needs some Euros, and I represent another bank in London, this is the rate I'll charge you.
- Forum Mgmnt
Libor is nothing more than the rates that the London banks agree to charge for lending money to each other in each of the major currencies. So if you represent a bank that needs some Euros, and I represent another bank in London, this is the rate I'll charge you.
- Forum Mgmnt
-
- Roundtable Fellow
- Posts: 83
- Joined: Thu Jul 31, 2003 11:46 am
- Location: USA
carry
Backtesting long dated currency rolls is easy. The issue is finding the right short-term plug.