mirror of
https://github.com/wassname/catalyst.git
synced 2026-08-06 13:00:45 +08:00
TST: add test for 13d filings dataset
MAINT: add 13d filings to factors init MAINT: rename constant MAINT: add event_date_col field
This commit is contained in:
@@ -35,7 +35,7 @@ NUM_SHARES = 'number_shares'
|
||||
NEXT_RELEASE_DATE = 'next_release_date'
|
||||
NEXT_STANDARD_DEVIATION = 'next_standard_deviation'
|
||||
PAY_DATE_FIELD_NAME = 'pay_date'
|
||||
PERCENT_SHARES = 'percentage'
|
||||
PERCENT_SHARES = 'percent_shares'
|
||||
PREVIOUS_ACTUAL_VALUE = 'previous_actual_value'
|
||||
PREVIOUS_AMOUNT = 'previous_amount'
|
||||
PREVIOUS_ANNOUNCEMENT = 'previous_announcement'
|
||||
|
||||
@@ -5,6 +5,7 @@ from .factor import (
|
||||
RecarrayField,
|
||||
)
|
||||
from .events import (
|
||||
BusinessDaysSince13DFilingsDate,
|
||||
BusinessDaysSinceCashBuybackAuth,
|
||||
BusinessDaysSinceDividendAnnouncement,
|
||||
BusinessDaysUntilNextExDate,
|
||||
@@ -28,6 +29,7 @@ from .technical import (
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
'BusinessDaysSince13DFilingsDate',
|
||||
'BusinessDaysSinceCashBuybackAuth',
|
||||
'BusinessDaysSinceDividendAnnouncement',
|
||||
'BusinessDaysUntilNextExDate',
|
||||
|
||||
@@ -24,6 +24,7 @@ class _13DFilingsLoader(EventsLoader):
|
||||
expected_cols = frozenset([DISCLOSURE_DATE,
|
||||
PERCENT_SHARES,
|
||||
NUM_SHARES])
|
||||
event_date_col = DISCLOSURE_DATE
|
||||
|
||||
def __init__(self, all_dates, events_by_sid,
|
||||
infer_timestamps=False,
|
||||
@@ -36,14 +37,12 @@ class _13DFilingsLoader(EventsLoader):
|
||||
def disclosure_date_loader(self):
|
||||
return self._previous_event_date_loader(
|
||||
self.dataset.disclosure_date,
|
||||
DISCLOSURE_DATE
|
||||
)
|
||||
|
||||
@lazyval
|
||||
def percent_shares_loader(self):
|
||||
return self._previous_event_value_loader(
|
||||
self.dataset.percent_shares,
|
||||
DISCLOSURE_DATE,
|
||||
PERCENT_SHARES
|
||||
)
|
||||
|
||||
@@ -51,6 +50,5 @@ class _13DFilingsLoader(EventsLoader):
|
||||
def number_shares_loader(self):
|
||||
return self._previous_event_value_loader(
|
||||
self.dataset.number_shares,
|
||||
DISCLOSURE_DATE,
|
||||
NUM_SHARES
|
||||
)
|
||||
|
||||
@@ -65,4 +65,4 @@ class Blaze_13DFilingsLoader(BlazeEventsLoader):
|
||||
})
|
||||
|
||||
concrete_loader = _13DFilingsLoader
|
||||
concrete_dataset=_13DFilings
|
||||
concrete_dataset = _13DFilings
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from ._13d_filings import _13DFilingsLoader
|
||||
from ._13d_filings import Blaze_13DFilingsLoader
|
||||
from .buyback_auth import (
|
||||
BlazeCashBuybackAuthorizationsLoader,
|
||||
BlazeShareBuybackAuthorizationsLoader
|
||||
@@ -20,7 +20,7 @@ from .earnings import (
|
||||
from .consensus_estimates import BlazeConsensusEstimatesLoader
|
||||
|
||||
__all__ = (
|
||||
'_13DFilingsLoader',
|
||||
'Blaze_13DFilingsLoader',
|
||||
'BlazeCashBuybackAuthorizationsLoader',
|
||||
'BlazeDividendsByAnnouncementDateLoader',
|
||||
'BlazeConsensusEstimatesLoader',
|
||||
|
||||
Reference in New Issue
Block a user