Comments (14)
@ranisalt, I've supported your specific case in 2.10.2.
from investments.
Да - реверсы и сложные дроби я пока не поддерживаю. Пока что не было примеров, да и сложнее они:
- Часть акций конвертируется в деньги, и это потом надо как-то мапить на FIFO
- Если будет split -> reverse -> split -> reverse - то там получаются какие-то совсем унылые дроби, которые все усложняют еще больше.
Пришлите мне, пожалуйста, свои отчеты на [email protected] (можно обезличить перед отправкой) - по предоставленной вами ссылке я смогу понять только что произошло, а как оно в итоге отобразится в отчетах (в разных местах) - можно только гадать. Там местами бывают сюрпризы, которых совсем не ждешь.
from investments.
@antonrubtsov, если не лень, можете попробовать мой JAL, сплиты тестировали, но у меня не очень много обратной связи по ним было.
from investments.
Спасибо, получил ваш отчет.
Да уж... Сначала поделили имеющееся количество акций - получили бесконечную дробь. Округлили ее до 4 знака после запятой, а затем продали дробную часть. Нет бы сначала продать лишнее, а потом уже спокойно делить. :) Да еще и 3 трейда вместо одного: -N, +N, -N.
Ладно, чтож - буду думать, как это все лучше всего обрабатывать.
from investments.
@antonrubtsov, если не лень, можете попробовать мой JAL, сплиты тестировали, но у меня не очень много обратной связи по ним было.
Попробую обязательно.
from investments.
I'm having the same issue with this split:
SLG(US78440X1019) Split 100000 for 102918 (SLG, SL GREEN REALTY CORP, US78440X8048)
from investments.
Yep, I'm already on it. It's the next feature I'm planning to implement, but I'll need some time.
from investments.
Yep, I'm already on it. It's the next feature I'm planning to implement, but I'll need some time.
Great! Let me know if I can help 👍
from investments.
@antonrubtsov, добавил поддержку в 2.10.0. Не знаю уж, насколько оно готово будет переварить другие сплиты, но постарался сделать достаточно универсальным. Как минимум, ваш отчет теперь обрабатывается без проблем.
Правда, технические сделки от IB, о которых я писал выше, сейчас рассчитываются немного не в том порядке, в каком стоило бы по FIFO, но в вашем случае это ни на что не влияет - все равно копейки/убытки. Это связано с тем, что я пока храню времена сделок датами, а не с точностью до минут. Сделаю уже тогда это отдельным изменением, и проблема должна будет уйти.
from investments.
@KonishchevDmitry hey, neat work there. I am still having a problem with the SLG split, I get this error:
Failed to parse ("Corporate Actions", "Data", "Stocks", "USD", "2021-01-21", "2021-01-20, 20:25:00", "SLG(US78440X1019) Split 100000 for 102918 (SLG.OLD, SL GREEN REALTY CORP, US78440X1019)", "-7", "0", "0", "0", "") record: Unsupported corporate action: "SLG(US78440X1019) Split 100000 for 102918 (SLG.OLD, SL GREEN REALTY CORP, US78440X1019)".
That said, this error occurs when I run investments sync ib
, but not when I run investments rebalance ib
, which outputs outdated values.
from investments.
Does beed376 (released as 2.10.1) help? Do you know why it's named as SLG.OLD
in the corporate action? Does it appear somewhere else as SLG.OLD
?
from investments.
Does beed376 (released as 2.10.1) help?
It changes the error message, but still errors: Unsupported stock split: SLG at 20.01.2021.
Do you know why it's named as
SLG.OLD
in the corporate action?
I have no idea, but I noticed that my stock for SLG was renamed to SLG.OLD, then it was added to the statement as if I have sold all my shares of SLG.OLD and bought SLG immediately:
Corporate Actions,Data,Stocks,USD,2021-01-21,"2021-01-20, 20:25:00","SLG(US78440X1019) Split 100000 for 102918 (SLG, SL GREEN REALTY CORP, US78440X8048)",6.8015,0,0,0,
Corporate Actions,Data,Stocks,USD,2021-01-21,"2021-01-20, 20:25:00","SLG(US78440X1019) Split 100000 for 102918 (SLG.OLD, SL GREEN REALTY CORP, US78440X1019)",-7,0,0,0,
I don't understand what happened very well, it was a split where I could choose whether to receive the value in stocks or in cash, and I chose to receive it in cash.
These are all the entries mentioning SLG in my statement:
Mark-to-Market Performance Summary,Data,Stocks,SLG,0,6,--,72.4400,56.52,0,0,2.54,59.06,
Mark-to-Market Performance Summary,Data,Stocks,SLG,7,0,59.5800,--,11.57053,0,0,13.14,24.71053,
Realized & Unrealized Performance Summary,Data,Stocks,SLG,0,13.1649394,0,0,0,13.1649394,147.495892,0,0,0,147.495892,160.6608314,
Open Positions,Data,Summary,Stocks,USD,SLG,6,1,47.8573515,287.144109,72.44,434.64,147.495892,
Trades,Data,Order,Stocks,USD,SLG,"2021-01-20, 20:25:00",-0.8015,63.8915,63.02,51.20903725,0,-51.20903725,0,0.6985,O
Trades,Data,Order,Stocks,USD,SLG,"2021-01-20, 20:25:00",0.8015,63.8915,62.85,-51.20903725,0,51.20903725,0,-0.8348,Ca
Trades,Data,Order,Stocks,USD,SLG,"2021-01-20, 20:25:00",-0.8015,63.02,62.85,50.51053,0,-37.345591,13.164939,0.1363,C
Trades,SubTotal,,Stocks,USD,SLG,,-0.8015,,,50.51053,0,-37.345591,13.164939,0,
Corporate Actions,Data,Stocks,USD,2021-01-21,"2021-01-20, 20:25:00","SLG(US78440X1019) Split 100000 for 102918 (SLG, SL GREEN REALTY CORP, US78440X8048)",6.8015,0,0,0,
Corporate Actions,Data,Stocks,USD,2021-01-21,"2021-01-20, 20:25:00","SLG(US78440X1019) Split 100000 for 102918 (SLG.OLD, SL GREEN REALTY CORP, US78440X1019)",-7,0,0,0,
Dividends,Data,USD,2021-01-15,"SLG (US78440X1019) Cash Dividend USD 0.373572, STOCK DIVIDEND US78440X1019 279695099 FOR 10000000000 (Ordinary Dividend)",14
Dividends,Data,USD,2021-02-16,SLG(US78440X8048) Cash Dividend USD 0.3033 per Share (Ordinary Dividend),1.82
Dividends,Data,USD,2021-03-15,SLG(US78440X8048) Cash Dividend USD 0.3033 per Share (Ordinary Dividend),1.82
Withholding Tax,Data,USD,2020-09-15,SLG(US78440X1019) Cash Dividend USD 0.295 per Share - US Tax,0.62,
Withholding Tax,Data,USD,2020-09-15,SLG(US78440X1019) Cash Dividend USD 0.295 per Share - US Tax,-0.23,
Withholding Tax,Data,USD,2020-10-15,SLG(US78440X1019) Cash Dividend USD 0.295 per Share - US Tax,0.62,
Withholding Tax,Data,USD,2020-10-15,SLG(US78440X1019) Cash Dividend USD 0.295 per Share - US Tax,-0.23,
Withholding Tax,Data,USD,2020-11-16,SLG(US78440X1019) Cash Dividend USD 0.295 per Share - US Tax,0.62,
Withholding Tax,Data,USD,2020-11-16,SLG(US78440X1019) Cash Dividend USD 0.295 per Share - US Tax,-0.23,
Withholding Tax,Data,USD,2020-12-15,SLG(US78440X1019) Cash Dividend USD 0.295 per Share - US Tax,0.62,
Withholding Tax,Data,USD,2020-12-15,SLG(US78440X1019) Cash Dividend USD 0.295 per Share - US Tax,-0.23,
Withholding Tax,Data,USD,2021-01-15,"SLG (US78440X1019) Cash Dividend USD 0.373572, STOCK DIVIDEND US78440X1019 279695099 FOR 10000000000 - US Tax",-4.2,
Withholding Tax,Data,USD,2021-01-15,"SLG (US78440X1019) Cash Dividend USD 0.373572, STOCK DIVIDEND US78440X1019 279695099 FOR 10000000000 - US Tax",4.2,
Withholding Tax,Data,USD,2021-01-15,"SLG (US78440X1019) Cash Dividend USD 0.373572, STOCK DIVIDEND US78440X1019 279695099 FOR 10000000000 - US Tax",-2.42,
Withholding Tax,Data,USD,2021-02-16,SLG(US78440X8048) Cash Dividend USD 0.3033 per Share - US Tax,-0.55,
Withholding Tax,Data,USD,2021-03-15,SLG(US78440X8048) Cash Dividend USD 0.3033 per Share - US Tax,-0.55,
Change in Dividend Accruals,Data,Stocks,USD,SLG,2021-01-15,2020-12-14,2021-01-15,7,-4.2,0,2,-14,-9.8,Re
Change in Dividend Accruals,Data,Stocks,USD,SLG,2021-01-27,2021-01-28,2021-02-16,6,0.54,0,0.3033,1.82,1.28,Po
Change in Dividend Accruals,Data,Stocks,USD,SLG,2021-01-27,2021-01-28,2021-02-16,6,0.55,0,0.3033,1.82,1.27,Po
Change in Dividend Accruals,Data,Stocks,USD,SLG,2021-01-27,2021-01-28,2021-02-16,6,-0.54,0,0.3033,-1.82,-1.28,Re
Change in Dividend Accruals,Data,Stocks,USD,SLG,2021-02-16,2021-01-28,2021-02-16,6,-0.55,0,0.3033,-1.82,-1.27,Re
Change in Dividend Accruals,Data,Stocks,USD,SLG,2021-02-24,2021-02-25,2021-03-15,6,0.55,0,0.3033,1.82,1.27,Po
Change in Dividend Accruals,Data,Stocks,USD,SLG,2021-03-15,2021-02-25,2021-03-15,6,-0.55,0,0.3033,-1.82,-1.27,Re
Change in Dividend Accruals,Data,Stocks,USD,SLG,2021-03-29,2021-03-30,2021-04-15,6,0.54,0,0.3033,1.82,1.28,Po
Change in Dividend Accruals,Data,Stocks,USD,SLG,2021-03-29,2021-03-30,2021-04-15,6,0.55,0,0.3033,1.82,1.27,Po
Change in Dividend Accruals,Data,Stocks,USD,SLG,2021-03-29,2021-03-30,2021-04-15,6,-0.54,0,0.3033,-1.82,-1.28,Re
Financial Instrument Information,Data,Stocks,SLG,SL GREEN REALTY CORP,464964527,US78440X8048,NYSE,1,REIT,
Financial Instrument Information,Data,Stocks,SLG.OLD,SL GREEN REALTY CORP,6608473,US78440X1019,NYSE,1,REIT,
If you need, I can send my full statement file for your analysis 😄
from investments.
Mmm... It looks like you provided only entries for 2021 year - I don't see initial buy operation. It was 7 shares?
Yet another thing which confuses me:
Dividends,Data,USD,2021-01-15,"SLG (US78440X1019) Cash Dividend USD 0.373572, STOCK DIVIDEND US78440X1019 279695099 FOR 10000000000 (Ordinary Dividend)",14
- it's actually not supported yet (stock dividends) (#27), but may be due to a small number of shares you own, you have received nothing, and that's the reason why it may work now.
So, when I added the following fake trade:
Trades,Data,Order,Stocks,USD,SLG,"2021-01-02, 20:25:00",7,63.8915,63.02,-447.2405,0,51.20903725,0,0.6985,O
and changed the order of lines from
Corporate Actions,Data,Stocks,USD,2021-01-21,"2021-01-20, 20:25:00","SLG(US78440X1019) Split 100000 for 102918 (SLG, SL GREEN REALTY CORP, US78440X8048)",6.8015,0,0,0,
Corporate Actions,Data,Stocks,USD,2021-01-21,"2021-01-20, 20:25:00","SLG(US78440X1019) Split 100000 for 102918 (SLG.OLD, SL GREEN REALTY CORP, US78440X1019)",-7,0,0,0,
to
Corporate Actions,Data,Stocks,USD,2021-01-21,"2021-01-20, 20:25:00","SLG(US78440X1019) Split 100000 for 102918 (SLG.OLD, SL GREEN REALTY CORP, US78440X1019)",-7,0,0,0,
Corporate Actions,Data,Stocks,USD,2021-01-21,"2021-01-20, 20:25:00","SLG(US78440X1019) Split 100000 for 102918 (SLG, SL GREEN REALTY CORP, US78440X8048)",6.8015,0,0,0,
it started to work for my fake statement I've created. May be it'll help you too if my assumptions are correct. :)
If you can send me the full statements ([email protected], you can strip all personal information like your name and account number from them) it will be great. It always significantly increases chances that I will find a free time to support the issue (I always prioritize issues with real statements), that I won't break it in the future (I write regression tests for) and gives me the chance to check all your statement - that the result of all of my calculations matches with real data with zero cent precision.
from investments.
Mmm... It looks like you provided only entries for 2021 year - I don't see initial buy operation. It was 7 shares?
I bought those shares in 2020, and I have one activity statement for 2020 (until 31/12) and one for 2021 (from 01/01). If I should export an activity statement from the very beginning instead, then that might be it 😛
The activity for 2020 regarding SLG is:
Edit: swapping the splits as you suggested has worked.
from investments.
Related Issues (20)
- Ошибка при чтении отчета брокера Открытие по СПб-бирже
- Ошибка при чтении отчетов брокера Открытие для фондового рынка Московской биржи
- Unsupported corporate action: subscribable rights issue HOT 3
- Ошибка при чтении отчетов брокера Открытие для фондового рынка Московской биржи - возмещение за депозитарий HOT 3
- Liquidation event cannot be parsed in an Interactive Brokers report HOT 3
- [Tinkoff] Got an unexpected tax refund HOT 5
- [Tinkoff] Calculated open positions don't match declared ones in the statement HOT 1
- Failed to get quotes from FinEx HOT 5
- There is no manual or help on the tax_remapping syntax HOT 11
- Вопросы первого запуска .investments/db.sqlite" database: Unable to open the database file. HOT 5
- Web App HOT 2
- Пользовательские провайдеры для котировок HOT 9
- Get quotes from Tinkoff OTC market
- Feat: Warning for empty tax statement generation HOT 1
- Failed to parse trade confirmation because of empty date HOT 3
- Invalid record in a broker statement HOT 6
- [Tinkoff] Unknown exchange: "ВНБ" HOT 1
- [Tinkoff] Unsupported cash flow operation: "DVP/RVP" HOT 5
- Upcoming `qtrac-retest` crate deletion HOT 1
- Работа с декларацией в формате .xml HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from investments.