Sliding Window

A deque with fixed maxlen appends new elements and evicts old elements in O(1) time. The streaming abstraction uses a fixed-size sliding window implemented with collections.deque and maxlen. LogReturn computes log returns only after its tw…

1 sources - 4 claims

A deque with fixed maxlen appends new elements and evicts old elements in O(1) time. The streaming abstraction uses a fixed-size sliding window implemented with collections.deque and maxlen. LogReturn computes log returns only after its two-price window is full.