Skip to main content

percentile_linear_interpolation

Syntax Format​

percentile_linear_interpolation(source, period, percentage)

Overview​

The percentile_linear_interpolation function calculates percentile using the method of linear interpolation between the two nearest ranks. In simpler words, this function provides the percentile of the given series type over a specified period. This function can be useful to analyze the data range of an asset.

Parameters​

ParameterTypePurpose
sourceseriesInput series, taken into calculation
periodintegerInput period, taken into calculation
percentagenumericPercentage to select. Must be in the [0,100] range.

Returns: series.

Example​

perc_value = percentile_linear_interpolation(close, 14, 90)