plot_equity

Defined in fynance.plot

plot_equity(result, ax=None, *, base=None, logy='auto')[source]

Plot an equity curve. Returns the matplotlib Axes.

Parameters:
resultBacktestResult, PriceSeries or array-like

The strategy result (or a raw equity curve).

axmatplotlib.axes.Axes, optional

Axis to draw on; a new one is created when omitted.

basefloat, optional

Rescale the curve to start at base (display only). The default equity starts at the capital (1.0); base=100 gives the familiar base-100 reading without touching the underlying numbers.

logybool or {“auto”}, default “auto”

Use a logarithmic y-axis. "auto" switches to log only when the curve spans more than a 5x range (and stays strictly positive), so a x3-x30 trajectory stays readable while a flat curve is left linear.

Returns:
matplotlib.axes.Axes