-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add Margin support #64
Conversation
due it now seperating losses form gains this should be fine because now tist is seperated from spot gains |
I am not that familiar with the taxation of margin trades. But aren't these CFD? And CFD are taxed with "Kapitalertragssteuer" (25%)? Plead add an description/explanation on margin trade to the readme and cite a trustworthy source. Beside that. Regarding your implementation. Why shouldn't we combine Operation.Buy with Operation.MarginBuy and Operation.Sell with Operation.MarginSell? It looks unnecessary to me, to keep the if cases separated. |
Accointing (a german online service for crypto taxation) lists profits and losses from margin trading in a seperate colummn. yes "Kapitalertragssteuer" (25%) apply here but losses from margin trading are complicated, so to help that both wins and losses are displayed seperately:
https://winheller.com/blog/verluste-bitcoin-kryptowaehrungen-steuererklaerung/ now that you say that the duplication does not make sense anymore, because at first i tried to seperate margin and spot but that doesn't work that well, but on the export the MarginBuy and sell does help differntiate a little especially for debugging |
Should We maybe name it |
I'd prefer if the taxation type is the same as the name from the tax report. We might additional information behint it to separate them for debugging and visitations purposes. E.g. just "Sonstige Einkünfte" or "Sonstige Einkünfte: Margin Verlust" |
Please check other sources too. Crypto taxation is quite a gray area. Whinheller might be a good start, but they might be too "Crypto friendly". Summarize your findings in the readme. |
Hey, Winheller published an article in October that goes more into detail: https://winheller.com/blog/besteuerung-future-margin-trading/
For my understanding that means if a margin position is closed, the gain/loss falls under income from capital (25%), and if a position is settled (you buy/sell the coin at the end with the starting price), you can treat it just as spot trades. Additionally, according to the article, fees for futures may not be subtracted from the capital income, as they fall under "Werbungskosten" and are already covered by the standard deduction / "Pauschbetrag", and losses may only be considered up to 20k with the new regulation. In my opinion, this applies then to closed positions. |
We should still calculate the "Werbungskosten" in case the user has more expenses than the "Pauschbetrag". Please update the README file with the Winheller explanation and a small text summarizing the findings. |
Hey @provinzio @scientes, I did more digging into the margin trading topic and summarized my findings in the readme: It would be great if you could review and let me know if you have the same understanding concerning margin taxation. One point where I'm still unsure is if merely giving the investor the option of closing or settling a position already leads to a "Termingeschäft", or if this is decided when the trade is settled/closed. In the first case, we may need to add this to the summary:
|
Definition of a future ("Termingeschäft") from wikipedia. My understanding of margin trades were that these are always CFDs ("Differentkontakte") and therefore are taxed as "Kapiteleinkünfte". Regardless of whether it is a future ("Termingeschäft"). The differentiation between a future trade and a normal trade irritates me. As far as I thought, regarding the taxation, it doesn't matter when the trade is fullfilled. Edit: Margin trades are basically trades with borrowed capital. On stock exchanges, i only ever know margin trades in the form of CFDs. I am not aware of any other forms (like "normale trading" where you receive the goods) Feel free to prove me wrong :) |
For the exchanges that I've seen, there's always a distinction between futures and margin trading. Compared to futures (with or without leverage), margin trading is spot trading with leverage. This is also what Kraken states:
I'm pretty certain that (classical) "closed" margin trades (which lead to the payment of the difference in value) are per definition CFDs/"Differenzkontrakte" and therefore "Termingeschäfte" (similar to classical futures). This also agrees with multiple articles / forum threads. For "settled" margin trades (that lead to the delivery of the asset for the base price, not the difference in value), it could be different (I also found this opinion in a couple of threads).
For the exchanges I know, margin trades can be settled at any non-predefined point in time (for Kraken up to a duration of max. 365 days). This argument would also apply to "closed" margin trades, if they wouldn't already be CFDs.
Argument 3: Accointing gives this example scenario:
The example scenario on Accointing continues as follows:
At least for Kraken, the user has the option of "settling" (delivery of asset) or "closing" (difference in value) a margin trade, the decision is open until the end. In summary, I arrive at this understanding:
|
Ah ok. Sounds good. Thanks for the detailed explanation. |
Stale. Further worked on in #120 |
This needs to be tested further
closes #52
and i'm not sure if the gain/loss calculation is 100% correct because i'm not sure if we'd need to make seperate balance counters for margin and spot, but seperating those would be a major hassle