strategy#

API documentation for tradeexecutor.strategy Python module in Trading Strategy.

Module description#

Strategy core - the internal state data structures.

This is the code of the strategy execution engine. We define how the data structures look like and what actions are possible.

All data structures are based on dataclass DLS and dataclasses_json serialisation.

The main tradeexecutor.state.State class serialises the whole strategy execution state in one go and passes it to the web client as one JSON download.

Submodules#

tradeexecutor.strategy.alpha_model

Alpha model and portfolio construction model related logic.

tradeexecutor.strategy.approval

Trade approval models.

tradeexecutor.strategy.asset

Asset management helpers.

tradeexecutor.strategy.cycle

Strategy cycle definitions.

tradeexecutor.strategy.default_routing_options

Default routing options for trading strategies.

tradeexecutor.strategy.dummy

A testing executoin model without actual execution.

tradeexecutor.strategy.dust

Dust amounts and epsilon rounding.

tradeexecutor.strategy.engine_version

Execution engine versioning.

tradeexecutor.strategy.execution_context

Execution modes.

tradeexecutor.strategy.execution_model

Strategy execution model.

tradeexecutor.strategy.fixed_size_risk

Fixed size and unlimited trade size risking.

tradeexecutor.strategy.lending_protocol_leverage

Lendindg protocol leveraged.

tradeexecutor.strategy.output

Helpers for outputting strategy execution information to Python logging and Discord.

tradeexecutor.strategy.pandas_trader

Trading Strategy internal strategy types using Pandas data and decide_trades functino.

tradeexecutor.strategy.parameters

Strategy input parameters handlding.

tradeexecutor.strategy.pricing_model

Asset pricing model.

tradeexecutor.strategy.qstrader

QSTrader portfolio construction model based strategy types.

tradeexecutor.strategy.reserve_currency

Reserve currency options for strategies.

tradeexecutor.strategy.reverse_universe

Universe reverse loading.

tradeexecutor.strategy.routing

Trade routing instructions.

tradeexecutor.strategy.size_risk_model

Size risk management to avoid too large trades and positions.

tradeexecutor.strategy.stop_loss

Stop loss trade logic.

tradeexecutor.strategy.strategy_cycle_trigger

Strategy cycle trigger.

tradeexecutor.strategy.strategy_type

Declarate what kind of strategy types our strategy loader and backtesting framework supports.

tradeexecutor.strategy.tag

Tagging live strategies.

tradeexecutor.strategy.trade_pricing

Trade pricing and price impact.

tradeexecutor.strategy.trading_strategy_universe

Trading Strategy oracle data integration.

tradeexecutor.strategy.tvl_size_risk

TVL-based trade and position size risking.

tradeexecutor.strategy.universe_model

Construct the trading universe for the strategy.

tradeexecutor.strategy.valuation

Valuation models for the portfolio.

tradeexecutor.strategy.weighting

Weighting based portfolio manipulation.