OneDeltaPoolRevaluator#

API documentation for tradeexecutor.ethereum.one_delta.one_delta_valuation.OneDeltaPoolRevaluator Python class in Trading Strategy framework.

class OneDeltaPoolRevaluator[source]#

Bases: EthereumPoolRevaluator

1delta position valuation..

The position is valued in sync_interests and we just return the latest synced data here.

In backtests, we do this differently, so this valuation methd concerns live strategies only.

__init__(pricing_model)[source]#
Parameters:

pricing_model (OneDeltaLivePricing) –

Methods

__init__(pricing_model)

__init__(pricing_model)[source]#
Parameters:

pricing_model (OneDeltaLivePricing) –

__call__(ts, position)[source]#
Parameters:
  • ts (datetime) – When to revalue. Used in backesting. Live strategies may ignore.

  • position (TradingPosition) – Open position

Returns:

(revaluation date, price) tuple. Note that revaluation date may differ from the wantead timestamp if there is no data available.

Return type:

ValuationUpdate