kernel-gof icon indicating copy to clipboard operation
kernel-gof copied to clipboard

can this algorithm compare differences in two matrices

Open andrewczgithub opened this issue 5 years ago • 5 comments

hi @wittawatj !!

i hope your well.

I was wondering if you have a matrix of returns, then new data comes in and you have a second rolling matrix of returns, can the test tell if the distribution has changed from one matrix to the next?

Kind regards, Andrew

andrewczgithub avatar Apr 08 '20 11:04 andrewczgithub

Could you please elaborate more? I do not quite understand your setting. Is it a change point detection problem? Do you have a time series of matrices?

wittawatj avatar Apr 08 '20 11:04 wittawatj

Hi @wittawatj !

Basically i was thinking of testing weather warket conditions have changed. Using the test as test for portfolio rebalancing.

If you have an array of returns and you update the array with new returns, then you work out if the distribution has changed and hence the portfolio needs to be rebalanced.

Kind regards and thanks, Andrew

andrewczgithub avatar Apr 08 '20 22:04 andrewczgithub

Hi Andrew,

Indeed, this sounds like a change point detection problem https://en.wikipedia.org/wiki/Change_detection . Tools in this repository are for goodness-of-fit testing for i.i.d. data. That is, given a model (probability density), and a dataset, decide whether the model fits.

I think the tools we have here are not appropriate for your problem. Firstly, it does not sound like you have a density model to begin with i.e., you only have observations. Secondly, what you have is probably not i.i.d. I would encourage you to look at change point detection.

Best, Wittawat

wittawatj avatar Apr 09 '20 08:04 wittawatj

oops! thanks so much for your advice

andrewczgithub avatar Apr 09 '20 08:04 andrewczgithub

could you possibly give me an example of how change point could help with the above problem?

andrewczgithub avatar Apr 09 '20 08:04 andrewczgithub