catacycle.catacycle.scaler

catacycle.catacycle.scaler(forward_rates, rev_rates, startrange=0.1, stoprange=0.8, scale_type='Linear')[source]

Transforming rates to be within specified range defined by startrange and stoprange:

Can use linear or logarithmic scale, which is preserved when transforming the data. :param forward_rates: a list of forward rates as floats or ints :param rev_rates: a list of reverse rates as floats or ints :param startrange: float, first number of the range you want output to take :param stoprange: float, last number of range for output to take :param scale_type: ‘Linear’, ‘Logarithmic’, or ‘Preserve Multiples’. :return: (forward_rates, rev_rates), a tuple of the original lists scaled properly