diff --git a/docs/configuration.md b/docs/configuration.md
index 47362e525..080ddd046 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -87,6 +87,7 @@ Mandatory parameters are marked as **Required**, which means that they are requi
| `exchange.ccxt_sync_config` | Additional CCXT parameters passed to the regular (sync) ccxt instance. Parameters may differ from exchange to exchange and are documented in the [ccxt documentation](https://ccxt.readthedocs.io/en/latest/manual.html#instantiation)
**Datatype:** Dict
| `exchange.ccxt_async_config` | Additional CCXT parameters passed to the async ccxt instance. Parameters may differ from exchange to exchange and are documented in the [ccxt documentation](https://ccxt.readthedocs.io/en/latest/manual.html#instantiation)
**Datatype:** Dict
| `exchange.markets_refresh_interval` | The interval in minutes in which markets are reloaded.
*Defaults to `60` minutes.*
**Datatype:** Positive Integer
+| `exchange.skip_pair_validation` | Skip pairlist validation on startup.
*Defaults to `false`
**Datatype:** Boolean
| `edge.*` | Please refer to [edge configuration document](edge.md) for detailed explanation.
| `experimental.block_bad_exchanges` | Block exchanges known to not work with freqtrade. Leave on default unless you want to test if that exchange works now.
*Defaults to `true`.*
**Datatype:** Boolean
| `pairlists` | Define one or more pairlists to be used. [More information below](#pairlists-and-pairlist-handlers).
*Defaults to `StaticPairList`.*
**Datatype:** List of Dicts
diff --git a/docs/includes/pairlists.md b/docs/includes/pairlists.md
index ae4ec818d..e6a9fc1a8 100644
--- a/docs/includes/pairlists.md
+++ b/docs/includes/pairlists.md
@@ -35,6 +35,11 @@ It uses configuration from `exchange.pair_whitelist` and `exchange.pair_blacklis
],
```
+By default, only currently enabled pairs are allowed.
+To skip pair validation against active markets, set `"allow_inactive": true` within the `StaticPairList` configuration.
+This can be useful for backtesting expired pairs (like quarterly spot-markets).
+This option must be configured along with `exchange.skip_pair_validation` in the exchange configuration.
+
#### Volume Pair List
`VolumePairList` employs sorting/filtering of pairs by their trading volume. It selects `number_assets` top pairs with sorting based on the `sort_key` (which can only be `quoteVolume`).
diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py
index e74f5668c..2bbdb0d59 100644
--- a/freqtrade/exchange/exchange.py
+++ b/freqtrade/exchange/exchange.py
@@ -124,7 +124,8 @@ class Exchange:
# Check if all pairs are available
self.validate_stakecurrency(config['stake_currency'])
- self.validate_pairs(config['exchange']['pair_whitelist'])
+ if not exchange_config.get('skip_pair_validation'):
+ self.validate_pairs(config['exchange']['pair_whitelist'])
self.validate_ordertypes(config.get('order_types', {}))
self.validate_order_time_in_force(config.get('order_time_in_force', {}))
self.validate_required_startup_candles(config.get('startup_candle_count', 0))
diff --git a/freqtrade/pairlist/StaticPairList.py b/freqtrade/pairlist/StaticPairList.py
index aa6268ba3..3b6440763 100644
--- a/freqtrade/pairlist/StaticPairList.py
+++ b/freqtrade/pairlist/StaticPairList.py
@@ -24,6 +24,8 @@ class StaticPairList(IPairList):
raise OperationalException(f"{self.name} can only be used in the first position "
"in the list of Pairlist Handlers.")
+ self._allow_inactive = self._pairlistconfig.get('allow_inactive', False)
+
@property
def needstickers(self) -> bool:
"""
@@ -47,7 +49,10 @@ class StaticPairList(IPairList):
:param tickers: Tickers (from exchange.get_tickers()).
:return: List of pairs
"""
- return self._whitelist_for_active_markets(self._config['exchange']['pair_whitelist'])
+ if self._allow_inactive:
+ return self._config['exchange']['pair_whitelist']
+ else:
+ return self._whitelist_for_active_markets(self._config['exchange']['pair_whitelist'])
def filter_pairlist(self, pairlist: List[str], tickers: Dict) -> List[str]:
"""