mirror of
https://github.com/wassname/catalyst.git
synced 2026-08-18 11:50:11 +08:00
MAINT: Set dividend effective date to ex_date.
The price shock occurs on the effective_date. Had changed the effective_date to be day before the ex_date with the belief that pipeline was applying values up and until the effective_date, but the lookback windows apply before the effective_date. Thus, the price shock calculation should still use the previous days data but be dated on the ex_date to stay aligned with splits and merger dating.
This commit is contained in:
@@ -175,43 +175,43 @@ DIVIDENDS = DataFrame(
|
||||
[
|
||||
# Before query range, should be excluded.
|
||||
{'declared_date': Timestamp('2015-05-01', tz='UTC').to_datetime64(),
|
||||
'ex_date': Timestamp('2015-06-02', tz='UTC').to_datetime64(),
|
||||
'ex_date': Timestamp('2015-06-01', tz='UTC').to_datetime64(),
|
||||
'record_date': Timestamp('2015-06-03', tz='UTC').to_datetime64(),
|
||||
'pay_date': Timestamp('2015-06-05', tz='UTC').to_datetime64(),
|
||||
'amount': 90.0,
|
||||
'sid': 1},
|
||||
# First day of query range, should be excluded.
|
||||
{'declared_date': Timestamp('2015-06-01', tz='UTC').to_datetime64(),
|
||||
'ex_date': Timestamp('2015-06-11', tz='UTC').to_datetime64(),
|
||||
'ex_date': Timestamp('2015-06-10', tz='UTC').to_datetime64(),
|
||||
'record_date': Timestamp('2015-06-15', tz='UTC').to_datetime64(),
|
||||
'pay_date': Timestamp('2015-06-17', tz='UTC').to_datetime64(),
|
||||
'amount': 80.0,
|
||||
'sid': 3},
|
||||
# Third day of query range, should have last_row of 2
|
||||
{'declared_date': Timestamp('2015-06-01', tz='UTC').to_datetime64(),
|
||||
'ex_date': Timestamp('2015-06-15', tz='UTC').to_datetime64(),
|
||||
'record_date': Timestamp('2015-06-16', tz='UTC').to_datetime64(),
|
||||
'ex_date': Timestamp('2015-06-12', tz='UTC').to_datetime64(),
|
||||
'record_date': Timestamp('2015-06-15', tz='UTC').to_datetime64(),
|
||||
'pay_date': Timestamp('2015-06-17', tz='UTC').to_datetime64(),
|
||||
'amount': 70.0,
|
||||
'sid': 3},
|
||||
# After query range, should be excluded.
|
||||
{'declared_date': Timestamp('2015-06-01', tz='UTC').to_datetime64(),
|
||||
'ex_date': Timestamp('2015-06-26', tz='UTC').to_datetime64(),
|
||||
'ex_date': Timestamp('2015-06-25', tz='UTC').to_datetime64(),
|
||||
'record_date': Timestamp('2015-06-28', tz='UTC').to_datetime64(),
|
||||
'pay_date': Timestamp('2015-06-30', tz='UTC').to_datetime64(),
|
||||
'amount': 60.0,
|
||||
'sid': 6},
|
||||
# Another action in query range, should have last_row of 3
|
||||
{'declared_date': Timestamp('2015-06-01', tz='UTC').to_datetime64(),
|
||||
'ex_date': Timestamp('2015-06-16', tz='UTC').to_datetime64(),
|
||||
'ex_date': Timestamp('2015-06-15', tz='UTC').to_datetime64(),
|
||||
'record_date': Timestamp('2015-06-18', tz='UTC').to_datetime64(),
|
||||
'pay_date': Timestamp('2015-06-20', tz='UTC').to_datetime64(),
|
||||
'amount': 50.0,
|
||||
'sid': 3},
|
||||
# Last day of range. Should have last_row of 7
|
||||
{'declared_date': Timestamp('2015-06-01', tz='UTC').to_datetime64(),
|
||||
'ex_date': Timestamp('2015-06-22', tz='UTC').to_datetime64(),
|
||||
'record_date': Timestamp('2015-06-23', tz='UTC').to_datetime64(),
|
||||
'ex_date': Timestamp('2015-06-19', tz='UTC').to_datetime64(),
|
||||
'record_date': Timestamp('2015-06-22', tz='UTC').to_datetime64(),
|
||||
'pay_date': Timestamp('2015-06-30', tz='UTC').to_datetime64(),
|
||||
'amount': 40.0,
|
||||
'sid': 3},
|
||||
|
||||
Reference in New Issue
Block a user