mirror of
https://github.com/wassname/catalyst.git
synced 2026-06-29 02:45:18 +08:00
MAINT: make_rotating_asset -> make_rotating_equity.
This commit is contained in:
@@ -50,7 +50,7 @@ from zipline.pipeline.factors import (
|
||||
)
|
||||
from zipline.utils.memoize import lazyval
|
||||
from zipline.utils.test_utils import (
|
||||
make_rotating_asset_info,
|
||||
make_rotating_equity_info,
|
||||
make_simple_equity_info,
|
||||
product_upper_triangle,
|
||||
check_arrays,
|
||||
@@ -608,7 +608,7 @@ class SyntheticBcolzTestCase(TestCase):
|
||||
cls.trading_day = day = cls.env.trading_day
|
||||
cls.calendar = date_range('2015', '2015-08', tz='UTC', freq=day)
|
||||
|
||||
cls.asset_info = make_rotating_asset_info(
|
||||
cls.asset_info = make_rotating_equity_info(
|
||||
num_assets=6,
|
||||
first_start=cls.first_asset_start,
|
||||
frequency=day,
|
||||
|
||||
@@ -59,8 +59,8 @@ from zipline.errors import (
|
||||
from zipline.finance.trading import TradingEnvironment, noop_load
|
||||
from zipline.utils.test_utils import (
|
||||
all_subindices,
|
||||
make_rotating_asset_info,
|
||||
tmp_assets_db
|
||||
tmp_assets_db,
|
||||
make_rotating_equity_info,
|
||||
)
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ def build_lookup_generic_cases(asset_finder_type):
|
||||
},
|
||||
],
|
||||
index='sid')
|
||||
with tmp_assets_db(frame) as assets_db:
|
||||
with tmp_assets_db(equities=frame) as assets_db:
|
||||
finder = asset_finder_type(assets_db)
|
||||
dupe_0, dupe_1, unique = assets = [
|
||||
finder.retrieve_asset(i)
|
||||
@@ -774,7 +774,7 @@ class AssetFinderTestCase(TestCase):
|
||||
trading_day = self.env.trading_day
|
||||
first_start = pd.Timestamp('2015-04-01', tz='UTC')
|
||||
|
||||
frame = make_rotating_asset_info(
|
||||
frame = make_rotating_equity_info(
|
||||
num_assets=num_assets,
|
||||
first_start=first_start,
|
||||
frequency=self.env.trading_day,
|
||||
|
||||
@@ -233,11 +233,11 @@ def all_subindices(index):
|
||||
)
|
||||
|
||||
|
||||
def make_rotating_asset_info(num_assets,
|
||||
first_start,
|
||||
frequency,
|
||||
periods_between_starts,
|
||||
asset_lifetime):
|
||||
def make_rotating_equity_info(num_assets,
|
||||
first_start,
|
||||
frequency,
|
||||
periods_between_starts,
|
||||
asset_lifetime):
|
||||
"""
|
||||
Create a DataFrame representing lifetimes of assets that are constantly
|
||||
rotating in and out of existence.
|
||||
|
||||
Reference in New Issue
Block a user