backtest_lib.portfolio.cash#

backtest_lib.portfolio.cash(value: float) Cash#

Create a cash-only portfolio.

This can be used as the initial_portfolio for a Backtest when you want to begin with no holdings.

Parameters:

value – Starting cash value.

Returns:

Cash portfolio with the provided value.