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

[amibroker] Issues Regarding Futures Backtesting


  • Date: Fri, 15 Jan 2010 11:15:46 -0000
  • From: "sanjiv" <sumangalam@xxxxxxxx>
  • Subject: [amibroker] Issues Regarding Futures Backtesting

PureBytes Links

Trading Reference Links

Hello Friends,

We are trying to backtest some systems for Futures trading. However, due to the discontnious nature of the Futures contracts, we are facing some problems. Below, we discuss our current approach and the problems we are facing. We would really like to get further inputs/guidance in this regard.

=====
Futures BackTesting (Intraday System that may carry position to next/many days):

We will try to explain the concept with the help of a security that trades in Indian Futures Market : SESAGOA INDIA November contract expired on 26th November 2009 @ 375.70, on the same date December 2009 contract closed @ 363.80.

1. We always trade in the current month. First we create a Security of the nearest month contracts, for example we keep taking November Contract data until 26th November 2009, and starting 27th December 2009 we start appending December 2009 Contract data into the datafile.(December Open_interest went above November Open_interest on 26th Nov. Only)

2. Further, we create another datafile holding continuous data adjusted for the discount/Premium on the expiry date. For example; on 27th November we subtract 11.90 from all data upto 26th November (We have been doing this every month in the data files).

(We have been successful in creating data files going back many years back as mentioned above. similarly it should be possible to have a continuous contract data file based upon Ratios instead of Absolute differences; multiplying all historical data by 0.9683 in this case)

Next step is to backtest our concepts on this data with as much parity with real trading as possible. For this purpose we run a back test which takes signals from the continuous datafile as mentioned in (2) above while taking trade prices and position size from Near Month data file as mentioned in (1) above.

Further, we will need to account for Actual Discount/Premium incurred for rolling over the position on the expiry date. Currently, we are not doing this and are not very clear how this can be done. One possibility is to modify Entry/Exit Prices and Commission incurred for the trades that have involved a rollover during their life.

===========

Please guide:

a) If the continuous contract creation routines as described above are appropriate.

b) If it will be possible to modify Entry/Exit Prices and Commission incurred for the trades that have involved a rollover during their life by MID-LEVEL custom backtester. Or will it be possible by Low-Level (A code reference will make really help.) We would like all other statistics (e.g. Drawdown, MFE, MAE etc.) to also be adjusted accordingly.

C) Any other thing to be kept in mind while testing futures Securites.

We will look forward to the your views,

With Regards

Sanjiv Bansal



------------------------------------

**** 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/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    amibroker-digest@xxxxxxxxxxxxxxx 
    amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/