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

Count of stocks is sometimes a float value, could we round it? #5

Open
bufemc opened this issue May 22, 2021 · 6 comments
Open

Count of stocks is sometimes a float value, could we round it? #5

bufemc opened this issue May 22, 2021 · 6 comments

Comments

@bufemc
Copy link

bufemc commented May 22, 2021

When trying to import myTransactions.csv by "Datei - Importieren" to Portfolio Performance, via:

  • using Wertpapiername for the last column
  • and the last number format in the dropdown (is this correct?)

some stocks in the CSV file have a float amount, e.g. 19,7505 Morphosys. I guess it should normally be 20.

I don't know exactly why, and I guess the fault is for TR, it could be they somehow include their fee in this calculation or so.

A workaround could be to round this number (really, otherwise 19,75 would become 19, which is wrong, but e.g. 19,3 should be 19). This could happen by default or if you really wish you could turn it off by parameter.

Extract to reproduce this:

2021-05-04;Verkauf;20.1461;55.32;1114.48;1.0;CA0084741085;Agnico Eagle Mines
2021-05-04;Verkauf;0.9973;2791.0;2783.4;1.0;US0231351067;Amazon
2021-05-04;Kauf;5.0000;141.95;710.75;1.0;DE0005810055;Deutsche Boerse
2021-05-03;Kauf;50.1497;7.95;399.69;1.0;FR0000054900;Télévision Française 1
2021-04-30;Kauf;100.0000;7.59;760.0;1.0;DE000A289Q91;Schaeffler

Additionally we should enforce to use either . or , when creating the CSV. After importing I was triple-millionaire :)

@Zarathustra2
Copy link
Owner

I don't think this is a mistake. TR allows you to buy fractional shares, that is why the count is a float. You probably bought a fractional share

@bufemc
Copy link
Author

bufemc commented May 23, 2021

No, I never buy fractional shares. Really. Either it is TR which somehow wants to be smart and include the fee, or something else. But also here I might do a breakpoint next time to check out what the unprocessed incoming data is.

For above: I know for 1000% sure I bought 20 Agnico, 1 Amazon, 5 Deutsche Boerse (no fraction), 50 TF1 and 100 Schaeffler (no fraction).

@Jolg42
Copy link

Jolg42 commented Oct 19, 2021

If you buy through the Savings feature which allows to buy every month for example for 100e of one action then it will buy the necessary amount of shares to match the monthly amount defined, likely not an integer. Did you use that maybe?

@bufemc
Copy link
Author

bufemc commented Dec 12, 2021

If you buy through the Savings feature which allows to buy every month for example for 100e of one action then it will buy the necessary amount of shares to match the monthly amount defined, likely not an integer. Did you use that maybe?

NO, really not. Sorry for the late reply. I only buy full (integer) shares. The only time I got fractional shares was once when Stellantis gave out "free papers", but I sold them.

@bufemc
Copy link
Author

bufemc commented Dec 12, 2021

So to settle this, too:

This was once the result:
2021-05-04;Verkauf;20.1461;55.32;1114.48;1.0;CA0084741085;Agnico Eagle Mines

Now it is:
Date;Type;Amount;Value;Price;Fees;ISIN;Name
2021-05-04;Sell;20.2633;55.0;1114.48;1.0;CA0084741085;Agnico Eagle Mines

The "cashChangeAmount": 1114.48, is correct.
But I have no clue how they calculcate the other stuff, even if I add/subtract 1 Euro fee, I don't get it..

	{
		"type": "timelineEvent",
		"data": {
			"id": "***",
			"timestamp": 1620136190924,
			"icon": "https://assets.traderepublic.com/img/icon/timeline/Arrow-Left.png",
			"title": "Agnico Eagle Mines",
			"body": "Limit Sell order executed at 55.32 \u20ac\nProfit: \ufffc 3.35 %",
			"cashChangeAmount": 1114.48,
			"action": {
				"type": "timelineDetail",
				"payload": "***"
			},
			"attributes": [
				{
					"location": 45,
					"length": 8,
					"type": "positiveChange"
				}
			],
			"month": "2021-05"
		}
	},

@raptor0815
Copy link

I think the time line event is not sufficiently detailed. The number if shares is missing so the tax can not be calculated. or the other way: shares can not be calculated without knowing the fees/taxes. Is there a way to access fees/taxes/shares with the API?

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

4 participants