prabusw / beancount-importers-india

Beancount Importer for csv formatted tradebook and transaction reports given by brokers and banks from India. Tested for working with broker Zerodha, RKSV, banks SBI, ICICI Bank,IOB & KVB.
GNU General Public License v3.0
6 stars 0 forks source link

PnL calculation #1

Open ganesshkumar opened 1 year ago

ganesshkumar commented 1 year ago
2017-04-13 * "sell LIQUIDBEES with TradeRef 59283787" 
  Assets:IN:Investment:Zerodha:LIQUIDBEES      -30 LIQUIDBEES {} @ 999.99 INR
  Expenses:Financial:Taxes:Zerodha              30 INR                       
  Assets:IN:Investment:Zerodha:Cash        29969.7 INR                       
  Income:IN:Investment:PnL:LIQUIDBEES  

In this transaction, won't the Income:IN:Investment:PnL:LIQUIDBEES will be always 0 since we are calculating the tax as amount0.001 while amount is quanityprice?

prabusw commented 1 year ago

Dear Ganesh,

The above statement refers to the transaction of LIQUIDBEES through exchange platform using broker Zerodha.

Here a weekly credit of LIQUIDBEES units occur to the demat account and the price on the exchange mostly remains the same, unless someone sells or buys at a higher price.

Here only the quantity changes but not the price. So the adjustment has to made separately and manually because it won't even appear in brokerage trade reports. So an annual manual transaction entry based on the demat holdings must be made by the user as a Buy transaction.

On the day the final sell happens, there might be minor mismatch in the beancount account and actual trade report for the LIQUIDBEES holdings, which must again be corrected manually by adding another buy transaction.

On Sat, 22 Jul 2023 at 14:07, Ganessh Kumar @.***> wrote:

2017-04-13 * "sell LIQUIDBEES with TradeRef 59283787" Assets:IN:Investment:Zerodha:LIQUIDBEES -30 LIQUIDBEES {} @ 999.99 INR Expenses:Financial:Taxes:Zerodha 30 INR Assets:IN:Investment:Zerodha:Cash 29969.7 INR Income:IN:Investment:PnL:LIQUIDBEES

In this transaction, won't the Income:IN:Investment:PnL:LIQUIDBEES will be always 0 since we are calculating the tax as amount0.001 while amount is quanityprice?

— Reply to this email directly, view it on GitHub https://github.com/prabusw/beancount-importers-india/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQRA6MMHHTMPROR2QVRPHS3XROGMXANCNFSM6AAAAAA2TWNAY4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

prabusw commented 1 year ago

ALso, you may want to read the below document to understand beancount accounting for trading. The transaction you quoted should match all the previous Buy transactions to get proper PnL number.

https://beancount.github.io/docs/trading_with_beancount.html#trade-lots

Please close the issue in github, as the txn posting referred is as per the expected behavior from beancount. Thanks.

On Sat, 22 Jul 2023 at 14:40, Prabu Anand Kalivaradhan < @.***> wrote:

Dear Ganesh,

The above statement refers to the transaction of LIQUIDBEES through exchange platform using broker Zerodha.

Here a weekly credit of LIQUIDBEES units occur to the demat account and the price on the exchange mostly remains the same, unless someone sells or buys at a higher price.

Here only the quantity changes but not the price. So the adjustment has to made separately and manually because it won't even appear in brokerage trade reports. So an annual manual transaction entry based on the demat holdings must be made by the user as a Buy transaction.

On the day the final sell happens, there might be minor mismatch in the beancount account and actual trade report for the LIQUIDBEES holdings, which must again be corrected manually by adding another buy transaction.

On Sat, 22 Jul 2023 at 14:07, Ganessh Kumar @.***> wrote:

2017-04-13 * "sell LIQUIDBEES with TradeRef 59283787" Assets:IN:Investment:Zerodha:LIQUIDBEES -30 LIQUIDBEES {} @ 999.99 INR Expenses:Financial:Taxes:Zerodha 30 INR Assets:IN:Investment:Zerodha:Cash 29969.7 INR Income:IN:Investment:PnL:LIQUIDBEES

In this transaction, won't the Income:IN:Investment:PnL:LIQUIDBEES will be always 0 since we are calculating the tax as amount0.001 while amount is quanityprice?

— Reply to this email directly, view it on GitHub https://github.com/prabusw/beancount-importers-india/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQRA6MMHHTMPROR2QVRPHS3XROGMXANCNFSM6AAAAAA2TWNAY4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>