Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- imf <- list()
- for (i in 2:ncol(emd$imf)) {
- tmp <- as.ts(emd[["imf"]][, i], start = 1, end = length(prices[, "GSPC.Close"]))
- imf <- append(imf, list(tmp))
- }
- residue <- as.ts(emd[["residue"]], start = 1, end = length(prices[, "GSPC.Close"]))
- transformed <- Reduce("+", imf) + residue
- plot(transformed, ylab = "USD", xlim = c(480, 510), ylim = c(2800, 3050))
- lines(prices[, "GSPC.Close"], col = "red")
- legend(502, 3025, legend = c("Signal", "Transformed"), col = c("red", "black"), lty = c(1, 1))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement