According to the API documentation:
'open', 'high', 'low', and 'close' return the relevant information for the current trade bar. If there is no current trade bar, NaN is returned. These fields are never forward-filled.
Does this mean that for '1d' data, I can't rely on the current open, high, low, or close? As an example, I have taken some Quantopian code from "recording and plotting variables" and just replaced the securities with IHT. Sometimes the high/low is clearly returned as NaN, but it's not consistent. If I replace IHT with AAPL, for instance, there are no NaNs. It would seem that one should never use data.current(asset, 'high') as the value is unreliable. Is my understanding correct?
|Returns||1 Month||3 Month||6 Month||12 Month|
|Alpha||1 Month||3 Month||6 Month||12 Month|
|Beta||1 Month||3 Month||6 Month||12 Month|
|Sharpe||1 Month||3 Month||6 Month||12 Month|
|Sortino||1 Month||3 Month||6 Month||12 Month|
|Volatility||1 Month||3 Month||6 Month||12 Month|
|Max Drawdown||1 Month||3 Month||6 Month||12 Month|
def initialize(context): context.securities = symbols('IHF') def handle_data(context, data): # You can pass a string variable into record(). # Here we record the price of all the securities in our list. for stock in context.securities: price = data.current(stock, 'price') # record(stock, price) # You can also pass in a variable with a string value. # This records the high and low values for AAPL. fields = ['high', 'low'] for field in fields: record(field, data.current(symbol('IHF'),field))