Part Finance Part R question
部分财务部分R问题
I have been trying to replicate the below formula in R using the Quantmod package and xts also using the diff function. The code gives me a plot for credit impulse but it doesn't seem to be replicating what I am trying to get at. See link I h