SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Wed Oct 28, 2020 12:28 pm

All times are UTC + 3 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Mon Nov 15, 2010 4:55 pm 
Offline

Joined: Thu Apr 03, 2008 6:28 am
Posts: 49
I cannot get quotes from IB anymore using OpenQuant. Everything in IB TWS appears to be working fine (the quote data appears there). However, I get this exception in OpenQuant:
Quote:
System.ArgumentOutOfRangeException: Ticks must be between DateTime.MinValue.Ticks and DateTime.MaxValue.Ticks.
Parameter name: ticks
at System.DateTime..ctor(Int64 ticks)
at D0CWvjSdNeJpdpXUpU.Bt1H8ow7tmxDjQBXjB.ACbM8sqjW(Int64 , Boolean )
at D0CWvjSdNeJpdpXUpU.Bt1H8ow7tmxDjQBXjB.k3t91jvmW(FileSeries , ISeriesObject )
at SmartQuant.File.FileSeries.Add(ISeriesObject obj)
at SmartQuant.File.FileSeries.Add(DateTime datetime, Object obj)
at SmartQuant.Instruments.FileDataServer.Add(String series, IDataObject obj)
at SmartQuant.Instruments.DataManager.Add(String series, Quote quote)
at SmartQuant.Instruments.DataManager.Add(Instrument instrument, String suffix, Quote quote)
at SmartQuant.Instruments.DataManager.Add(Instrument instrument, Quote quote)
at SmartQuant.Instruments.Instrument.Add(Quote quote)
at OpenQuant.Data.Import.RealTime.RealtimeForm.OnNewQuote(Object sender, QuoteEventArgs args)
at SmartQuant.Providers.QuoteEventHandler.Invoke(Object sender, QuoteEventArgs args)
at SmartQuant.IB.IBTWS.JXo86EDq3(5XC8OG3T4CJRxq0a9su , Int32 )

I see that exception under Provider Errors if I use the Data Capture tool to get quotes. I do not get this exception for trades.

I also get the exception as a Strategy Error pop-up if I execute the following code in a strategy:
Code:
public override void OnQuote(Quote quote)
{
    if (Mode != StrategyMode.Simulation)
        DataManager.Add(Instrument, quote);
}

That code worked fine as recently as two weeks ago. I've tried rolling TWS back to the previous version, but that hasn't helped. I can't really run my strategies without quote data! :cry:


Top
 Profile  
 
PostPosted: Mon Nov 15, 2010 7:08 pm 
Offline
Site Admin

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

It seems that the historical database is corrupt - just delete .file, .header and .index files from Framework\data folder under <app_data>\SmartQuant Ltd\OpenQuant 2 directory

P.S. All historical data will be lost.

Regards,
Alex

_________________
SmartQuant Development Team


Top
 Profile  
 
PostPosted: Sat Nov 20, 2010 7:57 pm 
Offline

Joined: Thu Apr 03, 2008 6:28 am
Posts: 49
Thank you! It looks like that was the cause of my exception. It actually appears to be related to the quotes stored for a few specific instruments, which I was able to just delete (I exported all quotes to files and the corrupted ones caused exceptions instead of exporting).

Do you think I still need to wipe the whole entire database still? I can run without errors now, but am concerned about further corruption. I suppose this also highlights the need for me to not rely on OpenQuant's database for long-term storage of data.


Top
 Profile  
 
PostPosted: Sat Nov 20, 2010 8:14 pm 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6817
Hi,

it's just a good idea to backup your database from time to time. There is a Database Manager tool included into OpenQuant installation that can help you with this.

Regards,
Anton


Top
 Profile  
 
PostPosted: Thu Mar 31, 2011 4:04 pm 
Offline

Joined: Sat Jul 04, 2009 3:58 am
Posts: 10
I've got the same problem. After importing 10Gb of quotes.
What is cause of this error?


Top
 Profile  
 
PostPosted: Thu Mar 31, 2011 4:21 pm 
Offline
Site Admin

Joined: Thu Jul 17, 2003 10:39 am
Posts: 1478
The most common reason of this error is incorrect shutdown of OQ. Database engine does not flush internal buffers, does not close files correctly, etc and as result - broken db.

_________________
SmartQuant Development Team


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