1
$\begingroup$

I'm trying to detect structural breaks in time series of NAV using 'strucchange' in R.

I have created the NAV by using a simple annualized return of 5% and 10% (no random term). However, after using 'breakpoints' test in R the result is that the break point is not on the point I have changed return from 5% to 10%.

why is the break point not on time ~500

My code is like:

library(readr)
test <- read_csv("D:/Temp/Test/nav.csv")
View(test)
library(strucchange)
testnav = ts(test$NAV)
bp.test = breakpoints(testnav ~ 1)
plot(testnav)
lines(bp.test, breaks = 1)

The data I use is Here

Did I do something wrong? Why isn't it break on time ~500 where the return changed from 5% to 10%?

$\endgroup$
3
  • $\begingroup$ Your questioon is a little vague. $\endgroup$ Commented Apr 7, 2017 at 10:18
  • $\begingroup$ Interesting question. The "choice" of a breakpoint does seem odd. Are you interested primarily in understanding the behaviour of R's breakpoints() function? If so, try this question on a forum dealing squarely with R, maybe StackOverflow. $\endgroup$
    – rolando2
    Commented Apr 7, 2017 at 11:59
  • $\begingroup$ still have no idea why it is not break on time ~500 where the return changed from 5% to 10% $\endgroup$
    – tisaros
    Commented Apr 11, 2017 at 7:11

1 Answer 1

2
$\begingroup$

The weird breakpoint is found because you just look for changes in a piecewise-constant mean (i.e., a step function). However, you clearly need a piecewise-linear function with changes in the trend slope (and intercept). So instead of ~ 1 you can regress on ~ time(testnav) for example:

bptrend <- breakpoints(testnav ~ time(testnav))

The resulting visualization for the 1-break solution is:

plot(testnav)
lines(bptrend, breaks = 1)
lines(fitted(bptrend, breaks = 1), col = 4)
legend("topleft", c("observed", "fitted"),
  col = c(1, 4), lwd = 1, bty = "n")

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.