SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Mon Dec 09, 2019 4:03 am

All times are UTC + 3 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Tue Aug 07, 2018 4:17 pm 
Offline

Joined: Wed Aug 08, 2007 6:32 pm
Posts: 232
Hi, I have data that is nanosecond timestamped, is it possible to import this?

I keep getting errors so assuming no.


Top
 Profile  
 
PostPosted: Tue Aug 07, 2018 5:38 pm 
Offline

Joined: Wed May 05, 2010 9:49 pm
Posts: 562
Hello, try following pattern:

Input string:
123.22,2018.08.07 17:29:23.111222
Mask for datetime:
yyyy.MM.dd HH:mm:ss.ffffff

Attachment:
trade with ns.png
trade with ns.png [ 13.46 KiB | Viewed 1723 times ]


Check using strategy:

protected override void OnTrade(SmartQuant.Instrument instrument, SmartQuant.Trade trade)
{
Console.WriteLine(trade.DateTime.ToString("yyyy.MM.dd HH:mm:ss.ffffff"));
}

result:
2018.08.07 17:29:23.111222


Top
 Profile  
 
PostPosted: Tue Aug 07, 2018 7:04 pm 
Offline

Joined: Wed Aug 08, 2007 6:32 pm
Posts: 232
That's microsecond the best i can get to work is 100th of nanosecond.


Top
 Profile  
 
PostPosted: Wed Aug 08, 2018 2:28 pm 
Offline

Joined: Wed May 05, 2010 9:49 pm
Posts: 562
You are right, 7 digits is limit of parsing.
In this case, the best way is to programmatically import with the analysis of the length of the digits after the point.
Selecting a substring with nanosecond part and adding it to datetime.


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

All times are UTC + 3 hours


Who is online

Users browsing this forum: Google [Bot] and 3 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