examine_anomalies#

API documentation for tradingstrategy.utils.wrangle.examine_anomalies Python function.

examine_anomalies(pair_universe, price_df, printer=<function <lambda>>, max_print=2, pair_id_column='pair_id', open_close_max_diff=5.0, open_close_min_diff=-0.99, between_high_diff=5.0, between_low_diff=-0.99)[source]#

Check the price dataframe for data issues.

  • Print out to consoles bad rows in the OHLCV candle price data

Perform

  • Open/close diff check

  • In between timeframes diff check

TODO: This is a work in progress helper.

See also:

Parameters:
  • price_df (DataFrame) –

    OHLCV data for multiple trading pairs.

    Can be grouped by pair_id_column.

  • pair_id_column (str | None) – Fix column identifies the pair name in the data.

  • max_print – How many entries print per each anomaly check

  • open_close_max_diff – Abnormal price increase X

  • open_close_min_diff – Abnormal price decrease X

  • pair_universe (tradingstrategy.pair.PandasPairUniverse | None) –

  • between_high_diff (float | None) –

  • between_low_diff (float | None) –