priceimpact#

tradingstrategy.priceimpact Python module in Trading Strategy framework.

Module description#

Price impact calculations.

Classes#

HistoricalXYPriceImpactCalculator

Calculates the Uniswap slippage, old price and new price based on XY liquidity model.

LiquiditySampleMeasure

For liquidity samples, which measurement we use for a price impact.

PriceImpact

How much price impact a potential trade would have.

Functions#

estimate_xyk_price_impact(liquidity, ...)

Calculates XY liquidity model slippage.