Files
aiomql/docs/core/backtesting/backtest_account.md
T
Ichinga Samuel 2e7aa73aec v4
2024-11-15 21:13:19 +01:00

2.0 KiB

BackTestAccount

Table of Contents

BackTestAccount

@dataclass
class BackTestAccount:

The BackTestAccount class provides data structure for managing account data specifically for backtesting purposes.

Attributes:

Name Type Description
balance float The account balance for the backtest
equity float The equity value of the account during the backtest
currency str The currency type used in the backtesting account
leverage float Leverage ratio applied to the backtest account
spread int Spread value applied to simulated trades

get_dict

def get_dict(exclude: set = None, include: set = None) -> dict

Returns a dictionary representation of the account data. The exclude and include parameters allow filtering of data keys.

Arguments:

Name Type Description
exclude set A set of attribute names to exclude from the dictionary.
include set A set of attribute names to include in the dictionary.

asdict

def asdict() -> dict

Returns a dictionary of all attributes in the account data without filtering.

set_attrs

def set_attrs(**kwargs)

Sets multiple attributes at once by passing key-value pairs as keyword arguments.