twosigma / flint

A Time Series Library for Apache Spark
Apache License 2.0
993 stars 184 forks source link

Expose close summarizer to Python API #61

Open gbaettig opened 5 years ago

gbaettig commented 5 years ago

I have been using the Summarizers (mean, count, max, min) from the Python API in the last couple of weeks. I use them jointly with a clock, which gives me uniform timestamps of one minute bars. Now I was wondering if it is possible to have a summerizer in Python which gives me the close value (last value of the interval). I am dealing with price data and I saw that the Scala implementation of the summarizers have the "close" functionality. Is it possible to expose this summarizer into the Python API?

Thank you very much for your support

icexelloss commented 5 years ago

@gbaettig Which close summarizer in Scala are you referring to?

gbaettig commented 5 years ago

I thought I saw a close summarizer in the file Summarizer.scala (inside the package com.twosigma.flint.timeseries.summarize). This method is inside the trait Summarizer (it is on the line 223 in that file). I thought it would basically calculate the close value of each bar in a time series. Maybe I misunderstood that. If that is the case, are there any efforts to provide such a summarizer? It would be helpful to calculate close prices for various bars on price time series.