Home Forums Tickstory Lite New features & suggestions Historic Rate Data from Gain Capital

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • imported_tickstory
    Participant
    Post count: 1479

    Thanks, Fiverr. We’re working on a delimited file importer that should handle this format. Any comments with regard to the reliability of the data?

    Fiverr
    Participant
    Post count: 15

    Because the FX market is not centralized; hence, it is advisable to test your algo with multiple data sources. If an algo is still profitable with multiple sources, then we can ensure robustness. This will also eliminate curve fitting in our trading system design.

    imported_tickstory
    Participant
    Post count: 1479

    Agreed. So as far as you’re aware the data is complete and accurate for testing strategies at a tick level?

    Naddmr
    Participant
    Post count: 3

    Hi folks,

    I use their data since 2012 to build up my own tick based data ware house.
    Their data is pretty accurate albeit they changed their format a few times so the import script had to deal with the changes accordingly.

    Here’s the part of my perl script with the different regexps to break up their formats to get started:


    if (/((^d*),([A-Z]*)/([A-Z]*),(d{4}-d{2}-d{2}sd{2}:d{2}:d{2}.000),(d*.d*,)(d*.d*,)D)/) {
    my $fract=(split(/,/))[0];
    if (length($fract) > 3 ) {
    $fract=substr($fract, length($fract)-3,3);
    }
    $fract=sprintf("%03d", $fract);
    $tc_symbol=(split(/,/))[1];
    $tc_time=(split(/,/))[2];
    $tc_time=(split(/./, $tc_time))[0] . "." . $fract;
    $tc_bid=(split(/,/))[3];
    $tc_ask=(split(/,/))[4];
    $struct_ok=1;
    }
    # Format 2:
    elsif (/(^(d*),"([A-Z]*)/([A-Z]*)",(d{4}-d{2}-d{2}sd{2}:d{2}:d{2}),("(d*).(d*)s*"),("(d*).(d*)s*"))/) {
    $tc_symbol=(split(/,/))[1];
    $tc_symbol=~s/"//g;
    my $fract=(split(/,/))[0];
    if (length($fract) > 3 ) {
    $fract=substr($fract, length($fract)-3,3);
    }
    $fract=sprintf("%03d", $fract);
    $tc_time=(split(/,/))[2] . "." . $fract;
    $tc_bid=(split(/,/))[3];
    $tc_bid=~s/"|s//g;
    $tc_ask=(split(/,/))[4];
    $tc_ask=~s/"|s//g;
    $struct_ok=1;
    }
    # Format 3:
    elsif (/(^(d*),"([A-Z]*)/([A-Z]*)",(d{4}-d{2}-d{2}sd{2}:d{2}:d{2}),(d*.d*),(d*.d*),"D")/) {
    my $fract=(split(/,/))[0];
    if (length($fract) > 3 ) {
    $fract=substr($fract, length($fract)-3,3);
    }
    $fract=sprintf("%03d", $fract);
    $tc_symbol=(split(/,/))[1];
    $tc_symbol=~s/"//g;
    $tc_time=(split(/,/))[2] . "." . $fract;
    $tc_bid=(split(/,/))[3];
    $tc_ask=(split(/,/))[4];
    $struct_ok=1;
    }
    # Format 4:
    elsif (/(^(d*),([A-Z]*)/([A-Z]*),(d{4}-d{2}-d{2}sd{2}:d{2}:d{2}),(d*.d*),(d*.d*),D)/) {
    my $fract=(split(/,/))[0];
    if (length($fract) > 3 ) {
    $fract=substr($fract, length($fract)-3,3);
    }
    $fract=sprintf("%03d", $fract);
    $tc_symbol=(split(/,/))[1];
    $tc_time=(split(/,/))[2] . "." . $fract;
    $tc_bid=(split(/,/))[3];
    $tc_ask=(split(/,/))[4];
    $struct_ok=1;
    }
    # Format 5:
    elsif (/(^(d*),D,([A-Z]*)/([A-Z]*),(d{4}-d{2}-d{2}sd{2}:d{2}:d{2}),(d*.d*),(d*.d*))/) {
    my $fract=(split(/,/))[0];
    if (length($fract) > 3 ) {
    $fract=substr($fract, length($fract)-3,3);
    }
    $fract=sprintf("%03d", $fract);
    $tc_symbol=(split(/,/))[2];
    $tc_time=(split(/,/))[3] . "." . $fract;
    $tc_bid=(split(/,/))[4];
    $tc_ask=(split(/,/))[5];
    $struct_ok=1;

    }
    # Format 6:
    elsif (/(^(d*),D,([A-Z]*)/([A-Z]*),(d{4}-d{2}-d{2}sd{2}:d{2}:d{2}.d{9}),(d*.d*),(d*.d*))/) {
    $tc_symbol=(split(/,/))[2];
    $tc_time=(split(/,/))[3];
    $tc_bid=(split(/,/))[4];
    $tc_ask=(split(/,/))[5];
    $struct_ok=1;
    }
    else {
    print("$name mismatch: n");
    }

    The most outstanding feature of their tick data is the time range covered. Some pairs have tick data as early as March 2003.

    imported_tickstory
    Participant
    Post count: 1479

    Many thanks for you contribution, Naddmr.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.