krambox / moneymoney-ibkr

Inofficial IBKR Extension for MoneyMoney and EUR Accounts.
MIT License
14 stars 1 forks source link

Währungseinstellungen #4

Open andre68723 opened 2 years ago

andre68723 commented 2 years ago

Hi Kai,

danke für die super extension, genau das hatte mir in MM noch gefehlt. Es funktioniert, nur die Performance-Berechnung und Kurse sind für mich anders als im AM-Portfolio.

Die Basiswährung ist EUR, alle Positionen sind jedoch US.

Bsp: Kauf 65 Stück zu 19,96 USD. Aktueller Kurs 15,11 USD Client Portal zeigt Gesamtrendite -24% an ✅

Money Money: Kaufkurs 22,60€ Aktueller Kurs 13,76€ Verlust: -39%

An welche Stelle habe ich etwas falsch eingestellt - sollte evtl "Wechselkurse mit einbeziehen auf Nein" ?

Danke, Andre

krambox commented 2 years ago

Hallo, an dem Thema mit den Währungen wird gerade noch geschraubt. Das ist nicht so einfach in MM. Ich hoffe in nächsten Version wird das etwas besser

andre68723 commented 2 years ago

Danke für die Rückmeldung.

Ich habe es nochmal überprüft, die Gesamtsumme für das Portfolio ist identisch mit dem AM, der Betrag der Position ebenfalls.

Bei Kaufkurs/aktueller Kurs und der darauf basierenden Berechnung von Gewinn/Verlust % und absolut kommt es dann zu den Abweichungen

1) IB Account 65 Stück Buy in: 19,96$ Total: -1.297,40 USD Current: 15,15$ Total: 984,75 USD Loss: -312,65 USD / -24%

2) MoneyMoney Kaufkurs 22,60€ ❌ (*1.132) Aktueller Kurs 13,37€ (ca 15,15$) ✅ / 868,85€ ✅ Verlust: -600,08€ / -40,85%

Die eigentliche Ursache scheint also der Kaufkurs zu sein. Wenn der USD-Kurs statt dem errechneten *1.132 = 22,60 durch /1,13 dividiert würde käme es in etwa hin (19,96/1,132 = ~ 17,62 )

Gestern sollte der Kurs bei 1.14 gewesen sein, vielleicht daher eine minimale Abweichung.

XML: <OpenPosition accountId="foo" acctAlias="bar" model="" currency="USD" fxRateToBase="0.87331" assetCategory="STK" symbol="SYMBOL" description="my Holding" conid="493464130" securityID="foobar" securityIDType="ISIN" cusip="foobar" isin="foobar" listingExchange="NYSE" underlyingConid="" underlyingSymbol="" underlyingSecurityID="" underlyingListingExchange="" issuer="" multiplier="1" strike="" expiry="" putCall="" principalAdjustFactor="" reportDate="20220204" position="65" markPrice="15.15" positionValue="984.75" openPrice="19.990769231" costBasisPrice="19.990769231" costBasisMoney="1299.4" percentOfNAV="10.00" fifoPnlUnrealized="-314.65" side="Long" levelOfDetail="SUMMARY" openDateTime="" holdingPeriodDateTime="" vestingDate="" code="" originatingOrderID="" originatingTransactionID="" accruedInt="" serialNumber="" deliveryType="" commodityType="" fineness="0.0" weight="0.0 ()"/>

enter286 commented 1 year ago

For everyone reading this, the 0.1 version that you can find at https://moneymoney-app.com/extensions/ does work fine if you make one small change on line 88

from

exchangeRate = pos.fxRateToBase

to

exchangeRate = 1 / pos.fxRateToBase,
amount = pos.positionValue * pos.fxRateToBase

I see this has been fixed already in the current codebase, but as this version didn't work for me, I was looking for a solution to fix the currency conversion for the Kaufpreis.

krambox commented 1 year ago

Thank you, I have now also released the version 0.2 right away.

enter286 commented 1 year ago

There was still a problem with the currency conversion in v0.2 I submitted this PR to fix it: https://github.com/krambox/moneymoney-ibkr/pull/8