Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Daily PNL Portfolio Change #717

Open
ETTAN93 opened this issue Jun 16, 2024 · 0 comments
Open

Getting Daily PNL Portfolio Change #717

ETTAN93 opened this issue Jun 16, 2024 · 0 comments

Comments

@ETTAN93
Copy link

ETTAN93 commented Jun 16, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant