Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
How are indicators like SMA calculated for thinly traded securities?

reading from this post, there are some securities that will not trade for minutes/days: https://www.quantopian.com/posts/runtime-error-siddata-object-has-no-attribute-price

how are standard indicators such as SMA calculated for these?

thank you

-Jason

3 responses

i guess I will treat the security as not-yet traded until I get the first price, then I will fill forward for future untraded minutes/days.

if anyone has a better idea, please post.

Hello Jason,

You might look into this:

https://eckner.com/papers/ts_alg.pdf

Grant

More references provided on http://en.wikipedia.org/wiki/Unevenly_spaced_time_series. Regarding the forward-filling technique you mention above, keep in mind that as data becomes sparse or absent within a trailing window, the error in the average goes up, making the average less reliable. So, you might want to consider computing error bars that capture this effect. Or you could require a minimum of N samples in your window to keep the error in check. --Grant