Replies: 1 comment 4 replies
|
An assumption for any multivariate statistic in CSP is that all variables must tick together. I could see an argument for an option to these calculations that allows (and discards) out-of-sync ticks, but it would have to be set explicitly by the user. If out-of-sync data is dropped silently, the statistic may be using a much smaller sample size than you think it is, which is dangerous - so users would have to opt-in to this behaviour knowing its expected, like in your case where one time series is delayed. A general work around is to sample the first argument with the delayed series, which I think will be cleaner than creating your own sync. # ema_cov with delay (fails)
y_delayed = csp.delay(y, delay=1)
delayed_cov = csp.stats.ema_cov(csp.sample(y_delayed, x), y_delayed, alpha=0.1) # this is the only change
csp.print("Delayed ema_cov:", delayed_cov) |
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I noticed that ema_cov will fail when you delay one of the variables (cpp link). I created a self-contained example to reproduce this issue. Is this something we can relax, or we can have a workaround? I think this use case can be very meaningful, and should work theoretically. I have created a sync function on my side to hack through this for now, but it's quite ugly.
All reactions