Systemicbeta

Constant Bias Scale

systemic:core-cbsIndicators

Inputs

NameTypeDescription
BiasNumberA constant number added to each value after scaling.
ScaleNumberA constant number that each input value is multiplied by.
DataNumber seriesThe series to transform, with at least one value.

Outputs

NameTypeDescription
CbsNumber seriesThe transformed series: each input value multiplied by the scale, plus the bias.

Cost

6
credits per run
1,000
bars

0.198 + 0.00563·n credits for n bars, rounded up. The marks are each plan's limit of bars.

The Constant Bias Scale module applies a linear transformation to each value in a series: it multiplies by a scale factor, then adds a bias.

CBS(x)=x⋅scale+bias\text{CBS}(x) = x \cdot \text{scale} + \text{bias}

This operation is a basic tool for rescaling and normalizing data.


How It Works

flowchart LR
    subgraph Input
        X["x₁, x₂, ... xₙ"]
    end
    
    subgraph Transform["Linear Transformation"]
        M["× Scale"]
        A["+ Bias"]
    end
    
    subgraph Output
        Y["y₁, y₂, ... yₙ"]
    end
    
    X --> M --> A --> Y

For each input value:

  1. Multiply by the scale factor (stretches or compresses)
  2. Add the bias term (shifts up or down)

Step-by-Step Example

Input: [0, 1, 2, 3, 4]
Scale: 7
Bias: 3

Input (x)× Scale+ BiasOutput
00 × 7 = 00 + 33
11 × 7 = 77 + 310
22 × 7 = 1414 + 317
33 × 7 = 2121 + 324
44 × 7 = 2828 + 331

Result: [3, 10, 17, 24, 31]


Understanding the Parameters

Scale: Amplitude Control

The scale parameter controls the spread or amplitude of your data:

ScaleEffect
> 1Amplify / stretch the range
= 1No change to spread
0 < scale < 1Compress the range
= 0Flatten to constant
< 0Invert and scale

Bias: Level Shift

The bias parameter shifts the entire output up or down:

BiasEffect
> 0Shift values upward
= 0No shift
< 0Shift values downward

Practical Applications

1. Re-centering an Oscillator

Many oscillators (RSI, Stochastic) range from 0 to 100. To center them around zero:

Original RangeScaleBiasNew Range
0 to 1001-50-50 to +50
0 to 1000.02-1-1 to +1

2. Converting Units

Transform data between different scales:

  • Fahrenheit to Celsius: Scale = 5/9 (about 0.5556), Bias = -17.78 (approximate)
  • Percentage to decimal: Scale = 0.01, Bias = 0

3. Normalizing Custom Ranges

Map any range [a, b] to a new range by choosing the right scale and bias.


Combining CBS Modules

Several CBS modules in a row are equal to a single CBS:

CBS2(CBS1(x))=(x⋅s1+b1)⋅s2+b2=x⋅(s1⋅s2)+(b1⋅s2+b2)\text{CBS}_2(\text{CBS}_1(x)) = (x \cdot s_1 + b_1) \cdot s_2 + b_2 = x \cdot (s_1 \cdot s_2) + (b_1 \cdot s_2 + b_2)

This means chained transformations can always be reduced to one.


Edge Cases

ScenarioResult
Scale = 0All outputs equal bias (constant)
Bias = 0, Scale = 1Output equals input (identity)
Empty inputRejected — the series must contain at least one value
Empty value in inputOutput is empty at the same position

Missing Data

An empty value (null), such as a data gap or a bar when the market is closed, gives an empty value at the same position in the output. CBS never invents a value for a missing input. In particular, an empty value is never replaced with the bias, which is what treating it as zero would give.

CBS works for every number, so there is no invalid input: the output is empty only where the input is empty. The one exception is arithmetic with no defined result (for example, an infinite value multiplied by a scale of zero), which is also empty at that position.


Further Reading


Indicator Assessment

---
config:
  xyChart:
    width: 600
    height: 400
  themeVariables:
    xyChart:
      plotColorPalette: "#1abc9c"
---
xychart-beta horizontal
    title "Constant Bias Scale Assessment (Scale: 1-10)"
    x-axis ["Popularity", "Reliability", "Complexity", "Versatility", "Recent Interest"]
    y-axis "Score" 0 --> 10
    bar [6, 10, 2, 10, 4]

Note: Single bar shown as scores are identical across asset classes for this fundamental mathematical operation.

Dimension Explanations

DimensionScoreRationale
Popularity6Linear transformations are universally used but often as building blocks within larger systems, not standalone indicators. Well understood in engineering and data science.
Reliability10Deterministic: the same inputs always give the same outputs. No statistical uncertainty or market-dependent behavior.
Complexity2Elementary arithmetic (multiply then add). Requires only basic algebra to understand and apply correctly.
Versatility10Applicable to any numerical series across all asset classes, timeframes, and use cases. Fundamental building block for normalization, unit conversion, and signal processing.
Recent Interest4As a fundamental operation, interest is stable rather than trending. No recent surge in research—it simply works and has for centuries.
Rendering diagrams...
© 2026 WanoLabs. All rights reservedBeta v0.1.5