mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-06 04:42:19 +08:00
6fb4923cc7
Instead of having separate ExchangeCalendar and TradingSchedule objects, we now just have TradingCalendar. The TradingCalendar keeps track of each session (defined as a contiguous set of minutes between an open and a close). It's also responsible for handling the grouping logic of any given minute to its containing session, or the next/previous session if it's not a market minute for the given calendar.
26 lines
868 B
Python
26 lines
868 B
Python
#
|
|
# Copyright 2016 Quantopian, Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
from .trading_calendar import TradingCalendar
|
|
from .calendar_utils import (
|
|
get_calendar,
|
|
register_calendar,
|
|
deregister_calendar,
|
|
clear_calendars
|
|
)
|
|
|
|
__all__ = ['get_calendar', 'TradingCalendar', 'register_calendar',
|
|
'deregister_calendar', 'clear_calendars']
|