pviotti / degiro-bookkeeper

Simple financial accounting for Degiro.
GNU General Public License v3.0
15 stars 2 forks source link

Does it take into account the 4 weeks rule? #41

Open goenning opened 2 years ago

goenning commented 2 years ago

According to Revenue:

Shares sold within four weeks of acquisition Shares bought and sold within a four-week period cannot be offset against other gains.

You can only deduct the loss from a gain made on a subsequent disposal of same-class shares acquired within the four weeks.

https://www.revenue.ie/en/gains-gifts-and-inheritance/transfering-an-asset/selling-or-disposing-of-shares.aspx

Is this something you intend to add?

pviotti commented 2 years ago

The 4 weeks offset rule is part of the exception to the FIFO rule for Irish Revenue.

So let's say that we implement a --fifo flag to compute earnings the way Irish Revenue wants. With that flag:

I hope that makes sense :slightly_smiling_face:

But I suspect there are edge cases and patterns that I didn't think of, as they don't appear in my own trading record.
So I'd say that my first priority for this tool is to work out basic, generic figures from the account statement, rather than chasing this or that country's definitions of earning for taxation purposes - though I'd welcome contributions to support them.

(related to #38)

goenning commented 2 years ago

Yeah, that makes sense. When I saw the project initially I thought the intention was to build it specifically for Irish users.

I'd just suggest using a country code cli parameter to activate country specific rules, otherwise it'd end up with a lot of different cli flags once more countries are supported.