FINRAOS / DataGenerator

DataGenerator is a Java library for systematically producing large volumes of data. DataGenerator frames data production as a modeling problem, with a user providing a model of dependencies among variables and the library traversing the model to produce relevant data sets.
http://finraos.github.io/DataGenerator
Apache License 2.0
161 stars 171 forks source link

Requirements for Trade Calendar #254

Open leeny324 opened 8 years ago

leeny324 commented 8 years ago

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 commented 8 years ago

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:

leeny324 commented 8 years ago

@jeanmusinski looking into this

ghost commented 8 years ago

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))