August 31, 2022
Miscellaneous improvements
- DSL: Switch to using Factset FX rates when doing currency conversions for Factset prices, actuals, fundamentals, and estimates data. This adds support for more currencies (eg TWD) than our previous data source (ECB, via Quandl). The converted values may change slightly as the sources have slightly different ways of determining the closing FX rate for each date. This only impacts signals that explicitly convert Factset data into a different currency.
- DSL: Improved
signal.change()(reference) andsignal.relative_change()(reference) with smarter defaults to better handle irregular quarterly calendars. Previously, quarterly time series with irregular quarter-end dates would have an unintuitive result when calculating QoQ/YoY change, as the functions would forward fill the time series to find the comparable data point. These changes now mean that the functions return the intuitively expected results by default, but still give users options to override. See our blog post for an example. Technically, the changes are:signal.change()andsignal.relative_change()now take amethodparameter which controls how each data point is matched to a data point in the past. It defaults to'auto'which selects the method based on the offset.- The method parameter can be set to
'nearest'which matches each data point with the one closest to its date minus the given offset. This is the default method when the offset is a month or longer. When the offset is shorter, forward filling is the default. - Introduce a
limitargument which controls how lenient we are when matching each data point with the prior data point. - Note that the legacy
relative_change(signal, ...)function was not changed, for backwards-compatibility of existing signals that use it.
Deprecations
- DSL: Deprecate the
relative_change(signal, ...)function, which is now superseded bysignal.relative_change(). A deprecation warning will be returned when using this function. As this function is widely used, we will only look to remove this function in September 2023. As part of this change, we also removed theuse_ffill_for_missingargument, which was not used in any user signals.
Bug fixes
- Fix an edge case where
relative_change(),signal.change()andsignal.relative_change()did not handle NaN values in the input data correctly when evaluated for multiple entities. This could lead to incorrect results if the different entities had data with different indices.
Updated 6 days ago