Note that there are some explanatory texts on larger screens.

plurals
  1. POPandas - grouping intra day timeseries by date
    primarykey
    data
    text
    <p>I have an intra day series of log returns over multiple days that I would like to downsample to daily ohlc. I can do something like</p> <pre><code>hi = series.resample('B', how=lambda x: np.max(np.cumsum())) low = series.resample('B', how=lambda x: np.min(np.cumsum())) </code></pre> <p>But it seems inefficient to compute cumsum on each call. Is there a way to first compute the cumsums and then apply 'ohcl' to the data?</p> <pre><code>1999-08-09 12:30:00-04:00 -0.000486 1999-08-09 12:31:00-04:00 -0.000606 1999-08-09 12:32:00-04:00 -0.000120 1999-08-09 12:33:00-04:00 -0.000037 1999-08-09 12:34:00-04:00 -0.000337 1999-08-09 12:35:00-04:00 0.000100 1999-08-09 12:36:00-04:00 0.000219 1999-08-09 12:37:00-04:00 0.000285 1999-08-09 12:38:00-04:00 -0.000981 1999-08-09 12:39:00-04:00 -0.000487 1999-08-09 12:40:00-04:00 0.000476 1999-08-09 12:41:00-04:00 0.000362 1999-08-09 12:42:00-04:00 -0.000038 1999-08-09 12:43:00-04:00 -0.000310 1999-08-09 12:44:00-04:00 -0.000337 ... 1999-09-28 06:45:00-04:00 0.000000 1999-09-28 06:46:00-04:00 0.000000 1999-09-28 06:47:00-04:00 0.000000 1999-09-28 06:48:00-04:00 0.000102 1999-09-28 06:49:00-04:00 -0.000068 1999-09-28 06:50:00-04:00 0.000136 1999-09-28 06:51:00-04:00 0.000566 1999-09-28 06:52:00-04:00 0.000469 1999-09-28 06:53:00-04:00 0.000000 1999-09-28 06:54:00-04:00 0.000000 1999-09-28 06:55:00-04:00 0.000000 1999-09-28 06:56:00-04:00 0.000000 1999-09-28 06:57:00-04:00 0.000000 1999-09-28 06:58:00-04:00 0.000000 1999-09-28 06:59:00-04:00 0.000000 </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload