Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Trying to understand history()

In the docs it says that the only frequency currently available is "1d"

frequency: The size of the bars returned by history. Currently, "1d"
is the only supported frequency

But when backtesting I'm told that I must be in minute mode in order to use the history() function.

does "1d" stand for 1 day?
If I request 5 bars, then in minute mode I should expect 5 minutes of data, correct?

The graphs don't actually display minute to minute what's going on so it's hard to tell what my algo is doing.

1 response

Pumplerod,

You should get a trailing window of daily prices (or volumes) plus the prices (or volumes) for the current minute.

For example, consider:

p = history(30, '1d', 'price', ffill=True)  

You should get 29 days of daily closing prices, plus the current minutely closing prices.

Hope this helps.

Grant