diff --git a/zipline/errors.py b/zipline/errors.py index cb44c059..6843de60 100644 --- a/zipline/errors.py +++ b/zipline/errors.py @@ -167,5 +167,6 @@ class IncompatibleHistoryFrequency(ZiplineError): At least, not yet. """ msg = """ -Minute history requires minute frequency input data. -Either use daily history or provide minute frequency data.""".strip() +Requested history at frequency '{frequency}' cannot be created with data +at frequency '{data_frequency}'. +""".strip() diff --git a/zipline/history/history.py b/zipline/history/history.py index d2b2ef7f..2e589819 100644 --- a/zipline/history/history.py +++ b/zipline/history/history.py @@ -249,7 +249,10 @@ class HistorySpec(object): if isinstance(frequency, str): frequency = Frequency(frequency, daily_at_midnight) if frequency.unit_str == 'm' and data_frequency == 'daily': - raise IncompatibleHistoryFrequency() + raise IncompatibleHistoryFrequency( + frequency=frequency.unit_str, + data_frequency=data_frequency, + ) # The frequency at which the data is sampled. self.frequency = frequency