From 9e48e6a40b917a6d24cb4084904bc1942f6285c4 Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 25 Aug 2022 06:46:57 +0200 Subject: [PATCH] Update docs about precision limits in backtesting --- docs/backtesting.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/backtesting.md b/docs/backtesting.md index a7baf6932..8b2fdc345 100644 --- a/docs/backtesting.md +++ b/docs/backtesting.md @@ -561,6 +561,14 @@ BTC trades at 22.000\$ today (0.001 BTC is related to this) - but the backtestin Today's minimum would be `0.001 * 22_000` - or 22\$. However the limit could also be 50$ - based on `0.001 * 50_000` in some historic setting. +#### Trading precision limits + +Most exchanges pose precision limits on both price and amounts, so you cannot buy 1.0020401 of a pair, or at a price of 1.24567123123. +Instead, these prices and amounts will be rounded or truncated (based on the exchange definition) to the defined trading precision. +The above values may for example be rounded to an amount of 1.002, and a price of 1.24567. + +These precision values are based on current exchange limits (as described in the [above section](#trading-limits-in-backtesting)), as historic precision limits are not available. + ## Improved backtest accuracy One big limitation of backtesting is it's inability to know how prices moved intra-candle (was high before close, or viceversa?).