equity_curve#

API documentation for tradeexecutor.visual.equity_curve Python module in Trading Strategy.

Module description#

Equity curve based statistics and visualisations.

For more information see the narrative documentation on Profitability calculations.

Functions#

calculate_aggregate_returns(equity_curve[, freq])

Calculate strategy aggregatd results over different timespans.

calculate_compounding_realised_trading_profitability(state)

Calculate realised profitability of closed trading positions, with the compounding effect.

calculate_compounding_unrealised_trading_profitability(...)

Calculate the current profitability of open and closed trading positions, with the compounding effect.

calculate_cumulative_daily_returns(state[, ...])

Calculates the cumulative daily returns for the strategy over time

calculate_cumulative_return(returns)

Calculate cumulative returns for the equity curve.

calculate_daily_returns(state[, freq])

Calculate daily returns of a backtested results.

calculate_deposit_adjusted_returns(state[, freq])

Calculate daily/monthly/returns on capital. z See Profitability calculations for more information.

calculate_equity_curve(state[, ...])

Calculate equity curve for the portfolio.

calculate_investment_flow(state)

Calculate deposit/redemption i nflows/outflows of a strategy.

calculate_long_compounding_realised_trading_profitability(state)

calculate_non_cumulative_daily_returns(state)

Calculates the the non cumulative daily returns for the strategy over time.

calculate_realised_profitability(state)

Calculate realised profitability of closed trading positions.

calculate_returns(equity_curve)

Calculate returns of an equity curve.

calculate_rolling_sharpe(returns[, freq, ...])

Calculate rolling Sharpe ration.

calculate_short_compounding_realised_trading_profitability(state)

calculate_size_relative_realised_trading_returns(state)

Calculate realised profitability of closed trading positions relative to the portfolio size..

extract_compounding_unrealised_trading_profitability_portfolio_statistics(state)

Get the statistics out from the summary profit data.

generate_buy_and_hold_returns(...)

Create a benchmark series based on price action.

resample_returns(returns, freq)

Resample returns series to a longer time frame.

visualise_equity_curve(returns[, title, ...])

Draw equity curve, drawdown and daily returns using quantstats.

visualise_returns_distribution(returns)

Breakdown the best day/month/yearly returns

visualise_returns_over_time(returns)

Draw a grid of returns over time.