vectorbt icon indicating copy to clipboard operation
vectorbt copied to clipboard

Getting Daily PNL Portfolio Change

Open ETTAN93 opened this issue 8 months ago • 0 comments

Is there a way to observe how the daily P&L changes over time?

From the documentation, I only found the method for looking at the list of orders/ list of trades which tracks the PNL of each trade. I am interested in how the returns which change every day in order to plot something like an equity curve.

For example, the code I used:

pf = vbt.Portfolio.from_signals( close=df['close'], entries = df['macd_cross_above_signal'], exits = df['macd_cross_below_signal'], size=1, size_type='amount', init_cash = 1000, direction = 'Both' )

vbt_pf_trades = pf.trades.records_readable vbt_pf_order = pf.orders.records_readable

ETTAN93 avatar Jun 16 '24 21:06 ETTAN93