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

Requirements for Trade Calendar #254

Open
leeny324 opened this issue Nov 12, 2015 · 3 comments
Open

Requirements for Trade Calendar #254

leeny324 opened this issue Nov 12, 2015 · 3 comments

Comments

@leeny324
Copy link
Collaborator

Need to look into how to generate positive and negative test cases for dates and timestamps since it depends on which days are valid trade days.

@mibrahim
Copy link
Member

We need a tag for data, which takes in account a calendar while generating possible values. The calendar can potentially just reference days of work, holidays and may also reference time for partial days. Indeed is good for us for partial trade days, but there can be other scenarios out there for partial days of work.

Potential options to think of:

  • Positive and negative generators as with the other tags
  • min / max here can have a different interpretation, since we can end up with different disjoint ranges of time. A calendar that covers Mon 11/16/15 to Fri 11/27/15 is really two valid ranges from 11/16 to 11/20 and 11/23 to 11/27. It also consists of three disjoint negative ranges.

@leeny324
Copy link
Collaborator Author

@jeanmusinski looking into this

@ghost
Copy link

ghost commented Nov 17, 2015

At its simplest, the trade calendar can be implemented using the java Calendar class which returns day of week. Using Calendar, we can implement 3 equivalence classes:

  1. all days
  2. weekdays
  3. weekends

Additionally, using Calendar would enable specifying date ranges, which could be combined with weekdays and weekends.

A simple extension would be to introduce a date list which lists dates as YYY-mm-dd. This list can be used to specify omissions or inclusions.

A full blown implemetation should allow the specification of a trade calendar that is formated to DG specifications. The format may be something like:
(date (YYY-mm-dd), weekday(boolean), holiday(boolean),openTime(hh:mm:ss), closeTime(hh:mm:ss))

@mibrahim mibrahim assigned ghost Nov 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants