set_text_stats

Defined in fynance.backtest

set_text_stats(underly, period=252, accur=True, perf=True, vol=True, sharp=True, calma=True, underlying='Underlying', fees=0, **kwpred)[source]

Set a table as string with different indicators (accuracy, perf, vol and sharpe) for underlying and several strategies.

Parameters:
underlynp.ndarray[ndim=1, dtype=np.float64]

Series of underlying prices.

periodint, optional

Number of period per day, default is 252.

accurbool, optional

If true compute accuracy else not, default is True.

perfbool, optional

If true compute performance else not, default is True.

volbool, optional

If true compute volatility else not, default is True.

sharpbool, optional

If true compute sharpe ratio else not, default is True.

calmabool, optional

If true compute calmar ratio else not, default is True.

underlyingstr, optional

Name of the underlying, default is ‘Underlying’.

kwpreddict of np.ndarray

Any strategies or predictions that you want to compare.

feesfloat, optional

Fees to apply at the strategy performance.

Returns:
txtstr

Table of results.

See also

PlotBackTest, display_perf