Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need help for creating holiday calendar for India #26

Open
half-nirvana opened this issue Oct 11, 2018 · 6 comments
Open

Need help for creating holiday calendar for India #26

half-nirvana opened this issue Oct 11, 2018 · 6 comments
Labels
enhancement New feature or request

Comments

@half-nirvana
Copy link

half-nirvana commented Oct 11, 2018

Here's the list of holidays for NSE. Problem is, there are some holidays which follow Gregorian calendar (eg. Republic day, Independence day, Mahatama Gandhi Jayanti etc), some holidays which follow Hindu Calendars (eg. Diwali, Holi) and few holidays follow Islamic calendar (Ramzan, Eid)

How to deal with this. One option I could think is work backwards from data. Take the data of a stock which has traded longest and then figure out holidays based on it.

I am looking at hk branch but have not been able to figure out any solution yet.

Any help on this will be appreciated.

Thanks

@llllllllll
Copy link
Contributor

llllllllll commented Oct 11, 2018

Hey, I am the person who worked on the Hong Kong calendar. I plan on implementing the NSE calendar as well as the Singapore SGX calendar either this week or next week. I will likely use something similar to the code on the hk branch's etc/lunisolar to compute the holidays based on actual lunisolar rules.

@swapniljariwala
Copy link

Great!! Thanks!!

@half-nirvana
Copy link
Author

Hey Thanks! How can I help!

@half-nirvana
Copy link
Author

Hi @llllllllll, I checked out hk branch. I ran all the tests successfully (except few memory 'out of memory errors', probably because I'm running it in a VM with limited memory)

I'm trying to run python etc/lunisolar new-moon but I'm getting an error FileNotFoundError: [Errno 2] No such file or directory: 'solar-ecliptic-longitude'

@llllllllll
Copy link
Contributor

The lunisolar tool works by calculating the ecliptic longitude of the sun and moon to derive the new moons and solar terms. That process currently takes like 40 minutes to an hour so there are two entry points:

  1. solar-ecliptic-longitude
  2. lunar-ecliptic-longitude

that compute these values and save them to disk.
The other commands then read the data in these directories to do further processing. This currently computes the new moons and solar terms at minute resolution (UTC) so you can convert them to the appropriate time zone to determine which date they fall on. For example, the Chinese lunisolar calendar says that the day. midnight to midnight UTC+8, that contains the new moon is the start of the month. I am not sure what rules the Indian calendar uses but it should be possible to encode them given this data.

@suryafx
Copy link

suryafx commented Aug 2, 2019

I added NSE calendar for India. (XNSE)
Holidays are back dated from 2010 to 2019.
#60

@jmccorriston jmccorriston added the enhancement New feature or request label Jan 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants