NVIDIA / fsi-samples

A collection of open-source GPU accelerated Python tools and examples for quantitative analyst tasks and leverages RAPIDS AI project, Numba, cuDF, and Dask.
271 stars 115 forks source link

[QST] Rolling OLS calculation #101

Closed jumana51 closed 4 years ago

jumana51 commented 4 years ago

What is your question? Is the a rolling OLS calculation available in gQuant similar to Pyfinance PandasRollingOLS?

I have a need for the rolling calculation to be performed on a GroupBy object, where a given dataframe is grouped by dates and slope calculated on a rolling basis.

yidong72 commented 4 years ago

We currently don't have the RollingOLS function implemented. You are welcome to contribute and make a PR.

The cudf rolling function can take the user-defined functions

https://docs.rapids.ai/api/cudf/stable/guide-to-udfs.html

You can implement it by defining the regression function.