getbhavcopy icon indicating copy to clipboard operation
getbhavcopy copied to clipboard

Naming of futures items based on current/near/next month.

Open codebraker opened this issue 6 years ago • 5 comments

Hello,

I recently tried to download the futures data using getbhavcopy 2.1.11. I noticed that the names of scrips (or indexes) of current/near/next month which are suffixed as

  • -I
  • -II
  • -III

are skewed for different scrips even within the same file. For e.g. This is the month of January 2019 and if the created file begins with Nifty and the downloaded file contains

  • Nifty-I; corresponding to expiry 20190131
  • Nifty-II; corresponding to expiry 20190228
  • Nifty-III; corresponding to expiry 20190328.

Whereas for some random scrip --I; corresponding to expiry 20190228 --II; corresponding to expiry 20190328 --III; corresponding to expiry 20190131

Because of this issue, the imported data in Amibroker gets skewed and there are import issues. Can you look into this? Thanks.

codebraker avatar Jan 22 '19 15:01 codebraker

Seems to be related to #11

hemenkapadia avatar Jan 22 '19 15:01 hemenkapadia

Just my 2 cents to help you identify the issue.

I think the issue occurs if you are sorting the file (expiry wise) before adding suffix to the names. The file from NSE site may contain some irregularities due to which every 3 entries starting from the top may not be for the same scrip. Sorting may not be helpful as NSE bhavcopy file does not contain a numeric date like 20190131, but instead has 2019JAN31 which will break sorting.

codebraker avatar Jan 22 '19 15:01 codebraker

Thanks, yeah there was some sorting logic there, and an assumption of 3 being made...has been a log time since i touched that part of the code. Will look at it in next release

hemenkapadia avatar Jan 22 '19 17:01 hemenkapadia

Dear Hemank..pls also look above "Naming of futures' error issue in next release...

Happy Trading..

madhanji avatar Feb 03 '19 16:02 madhanji

Thanks, yeah there was some sorting logic there, and an assumption of 3 being made...has been a log time since i touched that part of the code. Will look at it in next release

Dear Hemank ji..please look the above issue..we are waiting long time...

madhanji avatar Mar 01 '19 04:03 madhanji