Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8225901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T15:34:23+00:00 2026-06-07T15:34:23+00:00

quick question on tick data. I have tons of data under this format which

  • 0

quick question on tick data. I have tons of data under this format which I believe is perfect for what I’m trying to achieve. I want to keep some granularity in order to be able to trigger buy/sell signal under a second.

data

       SYMBOL  TIMESTAMP            STAMP   PRICE  SIZE EXCHANGE   BID BIDEX BIDSIZE   ASK ASKEX ASKSIZE
1        SPXU 1330938005 1330938005000000      NA    NA       9.99   PSE       5 10.10   PSE       6
2        SPXU 1330938221 1330938221000000      NA    NA       9.99   PSE       5 10.19   PSE       1
3        SPXU 1330938221 1330938221000001 10.1000   600      PSE    NA        NA    NA        NA
4        SPXU 1330938392 1330938392000000      NA    NA      10.00   PSE     174 10.19   PSE       1
5        SPXU 1330938431 1330938431000000      NA    NA      10.00   PSE     175 10.19   PSE       1
6        SPXU 1330938468 1330938468000000      NA    NA      10.00   PSE       1 10.19   PSE       1
7        SPXU 1330938736 1330938736000000      NA    NA      10.04   PSE      46 10.19   PSE       1
8        SPXU 1330938843 1330938843000000      NA    NA      10.04   PSE      47 10.19   PSE       1
9        SPXU 1330939576 1330939576000000      NA    NA      10.04   PSE       1 10.19   PSE       1
10       SPXU 1330939615 1330939615000000      NA    NA      10.05   PSE     100 10.19   PSE       1
11       SPXU 1330939615 1330939615000001      NA    NA      10.05   PSE     100 10.19   PSE     101
12       SPXU 1330939621 1330939621000000      NA    NA      10.04   PSE       1 10.19   PSE     101
13       SPXU 1330939621 1330939621000001      NA    NA      10.04   PSE       1 10.19   PSE       1
14       SPXU 1330939623 1330939623000000      NA    NA      10.05   PSE      46 10.19   PSE       1
15       SPXU 1330939623 1330939623000001      NA    NA      10.05   PSE      46 10.18   PSE      46
16       SPXU 1330939638 1330939638000000      NA    NA      10.04   PSE       1 10.18   PSE      46
17       SPXU 1330939686 1330939686000000      NA    NA      10.04   PSE       1 10.19   PSE       1
18       SPXU 1330939825 1330939825000000      NA    NA      10.05   PSE     100 10.19   PSE       1
19       SPXU 1330939825 1330939825000001      NA    NA      10.05   PSE     100 10.19   PSE     101
20       SPXU 1330939833 1330939833000000      NA    NA      10.04   PSE       1 10.19   PSE     101
21       SPXU 1330939833 1330939833000001      NA    NA      10.04   PSE       1 10.19   PSE       1
22       SPXU 1330939833 1330939833000002      NA    NA      10.04   PSE     101 10.19   PSE       1
23       SPXU 1330939833 1330939833000003      NA    NA      10.04   PSE     101 10.19   PSE     101
24       SPXU 1330939941 1330939941000000      NA    NA      10.04   PSE     101 10.19   PSE     102
25       SPXU 1330940041 1330940041000000      NA    NA      10.04   PSE       1 10.19   PSE     102

I want to be able to have zoo objects created keeping the millisecond granularity. I’m unable to transform the “data$STAMP” into a date. How can I do this?

working:

> as.POSIXlt(data2$TIMESTAMP[3], origin="1970-01-01", tz="EST")
[1] "2012-03-05 04:01:36 EST"

not working:

> as.POSIXlt(data2$STAMP[3], origin="1970-01-01", tz="EST")
[1] "))0'-06-03 15:45:52 EST"
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T15:34:26+00:00Added an answer on June 7, 2026 at 3:34 pm

    That’s essentially a FAQ — you need options("digits.secs"=6) to default to displaying sub-second time information.

    Witness:

    R> Sys.time()                    # using defaults: no milli or micros
    [1] "2012-07-15 12:51:17 CDT"
    R> options("digits.secs"=6)      # changing defaults: presto!
    R> Sys.time()
    [1] "2012-07-15 12:51:30.218308 CDT"
    R> 
    

    Now combine this with suitable numeric vector, suitably converted to R’s datetime types:

    R> vec <- 1330938005000000 + cumsum(runif(1:5)*10)
    R> vec
    [1] 1.331e+15 1.331e+15 1.331e+15 1.331e+15 1.331e+15
    R> as.POSIXct(vec/1e6, origin="1970-01-01")
    [1] "2012-03-05 09:00:05.000004 CST"
    [2] "2012-03-05 09:00:05.000006 CST"
    [3] "2012-03-05 09:00:05.000016 CST"
    [4] "2012-03-05 09:00:05.000021 CST"
    [5] "2012-03-05 09:00:05.000029 CST"
    R> 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Quick question... I have a query that checks for duplicates that looks like this:
Quick question. I have an app that use a native DLL through PInvoke, this
Quick question, What have I done wrong here. The purpose of this code is
Quick Question Lets say I have $colname = 'offer_id'; and then I want to
Quick Question: I have the following array (multidimensional): Array ( [preorder] => 0 [data]
Quick question which I thought would be easily answered. I have a .net website,
Quick question, I have the following string which is a coma separated list of
Quick question, I'm trying to pass a value to a variable and then run
Quick question, how can I make this valid : if($this->datos->bathrooms == 1½){$select1 = JText::_(
Quick question about Wordpress PHP: I am writing a theme and I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.