Add 23rd and 27th days of the month to End of Month strategy
This commit is contained in:
parent
5866bcd9ab
commit
47361429ad
@ -5,4 +5,4 @@ def signals(data: DataFrame) -> Series:
|
|||||||
Calculate the End of Month (EOM) signal.
|
Calculate the End of Month (EOM) signal.
|
||||||
Returns a Series with 'L' for long signals if the date is close to the end of the month and 'N' otherwise.
|
Returns a Series with 'L' for long signals if the date is close to the end of the month and 'N' otherwise.
|
||||||
"""
|
"""
|
||||||
return data['Date'].apply(lambda x: 'L' if x.day in [24, 25, 26] else 'N')
|
return data['Date'].apply(lambda x: 'L' if x.day in [23, 24, 25, 26, 27] else 'N')
|
Loading…
Reference in New Issue
Block a user