TheBrookhavenGroup / moneycounter

Portfolio analytic utilities
0 stars 0 forks source link

Use pnl.remove_old_trades() to make realized/unrealized pnl.pnl() more efficient. #30

Closed Schwarzschild closed 1 year ago

Schwarzschild commented 1 year ago

Also, change qsum = qsum[i:] with qsum = qsum.loc[i:] in remove_old_trades()

Schwarzschild commented 1 year ago

see pnl.realized_trades() and make it work like pnl.remove_old_trades() using cumsum to find realized/unrealized boundary in df.

Schwarzschild commented 1 year ago

No longer needed since divide_trades() was added in last PR.