-
Notifications
You must be signed in to change notification settings - Fork 574
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
IB cfd import #1837
base: master
Are you sure you want to change the base?
IB cfd import #1837
Conversation
because netCash contains only commission for CFD
To be honest, I haven't had the time to wrap my head around the short selling. My naive thinking is: How is InteractiveBrokers showing the valuation of your CFD? |
I think "Valutation" is called "Net asset value"? (I'm not to familiar with all these financial terms) In NAV you'll find basically these entries: I' try to find out how it's rated performance wise. Meanwhile I found a bug in the import, which I'm gonna try to fix too: And I have to think about this change here: d57af92 I was about to use |
# Conflicts: # name.abuchen.portfolio.tests/src/name/abuchen/portfolio/datatransfer/IBFlexStatementExtractorTest.java
Improves the processing of the attributes "netCash" and "cost" based on the portfolio-performance#3177 comments from @pfalcon. https://forum.portfolio-performance.info/t/interactive-brokers-flex-query-importer-not-importing-fund-trades/23714/4 Remove CFD Trading transaction Here still unclear how the transaction should be made, as this was not conclusively clarified in PR portfolio-performance#1837. Fix Options and Futures After implementation by PR e99c44d no tests were inserted to verify the function correctly. Since there were also no tests for older tests because they were simply missing, they were added with PR portfolio-performance#3177. Now we fix this testiBFlexStatementFile02() #Trade-3
Improves the processing of the attributes "netCash" and "cost" based on the portfolio-performance#3177 comments from @pfalcon. Improve IBFlex-Query-Importer to support new transaction + Fix portfolio-performance#3280 (comment) from @pfalcon https://forum.portfolio-performance.info/t/interactive-brokers-flex-query-importer-not-importing-fund-trades/23714/4 Remove CFD Trading transaction Here still unclear how the transaction should be made, as this was not conclusively clarified in PR portfolio-performance#1837. Fix Options and Futures After implementation by PR e99c44d no tests were inserted to verify the function correctly. Since there were also no tests for older tests because they were simply missing, they were added with PR portfolio-performance#3177. Now we fix this testiBFlexStatementFile02() #Trade-3 Improve trade date and trade time Fix testiBFlexStatementFile12.xml and testiBFlexStatementFile12() In PR portfolio-performance#3177 the test file was taken from the post https://forum.portfolio-performance.info/t/interactive-brokers/276/122 to check the correct function of the importer. However, this was manipulated in the dates. The element "dateTime" agrees in the specification to the "tradeDate" and deviates by one year. The original test file, but with too much anonymization of the data, can be found in the article https://forum.portfolio-performance.info/t/interactive-brokers/276/115.
Improves the processing of the attributes "netCash" and "cost" based on the #3177 comments from @pfalcon. Improve IBFlex-Query-Importer to support new transaction + Fix #3280 (comment) from @pfalcon https://forum.portfolio-performance.info/t/interactive-brokers-flex-query-importer-not-importing-fund-trades/23714/4 Remove CFD Trading transaction Here still unclear how the transaction should be made, as this was not conclusively clarified in PR #1837. Fix Options and Futures After implementation by PR e99c44d no tests were inserted to verify the function correctly. Since there were also no tests for older tests because they were simply missing, they were added with PR #3177. Now we fix this testiBFlexStatementFile02() #Trade-3 Improve trade date and trade time Fix testiBFlexStatementFile12.xml and testiBFlexStatementFile12() In PR #3177 the test file was taken from the post https://forum.portfolio-performance.info/t/interactive-brokers/276/122 to check the correct function of the importer. However, this was manipulated in the dates. The element "dateTime" agrees in the specification to the "tradeDate" and deviates by one year. The original test file, but with too much anonymization of the data, can be found in the article https://forum.portfolio-performance.info/t/interactive-brokers/276/115.
Support for CFD trades from via "IB Activity Statement" Importer
There is a problem with the cost/netCash however:
Since CFDs are traded with the help of the broker (x% your money, rest from the broker), it doesn't make sens to put the actual value of the underlying in your portfolio. It's not your money. If you sell this position you will not get this amount in your account.
In the IB statement the attribute
netCash
(which is currently used) only contains the fees. And that is the actual value that is withdrawn from your account. Eventually you'll havenetCash - fee = 0
as amount in your portfolio. Rating the performance later based on0
value could be... difficult :)Other attributes are as follows:
which attribute should be the amount? Any ideas?
https://forum.portfolio-performance.info/t/interactive-brokers/276/148
Related issues
#1466 #1736 (it's about selling short, but based on CFD)