Merge pull request #1279 from quantopian/deprecate-trading-calendar

MAINT: Creates deprecation warning for tradingcalendar imports
This commit is contained in:
Andrew Daniels
2016-06-16 13:05:10 -04:00
committed by GitHub
+10
View File
@@ -14,14 +14,24 @@
# limitations under the License.
import pandas as pd
import pytz
import warnings
from datetime import datetime
from dateutil import rrule
from functools import partial
from zipline.zipline_warnings import ZiplineDeprecationWarning
# IMPORTANT: This module is deprecated and is only here for temporary backwards
# compatibility. Look at the `zipline.utils.calendars.trading_schedule`
# module, as well as the calendar definitions in `zipline.utils.calendars`.
warnings.warn(
"The `tradingcalendar` module is deprecated. See the "
"`zipline.utils.calendars.trading_schedule` module, as well as the "
"calendar definitions in `zipline.utils.calendars`.",
category=ZiplineDeprecationWarning,
stacklevel=1,
)
start = pd.Timestamp('1990-01-01', tz='UTC')
end_base = pd.Timestamp('today', tz='UTC')