vectorbt
vectorbt copied to clipboard
Percentage exposure Time Strategy
Hi
It is possible to calculate the percentage exposure time of a strategy with vectorbt
from pf.trades.records_readable, you can take the delta of entry and exit times to get a column for duration and work from there. Then run your calculations from that column. Not sure if there was some other easier way
trade_tbl['duration'] = trade_tbl['Exit Timestamp'] - trade_tbl['Entry Timestamp']
This issue is stale because it has been open for 90 days with no activity.