Quick question on how to perform this operation:
I have a series of data for changes to the Bank of Canada's target for the Overnight rate, and a series of bond yields. I'm trying to restrict my sample of yields to 15 days before and after the bank changes their target.
I've generated a dummy variable to indicate dates when the bank changed their rate, and recoded this to the date, and generated a series of 15 days above and below this in hopes of using the @during function.... but that does not seem to work.
Any inputs?
Thanks much.
This is my code thus far: keep is the series of BOC changes to the target for the overnight.
Code: Select all
genr d1 = @recode(keep >0 or keep<0, @date,0)
genr below_days = @recode(d1>0,d1-15,0)
genr above_days = @recode(d1>0,d1+15,0)