mirror of
https://github.com/wassname/catalyst.git
synced 2026-06-30 09:22:06 +08:00
Merge pull request #1388 from quantopian/future-pricing-cleanup
Cleanup some Futures related modules and values.
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
# Copyright 2015 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.
|
||||
|
||||
|
||||
class FutureDailyReader(object):
|
||||
"""
|
||||
Stubbed out. Currently unimplemented.
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
class FutureMinuteReader(object):
|
||||
|
||||
def __init__(self, rootdir, sid_path_func=None):
|
||||
self.rootdir = rootdir
|
||||
self.sid_path_func = sid_path_func
|
||||
@@ -34,6 +34,7 @@ from zipline.utils.cli import maybe_show_progress
|
||||
from zipline.utils.memoize import lazyval
|
||||
|
||||
US_EQUITIES_MINUTES_PER_DAY = 390
|
||||
FUTURES_MINUTES_PER_DAY = 1440
|
||||
|
||||
DEFAULT_EXPECTEDLEN = US_EQUITIES_MINUTES_PER_DAY * 252 * 15
|
||||
|
||||
|
||||
@@ -26,7 +26,8 @@ from ..data.us_equity_pricing import (
|
||||
from ..data.minute_bars import (
|
||||
BcolzMinuteBarReader,
|
||||
BcolzMinuteBarWriter,
|
||||
US_EQUITIES_MINUTES_PER_DAY
|
||||
US_EQUITIES_MINUTES_PER_DAY,
|
||||
FUTURES_MINUTES_PER_DAY,
|
||||
)
|
||||
|
||||
from ..finance.trading import TradingEnvironment
|
||||
@@ -1052,8 +1053,7 @@ class WithBcolzFutureMinuteBarReader(WithFutureMinuteBarData, WithTmpDir):
|
||||
p,
|
||||
trading_calendar.schedule.market_open.loc[days],
|
||||
trading_calendar.schedule.market_close.loc[days],
|
||||
# TODO: Make futures minutes per day.
|
||||
1440,
|
||||
FUTURES_MINUTES_PER_DAY,
|
||||
)
|
||||
writer.write(cls.make_future_minute_bar_data())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user