Closed Riba77 closed 1 month ago
Iz izpisa izgleda kot da imaš v XMLju iz IBKRja zaveden davek od dividende, same dividende pa ne. Lahko preveriš?
CashTransaction accountId="" acctAlias="" model="" currency="CHF" fxRateToBase="1.0345" assetCategory="STK" subCategory="COMMON" symbol="LOGN" description="LOGN(CH0025751329) CASH DIVIDEND CHF 1.06 PER SHARE - CH TAX" conid="39999891" securityID="CH0025751329" securityIDType="ISIN" cusip="" isin="CH0025751329" figi="BBG000CYR5S0" listingExchange="EBS" underlyingConid="" underlyingSymbol="" underlyingSecurityID="" underlyingListingExchange="" issuer="" issuerCountryCode="" multiplier="1" strike="" expiry="" putCall="" principalAdjustFactor="" dateTime="20230927;202000" settleDate="20230927" amount="-20.78" type="Withholding Tax" tradeID="" code="" transactionID="586285294" reportDate="20230928" clientReference="" actionID="122514923" levelOfDetail="DETAIL" serialNumber="" deliveryType="" commodityType="" fineness="0.0" weight="0.0"
Same dividende ne najdem v zgornjem CashTransactionu, je pa v "descriptnon" naveden amount.
ib-edavki
za izračun potrebuje tudi CashTransaction
vnos od konkretne dividende. Drži sicer, da bi lahko sparsali tudi vrednost iz description
parametra vnosa za davek, ampak za enkrat ni bilo potrebe po tem.
Vse skupaj je precej nenavadno. Ostale dividende pa vidiš pod CashTransactions
?
Identicno pri ostalih dividendah. Lahko ti pošljem xml in pregledaš, ker tudi meni ni čisto jasno. Kje naj bi bile vrednosti dividend definirane, iz kje jo parsate, če ne iz "description".
Si izvozil dividende v poročilu? Preveri 7. točko navodil za izvoz: https://github.com/jamsix/ib-edavki?tab=readme-ov-file#izvoz-poro%C4%8Dila-v-platformi-interactivebrokers
Lahko ti osebno pošljem še XML.
Če si imel dividende, ampaj jih ni v IB XML exportu z nastavitvami, kot si jih prikazal zgoraj, se boš moral obrnit na IB support.
Takole nekako izgleda pravilen report, vsak type=Dividends
ima matching type=Withholding Tax
:
<CashTransaction acctAlias="" model="" currency="USD" fxRateToBase="0.90814" assetCategory="STK" symbol="URNM" description="URNM(US85208P3038) PAYMENT IN LIEU OF DIVIDEND - US TAX" conid="558207272" securityID="US85208P3038" securityIDType="ISIN" cusip="85208P303" isin="US85208P3038" listingExchange="ARCA" underlyingConid=""dateTime="20231221;202000" settleDate="20231221" amount="-27.84" type="Withholding Tax" tradeID="" code="" reportDate="20231221" clientReference="" levelOfDetail="DETAIL" serialNumber="" deliveryType="" commodityType="" fineness="0.0" weight="0.0" subCategory="ETF" figi="BBG016ZGFKV6" issuerCountryCode="US" />
<CashTransaction acctAlias="" model="" currency="USD" fxRateToBase="0.90814" assetCategory="STK" symbol="URNM" description="URNM(US85208P3038) CASH DIVIDEND USD 1.75096 PER SHARE - US TAX" conid="558207272" securityID="US85208P3038" securityIDType="ISIN" cusip="85208P303" isin="US85208P3038" listingExchange="ARCA" underlyingConid=""dateTime="20231221;202000" settleDate="20231221" amount="-11.56" type="Withholding Tax" tradeID="" code="" reportDate="20231221" clientReference="" levelOfDetail="DETAIL" serialNumber="" deliveryType="" commodityType="" fineness="0.0" weight="0.0" subCategory="ETF" figi="BBG016ZGFKV6" issuerCountryCode="US" />
<CashTransaction acctAlias="" model="" currency="USD" fxRateToBase="0.90814" assetCategory="STK" symbol="URNM" description="URNM(US85208P3038) CASH DIVIDEND USD 1.75096 PER SHARE (Ordinary Dividend)" conid="558207272" securityID="US85208P3038" securityIDType="ISIN" cusip="85208P303" isin="US85208P3038" listingExchange="ARCA" underlyingConid=""dateTime="20231221;202000" settleDate="20231221" amount="77.04" type="Dividends" tradeID="" code="" reportDate="20231221" clientReference="" levelOfDetail="DETAIL" serialNumber="" deliveryType="" commodityType="" fineness="0.0" weight="0.0" subCategory="ETF" figi="BBG016ZGFKV6" issuerCountryCode="US" />
<CashTransaction acctAlias="" model="" currency="USD" fxRateToBase="0.90814" assetCategory="STK" symbol="URNM" description="URNM(US85208P3038) PAYMENT IN LIEU OF DIVIDEND (Ordinary Dividend)" conid="558207272" securityID="US85208P3038" securityIDType="ISIN" cusip="85208P303" isin="US85208P3038" listingExchange="ARCA" underlyingConid=""dateTime="20231221;202000" settleDate="20231221" amount="185.6" type="Payment In Lieu Of Dividends" tradeID="" code="" reportDate="20231221" clientReference="" levelOfDetail="DETAIL" serialNumber="" deliveryType="" commodityType="" fineness="0.0" weight="0.0" subCategory="ETF" figi="BBG016ZGFKV6" issuerCountryCode="US" />
<CashTransaction accountId="" acctAlias="" model="" currency="EUR" fxRateToBase="1" assetCategory="STK" subCategory="COMMON" symbol="BAYNd" description="BAYN(DE000BAY0017) CASH DIVIDEND EUR 2.40 PER SHARE - DE TAX" conid="29612150" securityID="FR0000121014" securityIDType="ISIN" cusip="" isin="FR0000121014" figi="BBG000BC7Q05" listingExchange="SBF" underlyingConid="" underlyingSymbol="" underlyingSecurityID="" underlyingListingExchange="" issuer="" issuerCountryCode="FR" multiplier="1" strike="" expiry="" putCall="" principalAdjustFactor="" dateTime="20231206;202000" settleDate="20231206" amount="-13.75" type="Withholding Tax" tradeID="" code="" transactionID="630683980" reportDate="20231207" clientReference="" actionID="122868011" levelOfDetail="DETAIL" serialNumber="" deliveryType="" commodityType="" fineness="0.0" weight="0.0" />
Tako nekako zgleda dividenda, pri kateri dobim zgoraj omenjen error.
<CashTransaction accountId="" acctAlias="" model="" currency="EUR" fxRateToBase="1" assetCategory="STK" subCategory="COMMON" symbol="BAYNd" description="BAYN(DE000BAY0017) CASH DIVIDEND EUR 2.40 PER SHARE - DE TAX" conid="29612150" securityID="FR0000121014" securityIDType="ISIN" cusip="" isin="FR0000121014" figi="BBG000BC7Q05" listingExchange="SBF" underlyingConid="" underlyingSymbol="" underlyingSecurityID="" underlyingListingExchange="" issuer="" issuerCountryCode="FR" multiplier="1" strike="" expiry="" putCall="" principalAdjustFactor="" dateTime="20231206;202000" settleDate="20231206" amount="-13.75" type="Withholding Tax" tradeID="" code="" transactionID="630683980" reportDate="20231207" clientReference="" actionID="122868011" levelOfDetail="DETAIL" serialNumber="" deliveryType="" commodityType="" fineness="0.0" weight="0.0" />
@Riba77 tole zgleda "narobe". Glede na symbol
in isin, ki je v description
polju bi to naj bila delnica Bayerja; glede na vrednost v isin
polju in to, da je država izdajatelja Francija pa LVMH.
Sem naletel na isti issue. Pri meni je bila napaka v queryju/exportu iz IBKR. "Dividends" option se je sam od sebe odkljukal v exportu.
Preveri, če "Cash Transactions" section tvojega flex query-ja (ko je ze enkrat kreiran in gres v edit mode) zgleda tako:
namesto
Nevem zakaj pride do napake, sem pa opazil, da se mi pravili settingi shranijo, če:
Crash se zgodi zaradi buga opisanega v komentarju tukaj.
V kolikor se zedinimo o željenem obnašanju obnašanju bom naredil pull request s fixom.
V obeh primerih bo crash rešen. Drugega pa skripta ne more v tem primeru.
Zdravo.
Ne uspe mi sparsati xmlja, kljub temu da kompanijo dodam na listo v companies.xml file. Kaksna ideja kaj je narobe?
Error: Doh-KDVP.xml created (includes no trades) D-IFI.xml created (includes no trades) Cannot find a matching dividend for LOGN(CH0025751329) CASH DIVIDEND CHF 1.06 PER SHARE - CH TAX (20230927;202000) of -20.78. Traceback (most recent call last): File "C:\Users\hri79002\AppData\Roaming\Python\Python311\Scripts\ib_edavki-script.py", line 33, in
sys.exit(load_entry_point('ib-edavki==1.4.6', 'console_scripts', 'ib_edavki')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\hri79002\AppData\Roaming\Python\Python311\site-packages\ib_edavki.py", line 1186, in main
closestDividend["taxEUR"] += closestDividendTax / getCurrencyRate(
^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'closestDividend' where it is not associated with a value
LP Roman