Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rolling regression #18

Open
waynelapierre opened this issue Feb 16, 2021 · 9 comments
Open

rolling regression #18

waynelapierre opened this issue Feb 16, 2021 · 9 comments

Comments

@waynelapierre
Copy link

waynelapierre commented Feb 16, 2021

Could you add a rolling regression function that can return the regression coefficients and R squared value? With this function, your package would be super useful for time series analysis.

@JeffreySarnoff
Copy link
Owner

Seems appropriate -- can you tell me how to write or where to see excellent and easily intuited examples of rolling regression functions that can return the regression coefficients and R squared value?

@JeffreySarnoff
Copy link
Owner

what does this roll over, is it a single stream of floating point values or are there e.g. a stream of xs and a synced stream of ys or is it some third way?

@waynelapierre
Copy link
Author

yes, the rolling function should be able to regress one stream of ys on one stream of xs or multiple streams of xs (x1, x2, x3, etc.).

@JeffreySarnoff
Copy link
Owner

(broad question, useful for me to hear from you for design purposes)
what does regressing one stream of ys on one or more streams xs_i provide that is helpful, what is the manner of that help?

@waynelapierre
Copy link
Author

in finance, it is common to use rolling regressions to estimate various measures of volatilities.

@JeffreySarnoff
Copy link
Owner

Thank you. The package was written as a flexible and facile datastream engager, with special emphasis on preserving the information available in trailing or in leading datapoints as the applicable window becomes foreshortened. The current code has no knowledge about nor understanding of concomitant data streams. This would be a vaild reason to revisit the software architecture and revise the way it approaches and is approached. I will attend this and the exemplars you have linked well enough to see a way forward -- my time for this now is limited. I do respect the request; and will use this issue as a notepad, adding when there is something to be added.

There is a new branch #multiflows for the initial whiteboarding. If this effort is successful, that branch will fall away for a next approach to implementation.

@JeffreySarnoff
Copy link
Owner

JeffreySarnoff commented Feb 19, 2021

@waynelapierre I have reviewed what needs to be done, and it requires changing the package design so it will operate as expected when given multiple datastreams which share some influence on the way information is rolled up. That is time-consuming, but not conceptually difficult. This package was written years ago, before I thought much about moderating allocations or enhancing performance. The first update to the code base would be revisiting that .. and I do not have the availability for that now. As I cannot give you a timeline, please do not delay work of your own until this package is reworked.

@p-casgrain
Copy link

@waynelapierre I believe that the OnlineStats.jl may have what you are looking for and more. In particular, OnlineStats.LinReg and OnlineStats.LinRegBuilder may provide the functionality are looking for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants