portfolio-performance / portfolio

Track and evaluate the performance of your investment portfolio across stocks, cryptocurrencies, and other assets.
http://www.portfolio-performance.info
Eclipse Public License 1.0
2.91k stars 600 forks source link

Buying on exchange A and selling on exchange B #2210

Open rounakdatta opened 3 years ago

rounakdatta commented 3 years ago

Is your feature request related to a problem? Please describe. In certain countries (e.g. India), it is supported by the securities authority to buy delivery shares at one exchange and sell them at a later day at another exchange. So, when such a tradebook is imported to PorfolioPerformance, it is reporting inconsistency and negative share balance.

For example, we can buy a share on NSE on T=0 and sell it on BSE on T=3.

Describe the solution you'd like I understand that it is an anti-pattern, but maybe if we could allow grouping of certain exchanges, that might help in creating inter-exchange transactions.

Describe alternatives you've considered There can only be one alternative to it: Choose a favourite exchange and do some transformations in the tradebook to make all the orders behave like as if from that exchange. This would lead to loss of some information (exchange info), but works fine as long as the prices across are exchanges are almost same.

ghost commented 3 years ago

The security account is independent from the exchange where you buy or sell the securities, so there is no benefit for your feature even for the historical prices as they only estimated the profit/loss till you've sell them. However, maybe you should explain more in detail what you're expecting and what actually is not working as you expect.

rounakdatta commented 3 years ago

True, but what if the security ticker name is different across the two exchanges? I agree with you, having two securities (e.g. INFY.NS at one and INFY.BO at the other) and supporting inter-transaction rather complicates the analysis as well as the software.

chirlu commented 3 years ago

The ticker symbol is only relevant for retrieving quotes via some sources (in particular Yahoo Finance). Hence …

but what if the security ticker name is different across the two exchanges?

Then it’s different. So what?

iwalucas commented 3 years ago

Do you have 2 security accounts? One per exchange? I would suggest having one, and keeping the security as one also. I have purchase securities in one exchange and migrated to another and sold there, without an issue... in this case I have 2 deposit accounts (one per exchange) with 1 security account.