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

"Year to Date" isn't accurate. Remove or add as feature #6

Open
greghint opened this issue Nov 16, 2018 · 2 comments
Open

"Year to Date" isn't accurate. Remove or add as feature #6

greghint opened this issue Nov 16, 2018 · 2 comments

Comments

@greghint
Copy link
Member

The "Year to Date" in portfolio details is not accurate. Need to remove or replace with accurate data.

image

@jwalcorn
Copy link
Member

This should work now, if you have Kafka (such as IBM Event Streams), Mongo, and the Trade History microservice installed. Trade History calculates the percent delta between what you paid for all of your stocks and what they are worth now. Portfolio now exposes a getPortfolioReturns method (GET /{owner}/returns) that provides this percentage as a string. I'll let @rtclauss comment on whether he's actually calling this method. It returns "Unknown" if the call to TradeHistory fails, or if TradeHistory can't get to its Mongo, where it stores the original prices paid for each stock.

@jwalcorn
Copy link
Member

jwalcorn commented Mar 9, 2020

Note we should probably change the label on this to just "Return on Investment", since what TradeHistory returns has no relation to the start of the current calendar year. It's effectively "Beginning-of-time to Date"... ;)

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

2 participants