tensortrade.exchanges.asset_exchange module

class tensortrade.exchanges.asset_exchange.AssetExchange[source]

Bases: object

Abstract base class for asset exchanges

abstract balance(symbol)[source]
Return type

float

abstract current_price(symbol, output_symbol)[source]
Return type

float

abstract execute_trade()[source]
abstract has_next_observation()[source]
Return type

bool

abstract initial_balance(symbol)[source]
Return type

float

net_worth(output_symbol)[source]

Calculate the net worth of the current account in this exchange

# Arguments output_symbol: the notional value, that should be used to display the account value

# Returns the total portfolio value of this account

Return type

float

abstract next_observation()[source]
Return type

pandas.DataFrame

abstract observation_space()[source]
Return type

pandas.DataFrame

abstract performance()[source]
Return type

pandas.DataFrame

abstract portfolio()[source]
Return type

Dict[str, float]

profit_loss_percent(output_symbol)[source]

Calculate the percentage change since the initial balance in the output_symbol notional value

Return type

float

abstract reset()[source]
set_dtype(dtype)[source]
set_max_allowed_slippage_percent(max_allowed_slippage_percent)[source]
abstract trades()[source]
Return type

pandas.DataFrame