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

RE: [amibroker] backtesting contracts



PureBytes Links

Trading Reference Links

Eric,

 

I assume you have continuous contract data already? If not you can use
the index for daily tests. Note: for ER2 contracts, the $RUT index is
quite close for the daily close, but it's way off on the open, based on
recent samples.

 

You "might" be able to do the following, but I am not sure. Give it a
try as it works in my futures testing code, but I have not tried to
change values over time. You would probably need to put the futures
values into an array or possibly into the custom backtester. Somehow I
don't think the backtester will pick-up on these values changing over
time.

 

/////////////////////////////////////////////////////////////////////
Futures values

 

if (StrLeft(Name(),2) == "ES") {PointValue = 50; TickSize = 0.25;
MarginDeposit = 3938;}

else if (Name()  == "SPX-CBOE-IND") {PointValue = 50; TickSize = 0.25;
MarginDeposit = 3938;}

else {PointValue = 1;   TickSize = 0.01; MarginDeposit = LastValue(C);}
//let's stocks go thru (more or less)

 

/* What I would change above is add/substitute "if" tests for a
DateNum() or Year() so:

if (Year() < 1960) set those values;

else if (Year() < 1970) set those values;

etc. */

 

--

Terry

 

-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On
Behalf Of Jerry Laster
Sent: Monday, October 23, 2006 14:49
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] backtesting contracts

 

Would testing SP-500 solve your problem? The patterns should match  

(although not the values). Not sure about the point value changing
though  

(I only trade e-minis).

 

 

On Mon, 23 Oct 2006 15:50:01 -0400, eric paradis  

<thechemistrybetweenus@xxxxxxxxx> wrote:

 

> Can anyone explain how to backtest the S&P500 back to

> 1950 using a continuous contract?

>

> It seems that the margin deposit and point values need

> to be changed as the contract moves back in time.

>

> What can I do to solve this?

>

> Thanks,

>

> Eric 


Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.13.27/517 - Release Date: 11/3/2006