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

Hi all,
I am trying to get the historical minute prices for the last one hour using this code-

price_history= history(bar_count=60,frequency='1m', field='close_price')

I get an error when I compile that says:

CodedIncompatibleHistoryFrequency: 0068 Requested history at frequency 'm' cannot be created with data at frequency 'daily'.

Do I have to set the frequency somewhere else in the code as well?

Regards,
Prathamesh

2 responses

Prathamesh,

Yes but its not in the code, its in the IDE - on the right of the Start Date and End Date and Starting Cash, you then have a dropdown "daily" or "minute" -- to use history function with "1m" mode you must set the dropdown to "minute". This should work.

James

Thanks! It works now. I thought there was something wrong with the code, since it wouldn't compile. Didnt think of the settings in the Backtester.