stefan-jansen / pyfolio-reloaded

Portfolio and risk analytics in Python
https://pyfolio.ml4trading.io/
Apache License 2.0
389 stars 111 forks source link

PyFolio Roundtrip Error #33

Closed firmai closed 6 months ago

firmai commented 1 year ago

https://colab.research.google.com/drive/17ORtx43vIDSgUI8y0ozKTYf5pdHNtfsa?usp=sharing

Any help would be greatly appreciated

/usr/local/lib/python3.10/dist-packages/pyfolio/round_trips.py in extract_round_trips(transactions, portfolio_value) 244 { 245 "pnl": pnl, --> 246 "open_dt": cur_open_dts[0], 247 "close_dt": dt, 248 "long": price < 0,

IndexError: list index out of range

ava6969 commented 10 months ago

i had this issue when i had fractional quantities in my trades

firmai commented 10 months ago

Yup, I think that is it!

stefan-jansen commented 6 months ago

Pull requests are welcome. Closing for now due to lack of activity; feel free to reopen if you would like to discuss/address.