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:
Maya Tydykov
2016-04-28 11:59:49 -04:00
parent e726cc94c9
commit 11d666daaa
6 changed files with 49 additions and 53 deletions
+1 -1
View File
@@ -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'
+2
View File
@@ -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',
+1 -3
View File
@@ -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
+2 -2
View File
@@ -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',