Skip to content

Dealing with duplicate dates #6

@femtotrader

Description

@femtotrader

I assume you download sample data here
https://drive.google.com/file/d/0B8iUtWjZOTqla3ZZTC1FS0pkZXc/view?usp=sharing

Unzip AUDUSD-2014-01.zip (a 11M zip file) and have now AUDUSD-2014-01.csv which is a 85M file

Processing such a file can be quite long, so you can process a shorter file.

    julia> using DataFrames
    
    julia> df = readtable("AUDUSD-2014-01.csv", header = false, names=[:Symb, :Date, :Bid, :Ask])
    julia> df[:Date] = DateTime(df[:Date], "yyyymmdd HH:MM:SS.s");  # convert string to DateTime
    julia> using TimeSeriesReader
    julia> ta = TimeArray(df[1:1000,:], colnames=[:Bid, :Ask])
    ERROR: there are duplicate dates

We might add a tiny fraction of time (microsecond, nanosecond?) to have unique values for DateTime.

With Python pydata/pandas-datareader#152
http://stackoverflow.com/questions/34575126/create-a-dataframe-with-datetimeindex-with-unique-values-by-adding-a-timedelta/34576154#34576154

Question: With Julia, how to support microsecond or nanosecond DateTime ? (see UTInstant ...)
http://julia-programming-language.2336112.n4.nabble.com/Timestamp-with-microseconds-and-nanoseconds-resolution-td7357.html
https://groups.google.com/forum/#!topic/julia-users/O5g23SrLeg4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions