Skip to content

GeneralConfig


dataclass backtide.config.GeneralConfig

Portfolio-wide settings.

Attributes

base_currency : Currency, default="USD"

ISO 4217 currency code that all prices are normalized to.

triangulation_strategy : TriangulationStrategy, default="direct"
With which approach to convert currencies to base_currency. Read more in the user guide.

triangulation_fiat : Currency, default="USD"
The fiat currency used as an intermediate between a fiat currency and base_currency. This method is chosen when no direct conversion path exists or when this method has longer history and triangulation_strategy="earliest" For example, if converting PLN -> THB and no PLN-THB pair is available, the engine will route through this currency as PLN -> triangulation_fiat -> THB. The chosen currency is expected to have pairs with all the currencies the project works with.

triangulation_crypto : str, default="USDT"
The cryptocurrency used as an intermediate when no direct conversion path exists between a crypto and base_currency. For example, to calculate the value of BTC, the engine will route BTC -> triangulation_crypto -> triangulation_crypto_pegged -> base_currency. The selected crypto is expected to be a stablecoin pegged to the triangulation_crypto_pegged fiat currency.

triangulation_crypto_pegged : str, default="USD"
The fiat currency to which triangulation_crypto is pegged, for the purposes of bridging between the crypto and fiat conversion graphs. When a conversion path crosses the crypto/fiat boundary, the engine treats triangulation_crypto/triangulation_crypto_pegged as the crossing pair at parity 1:1.

log_level : LogLevel, default="warn"
Minimum tracing log level. Choose from: "error", "warn", "info", "debug".


See Also

get_config

Get a copy of the current global configuration.

load_config

Load a backtide configuration from a file.

set_config

Set the global configuration.


Methods

to_dict Convert the configuration object to a dictionary.


method backtide.configto_dict()

Convert the configuration object to a dictionary.

Returns

dict

Self as dict.