Skip to content

Allow users to change start_default/end_default in trading_calendars #147

Open
@leonarduschen

Description

@leonarduschen

Related to the issue: quantopian/zipline#2700

As @richafrank mentioned on the issue linked above is the module-level variable start_default in trading_calendars\trading_calendar.py being '1990-01-01'.

In my opinion '1990-01-01' seems somewhat arbitrary. As far as my understanding goes, the only reason it is '1990-01-01' and not earlier is to avoid caches to take up too much memory.

Disadvantages of this approach:

  • The open-issue linked above
  • PrecomputedTradingCalendar uses its own start/end dates and some of them start earlier than '1990-01-01'
  • The cached data frame does not take that much memory anyway? (but I might be utterly wrong here)

Possible solutions off the top of my head:

  • Change 'start_default' to something much earlier
  • Add exchange specific start_default and end_default, this is consistent with how PrecomputedTradingCalendar behaves
  • Add a way for end-user to change start_default and end_default (e.g. store start_default and end_default in a mutable container than give access to end-user).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions