SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Mon Apr 06, 2020 12:10 am

All times are UTC + 3 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu Oct 29, 2009 11:40 pm 
Offline

Joined: Tue Oct 20, 2009 9:06 am
Posts: 19
I did backtesting for Four down days and long stratery with yhoo daily data. when I check transaction history seems like Buy(Qty, "Entry")/Sell(Qty, "Exit") places market orders with the close price instead of "issue a market order to open a long position tomorrow morning, on day 5" or "and the trade will be executed by the market on open day 7."

this means backtesting result will be totally different with live trading?

thanks


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 30, 2009 2:58 pm 
Offline

Joined: Sat Jun 07, 2008 1:41 pm
Posts: 47
Location: Munich, Germany
I'm always working on my stuff and can not say anything about other systems. I only know they are examples and not necessarily must work out of box.


You need to learn how to code that it is the same in backtesting and livetrading. Therefore what I do is

- I initialize what is needed in OnStrategyStart (which is for live-trading after starting the trading-session).

- I add a section with identical content as OnStrategyStart in OnBar which will be calculated every new day for backtesting.

Code:

   Bar prevBar;


      if (prevBar != null)
      {
         if (prevBar.DateTime.Date != bar.DateTime.Date)
         {
            // same content as OnStrategyStart - I take for Backtesting
         }
      }
      prevBar = bar;



Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 05, 2009 9:14 am 
Offline

Joined: Tue Oct 20, 2009 9:06 am
Posts: 19
thanks for your hint


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 3 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group