Skip to content
All library documents

Building a BigQuant Module to Round Market Data Fields

Article BigQuant

Summary

This tutorial explains how to build and install a reusable BigQuant module that reads a named data table, selects a date range, and rounds chosen floating-point fields to a requested number of decimal places. It describes defining required and optional inputs, setting bounds on the precision parameter, defaulting dates to the current day, and returning results as a DataSource for use by other modules.

The rounding method scales values by a power of ten, adds one half, floors the result, and scales back. The article walks through tests using a stock-bar table, several precision settings, selected fields, and a non-floating date field; it reports that these examples behaved as expected. It also notes a key limitation: invalid table or field names cause errors because the module has no corresponding validation or error handling. The examples illustrate module development and basic functional checks, but provide no trading performance evidence.

Key ideas

  • A BigQuant module can expose typed inputs, defaults, and value limits through its run function.
  • The example retrieves rows by table name and date range, then optionally selects fields for processing.
  • Only floating-point columns are rounded, using a scale, floor, and rescale operation.
  • The result is packaged as a DataSource so other modules can consume it.
  • Invalid table or column names are not handled and can cause the module to fail.

Tags

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