[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Confusion again on Backtester Settings for certain currency pairs



PureBytes Links

Trading Reference Links



Hoping someone can point out my error here. I've emailed Amibroker Support, but did not get a response.

I am not able to set the backtester properly to backtest USD.JPY Forex. I am trying to simulate the way Interactive Brokers works, with percentage margin.I have consulted the manual, and have followed suggestions from Tomasz, from this earlier thread:
(
http://finance.groups.yahoo.com/group/amibroker/message/134212)

First,directly below are the settings that are CORRECT for EUR.USD. Thesesettings have been working well for me in many months of back testing,and mirror real-world results:

In Symbol--> Information settings:
Set currency of EUR.USD to "USD"

In Tools --> Preferences --> Currencies:
Set Base Curency to USD
Set Dynamic Rate symbol to EUR.USD, and uncheck Inverse box

And here are the backtester settings, with one line of sample output from the backtester report:

//---------------------------------------------
//              BACKTESTER SETTINGS
//---------------------------------------------

              
SetOption("FuturesMode", 1);                    
SetOption("InitialEquity", 100000);            
SetOption("MinShares", 100000);        // Treat as regular shares: Interactive Brokers(IB)                
SetTradeDelays(0, 0, 0, 0);
SetPositionSize(100000, spsShares );  // One share = 1 Euro for EUR.USD,
                                      
//AND we Buy in groups of 100,000 shares

MarginDeposit = -2.5;                  //-2.5 = 2.5% = 40:1 margin. IB goes bypercentage.                          
            
BuyPrice  = Open;
ShortPrice = Open;
SellPrice  = Close;                    
CoverPrice = Close;


Sample Output (this is CORRECT):


Ticker Trade Date Price Ex. date Ex. Price % chg Profit % Profit Shares Position value
EUR.USD Short 04/02/200615:35 1.2113 04/02/200615:50 1.2116 0.02% -36 -1.19% 100000 3028.25


But now I want to backtest USD.JPY using a similar InteractiveBrokers simulation as above. Below are my settings. These settings DO NOT work:

In Symbol--> Information settings:
Set currency of USD.JPY to "JPY"

In Tools --> Preferences --> Currencies:
Set Base Curency to USD
Set Dynamic Rate symbol to USD.JPY, and CHECK Inverse box

And here are the backtester settings, with one line of sample output from the backtester report:

//---------------------------------------------
//              BACKTESTER SETTINGS
//---------------------------------------------

              
SetOption("FuturesMode", 1);                    
SetOption("InitialEquity", 100000);            
SetOption("MinShares", 3000000);        //
Minis 3 million Jap Yen @ Interactive Brokers                
SetTradeDelays(0, 0, 0, 0);
SetPositionSize(3000000, spsShares );                                         

MarginDeposit = -2.5;                  //-2.5 = 2.5% = 40:1 margin. IB goes bypercentage.                          
            
BuyPrice  = Open;
ShortPrice = Open;
SellPrice  = Close;                    
CoverPrice = Close;


Sample Output (this is INCORRECT):

Ticker Trade Date Price Ex. date Ex. Price % chg Profit % Profit Shares Position value
USD.JPY Short 04/02/200616:15 117.74 04/02/200617:20 117.76 0.02% -588.64 -0.69% 3.00E+06 85749.66

ThePosition Value seems wrong. It should be around $637.00, at 2.5%margin,not $85,749.66. And no matter what combination of settings I try, it never turns out right.

What are the correct settings to set up a proper backtest for USD.JPY,that mimics the workings of Interactive Brokers?

Any help much appreciated.




__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___