jonathancornelissen / highfrequency

The highfrequency package contains an extensive toolkit for the use of highfrequency financial data in R. It contains functionality to manage, clean and match highfrequency trades and quotes data. Furthermore, it enables users to: calculate easily various liquidity measures, estimate and forecast volatility, and investigate microstructure noise and intraday periodicity.
147 stars 63 forks source link

Performance question #56

Closed waynelapierre closed 3 years ago

waynelapierre commented 4 years ago

I kind of remember zoo or xts are quite slow. Is that possible to replace zoo and xts input with data.table with a timestamp column for all functions in the high frequency package?

For rolling functions, my personal experience is that the package roll is faster than RcppRoll. You may want to check that.

kboudt commented 4 years ago

we did this in the new version

waynelapierre commented 4 years ago

Great! When I read the Cran manual, some functions seem to accept data.table and some doesn't.

emilsjoerup commented 4 years ago

Yea - I am not done converting all functions yet. There is a lot to do besides that.

If you think roll is faster than RcppRoll, feel free to send me a PR with a benchmark on my for of the package.

If you have specific functions that you want/need a data.table function for, it may be best for you to implement it yourself and send us a PR. I think that among us currently working with the package, the consensus is that the next version of highfrequency won't be out for a few months.

Otherwise, you can try to look for changes in my fork in the coming time to see if I by chance convert a function you need 😃

waynelapierre commented 4 years ago

Thanks for the clarification. I will go ahead and try this package and see what I can do.