ezyquant.backtesting.context.Context.buy_pct_port#

Context.buy_pct_port(pct_port: float) float#

Calculate buy volume from the percentage of the portfolio.

Parameters:

pct_port (float) – percentage of the portfolio

Returns:

buy volume, always positive, not round 100

Return type:

float