Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outlier price filtering #13

Merged
merged 1 commit into from May 3, 2023
Merged

Outlier price filtering #13

merged 1 commit into from May 3, 2023

Conversation

ghost
Copy link

@ghost ghost commented Mar 25, 2023

Sometimes an exchange may report a stale price, esp. on thinly traded markets.
This PR filters out prices too far away from the consensus average.
Standard deviation of 2.2 chosen to determine outliers, configurable in application.properties.

From experimentation:

  • Higher standard deviation (e.g. 5) results in no prices removed.
  • Lower standard deviation (e.g. 1.5) results in too many prices removed.

Current results:

 INFO  b.p.s.ExchangeRateController: Incoming /getAllMarketPrices request
 WARN  b.p.s.ExchangeRateService: outlier price removed=16700.0, source=QUOINE, ccy=EUR, consensus price=25651.2922 
 WARN  b.p.s.ExchangeRateService: outlier price removed=0.00172711, source=BTCMARKETS, ccy=LTC, consensus price=0.003372445 
 WARN  b.p.s.ExchangeRateService: outlier price removed=16200.0, source=QUOINE, ccy=USD, consensus price=27619.204166666666 
 WARN  b.p.s.ExchangeRateService: outlier price removed=0.07346, source=QUOINE, ccy=ETH, consensus price=0.0631171025 

Copy link
Contributor

@gabernard gabernard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@gabernard gabernard merged commit fcd1873 into bisq-network:main May 3, 2023
@ghost ghost mentioned this pull request May 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant