calculate_share_price#

API documentation for tradeexecutor.visual.equity_curve.calculate_share_price Python function.

calculate_share_price(state, initial_share_price=1.0)[source]#

Calculate share price of the strategy.

Share price is the value of a single share in the strategy.

Example:

from tradeexecutor.visual.equity_curve import calculate_share_price

share_price_df = calculate_share_price(state) print(share_price_df)

Returns:

DataFrame with returns, share price USD, NAV.

For the life time of the strategy.

  • share_price_usd: price of a single share in USD

  • returns: cumulative returns

Parameters:

state (State) –

Return type:

DataFrame