SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Sat Sep 26, 2020 7:00 pm

All times are UTC + 3 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: OQ Stops Receiving Data
PostPosted: Fri Oct 29, 2010 8:54 pm 
Offline

Joined: Thu Aug 05, 2010 8:03 am
Posts: 11
Hi,

I've been running OpenQuant for few months now, and recently I've noticed a big problem. For no discernible reason, OQ will stop receiving bar data for certain stocks throughout the day. For example, today I started running a strategy at the beginning of the day. At about 1:44 PM, the chart for AMZN stopped moving and the strategy itself stopped receiving data. I can't find any way to start it back up again short of stopping the strategy and restarting it, which really isn't an option since I won't always be around to watch it. Thankfully I was only paper trading, but if I was live, this could have been a real problem.

Is there anything I can do to fix this? If you need more information, I'd be glad to provide it. Thanks.


Top
 Profile  
 
PostPosted: Fri Oct 29, 2010 10:53 pm 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6817
Well, indeed we would need additional info. Instrument, Broker, Data Provider to start with.

Regards,
Anton


Top
 Profile  
 
PostPosted: Fri Oct 29, 2010 11:19 pm 
Offline

Joined: Thu Aug 05, 2010 8:03 am
Posts: 11
Sure.

Instruments: AMZN and QQQQ both froze. For both: Currency = USD, Exchange = SMART, Type = Stock. Everything else left at default. During the same time period, AAPL did not freeze.
Broker: Interactive Brokers.
Data Provider: Not sure what this refers to. OQ connects to IB's TWS system to pull data, if that's what you mean.

Thanks for any help.


Top
 Profile  
 
PostPosted: Fri Oct 29, 2010 11:39 pm 
Offline
Site Admin

Joined: Thu Jul 17, 2003 10:39 am
Posts: 1478
Hi,

could you look into the OQ's log file (<app_data>\SmartQuant Ltd\OpenQuant\log\logs.txt file)
does it contain any errors?

Regards,
Alex

_________________
SmartQuant Development Team


Top
 Profile  
 
PostPosted: Fri Oct 29, 2010 11:54 pm 
Offline

Joined: Thu Aug 05, 2010 8:03 am
Posts: 11
The only errors I can find around the time the strategy stopped working are:

Message: Can't find order with id =38081 and
Message: Cancel attempted when order is not in a cancellable state. Order permId =1825232682.

Could these cause the strategy to stop working?


Top
 Profile  
 
PostPosted: Sat Nov 06, 2010 5:16 pm 
Offline

Joined: Thu Jun 08, 2006 3:56 pm
Posts: 537
Location: BC Canada
This probably won't make anyone feel good, but my experience with the stopping problem is that it was my code. In the early days when I was learning, my code would sometimes make a move that would cause the stopping problem. It was usually associated with some kind of order handling -- cancellations, errors from IB, or something like that, often asynchronous stuff.

Eventually I stopped trying to do fancy things with orders (or stated another way, I finally learned how to do my desired moves properly, cleaning up my code state, etc), and the stopping problems went away. I haven't seen one in a couple of years now, I think.

So for my two bits, you'll probably have to try different things in your code to handle errors and orders such as the error messages you posted here. I have the feeling that by the time you get the error message, it's too late to fix anything--the stop has already happened. So I think you should concentrate on never making the bad move (here apparently trying to cancel an order that is not in a cancellable state). And finally, there are lots of postings on the stopping problem, and most of them seem to be concerned with order cancellations. So if there's any way your strategy can work with fewer cancellations, that might be a good thing to try...

Good luck


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

All times are UTC + 3 hours


Who is online

Users browsing this forum: No registered users and 2 guests


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