1

Esper provides a function of linear regression [stat:linest(,)].

Example looks like (and this works great):

    select * from StockTickEvent.win:time(10 seconds).stat:linest(price, offer)

However, I am trying to get a linear regression of all data in window grouped by symbol (say, INTC) and it does not allow me. I tried using "having symbol='GE'" and that was not right either. Here is what I tried to d:

    select * from StockTickEvent.win:time(10 seconds).stat:linest(current_timestamp(), price) group by symbol

Any help to resolve this is appreciated.

1 Answers1

0

For grouping data windows the "std:groupwin" is the right approach.

user650839
  • 2,594
  • 1
  • 13
  • 9