danfojs icon indicating copy to clipboard operation
danfojs copied to clipboard

Feature Request: Resampling

Open drixie opened this issue 4 years ago • 11 comments
trafficstars

This is useful for time series data especially OHLC.

Use case: You have 1 min stock prices, and you want it aggregated to hourly prices before performing additional analysis.

See: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.resample.html

drixie avatar Feb 23 '21 17:02 drixie

@drixie Since this is a feature request, can you give us more details using the feature issue template: https://github.com/opensource9ja/danfojs/issues/new?assignees=&labels=&template=feature_request.md&title=

risenW avatar Mar 09 '21 21:03 risenW

For Quant, danfo.js needs more APIs as pandas to manipulate price data, and interop with ta-lib for technical analysis.

pandas.DataFrame.resample is just one of them.

Comparing to Python in data science, JavaScript is better for real-time performance, visualization and building an App/WebPage for shipping, but danfo.js needs more APIs for data handling in many other fields.

We'd like to see that danfo.js supports Quantitative Finance.

xareelee avatar Mar 18 '21 05:03 xareelee

@xareelee thanks for bringing this to our notice. can you help list some of the most important methods in pandas that are used in Quantitative analysis and add then to the features list

steveoni avatar Mar 18 '21 08:03 steveoni

@steveoni For time series analysis, you'll need at least:

  • rolling / expanding / ewm
  • shift
  • resample

It's not easy to list "the most important methods". It depends on what's the job.

  • You'll need ohlc to find the prices in a time frame.
  • You'll need good supports with date indexes, and group/resample them.
  • You'll need some handy functions like
    • read_html and read_sql to fetch data from web pages and databases;
    • math functions for calculation as numpy.

xareelee avatar Mar 18 '21 15:03 xareelee

any plan for this ?

davidxiaobj avatar May 13 '21 11:05 davidxiaobj

Would be really useful to have this in a JS library.

chrisckc avatar May 18 '21 15:05 chrisckc

Stale issue message

github-actions[bot] avatar Jul 22 '21 05:07 github-actions[bot]

I'm also really keen to see resample added.

ikb42 avatar Feb 23 '22 15:02 ikb42

I'm also really keen to see resample added.

futuraibr avatar Oct 04 '22 17:10 futuraibr

Any news on this feature request? Or another work around for it?

douglaspetrin avatar Apr 11 '23 20:04 douglaspetrin

Any updates ? Methods mentioned above are quite cruicial for time series analysis and it is bit pitty that these are not included in danfo .. (yet)

mkaanerkoc avatar Oct 21 '23 19:10 mkaanerkoc