trevorwelch / rh-profit-and-loss

Get profit and loss for your trading on Robinhood, export trades/dividends/options history, generate buy-and-hold comparison
39 stars 13 forks source link

Add ROI and profit/day? #1

Open Tjorriemorrie opened 5 years ago

Tjorriemorrie commented 5 years ago

I just read the article without looking much into to code, but was wondering if you shouldn't provide an ROI metric and a profit/day metric? Just seems better for comparability

trevorwelch commented 5 years ago

Cool idea! The profit/day requires a bit more thought, but I banged out the ROI suggestion 👍

It assumes that you didn't add any funds from your starting allocation - I think it would be tricky to do otherwise 🤔

klepsydra commented 5 years ago

@trevorwelch It's a bit more coding, but a better way would be to sum up all deposits and withdrawals (up till the ending period you're checking) and treat that as your initial capital. Otherwise, ignoring such transactions produces useless results. Accounts like mine constantly supply income (and sometimes deplete).

It's actually more complicated than that for Robinhood https://robinhood.engineering/tracking-temporal-data-at-robinhood-b62291644a31 (they maintain a bitemporal database), but the above simplification could be sufficient for most individuals.

trevorwelch commented 5 years ago

I'm not actively working on this right now, but agree that could be better. If I remember correctly, my original code on this should ignore deposits and withdrawals and only pay attention to trades -- you can at least get some useful idea of your performance out of this.

Open to a PR @klepsydra if you want to add deposit/withdrawal tracking as well!