Skip to content
All library documents

Fixing Undefined Functions in Shared BigQuant Modules

Article BigQuant

Summary

This BigQuant support exchange addresses a Python NameError that appears after a backtest workflow is saved as a shared custom module. A function named get_extend_calendar_with_tradingdays was available in the original workflow but could not be resolved when the shared module ran. The answer attributes this to the function definition being absent from the module’s accessible scope, for example because it was nested inside another function.

The practical lesson is to ensure helper functions are defined at a scope visible to the code that calls them, rather than only inside a local function. The post illustrates the difference between a top-level definition and a nested one, but it does not investigate other causes such as missing imports, altered execution environments, or module packaging behavior. It is Python troubleshooting guidance connected to a backtest module, not an explanation of a trading signal or strategy.

Key ideas

  • A NameError indicates that the referenced function is not available in the executing scope.
  • A helper function nested inside another function may be inaccessible to callers elsewhere in the module.
  • Shared modules should include helper definitions at a scope visible to their calling code.
  • The explanation presents one likely cause and does not rule out import or packaging issues.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.