Historical Data - Mismatch between 1m and 3m candles

ggjain
ggjain edited June 7 in .Net API client
Hi,
I am working with Historical Equity data using your API. Reading previous discussions, it seems you do create 3m candle from 3 (1m candle). Given That I was checking and data seem to mis-match. Can you please help be clarify on the reason or logic, or I am missing something. Example

For Date: 2021-04-013
Symbol: Reliance



As you can see..the volume are not matching. 9:15 and also sum of 9:16-9:18.
Even the Open, High, low and Close from 1m*3, are not correct in 3m candle.

This seem to be the case across different scrips and dates.
What I am missing here?

Also:
  1. Can you please guide me which is the closest correct candles (1m or 3m) to use for back testing.
  2. Is data good (close to real) for last 5 years ? or do you have any cut off date - from which data is better?
Ps: Adding data also for clear view

3m - historical candle data
time open high low close volume
13-04-2021 09:15 1924 1933.7 1924 1931.05 397741
13-04-2021 09:18 1931.05 1931.25 1928.35 1929.9 184566
13-04-2021 09:21 1929.8 1936 1929.65 1932.8 262780

1m - historical data
time open high low close volume
13-04-2021 09:15 1924 1933.7 1924 1932 247610
13-04-2021 09:16 1932.45 1932.45 1929.4 1931.3 90342
13-04-2021 09:17 1931.35 1932.45 1930.75 1931.05 59789
13-04-2021 09:18 1931.05 1931.25 1929.45 1930.1 57982
13-04-2021 09:19 1930.1 1930.9 1928.55 1930.1 64401

Thanks.
  • rakeshr
    As you can see..the volume are not matching. 9:15
    Volume for 3minute 9:15 candle looks fine to me. The volume for 9:15 3minute candle will be cumulative volume of 09:15 + 09:16 + 09:17 1minute candle. Here cumulatoive volume for 09:15 3minute candle: 247610 + 90342 + 59789 = 397741
    13-04-2021 09:15 1924 1933.7 1924 1931.05 397741

    13-04-2021 09:15 1924 1933.7 1924 1932 247610
    13-04-2021 09:16 1932.45 1932.45 1929.4 1931.3 90342
    13-04-2021 09:17 1931.35 1932.45 1930.75 1931.05 59789
    Can you please guide me which is the closest correct candles (1m or 3m) to use for back testing.
    You can use either as per your requirement. Just make sure, you are requesting the correct time period. This thread will help you understand more about this.
    Is data good (close to real) for last 5 years ? or do you have any cut off date - from which data is better?
    Yes, data is good for the last 5 years or more, depending on the instrument. This thread explains this as well.
  • ggjain
    Hi Rakesh,

    Thanks for quick reply.

    I think I got where I was wrong.

    Candle 9:15 - includes 9:15, 9:16, 9:17.
    Candle 9:18 - includes 9:18, 9:19, 9:20.
    and so on...
    i.e. 9:27 includes till 9:30.

    Another quick question: In some instruments - on some dates - record for 9:15 are missing. Not there in 1m and in 3m also. Any specific reason? How should I handle those.

    Thanks and appreciate.
  • rakeshr
    In some instruments - on some dates - record for 9:15 are missing. Not there in 1m and in 3m also.
    Can you let us know about those instruments and dates? We will check on those.
  • ggjain
    I am attaching a file with scrip and dates (I have looked at 80% of NIFTY 500).
    These records are where more than 5 records missing on 3m candles. I have not included many where 2-3 records missing, as those I can manage.

    The attachment will provide you a view.
    Not sure if you can fix/backfill all these, (as data in 1m is missing for these records too).

    But if you can, that will be great and helpful. Thanks.
  • rakeshr
    Thanks for highlighting this. We are checking on this.
Sign In or Register to comment.