Closed Visema closed 4 months ago
That is correct BittyTax does not currently handle futures trades, only spot trades.
As it works today, the buy trade is given a GBP valuation at the time of purchase which is used as the acquisition cost for the section 104 holding of that asset (i.e. ETH).
When the ETH is sold (a disposal) another valuation is made in GBP which gives the proceeds required for the GCT calculation, buy/sell fees are also taken into consideration.
I need to read up on the tax laws for futures, but assume each asset/currency pair would need to be held in a separate pool (not section 104) to calculate the gain/loss correctly?
CAVEAT: I am not a tax expert or an accountant
this is my understanding of how it should work: Assume same day trade BUY 3 ETH-USD 25-DEC-2020 FUTURES at 360.00 Commission USD 2.0 Sell 3 ETH-USD 25-DEC-2020 FUTURES at 370.00 Commission USD 2.0
Calculation = (3 370) - 2 – (3 360) – 2 = PROFIT of USD 26 which once converted into GBP at the relevant exchange rate, say GBPUSD=1.30, equals GBP 20
I believe Same Day, 30d B&B and 104-S rules would still apply
hi just wondering if there is any update on this issue . tks
I've been reading up on the taxation rules for futures, the consensus is that crypto futures trading is liable for income tax not capital gains. The quote below is taken from here https://www.gov.uk/hmrc-internal-manuals/capital-gains-manual/cg56004.
Profits from transactions in commodity and financial futures dealt in on a futures exchange which is not recognised will be liable to tax as income if the transactions do not amount to trading.
The list of recognised futures exchanges is given here: https://www.gov.uk/hmrc-internal-manuals/capital-gains-manual/cg56120. As you can guess, no crypto trading exchanges are included, maybe that will change in the future.
I'm working on a parser for Deribit which will include a new income type Futures
, once that's implemented you can enter your futures profit/loss manually for other exchanges, or additional parsers can be added, out of interest which exchange did you use for your futures trading?
Hi and thank you for your reply I use Binance and Deribit to trade options and futures and will be looking at Coinflex soon as they are the only one that have physical delivery ( the others have vash settlement) will look into the hmrc link carefully and revert back thank you
On 29 Dec 2020, at 14:16, Scott Green notifications@github.com wrote:
I've been reading up on the taxation rules for futures, the consensus is that crypto futures trading is liable for income tax not capital gains. The quote below is taken from here https://www.gov.uk/hmrc-internal-manuals/capital-gains-manual/cg56004.
Profits from transactions in commodity and financial futures dealt in on a futures exchange which is not recognised will be liable to tax as income if the transactions do not amount to trading.
The list of recognised futures exchanges is given here: https://www.gov.uk/hmrc-internal-manuals/capital-gains-manual/cg56120. As you can guess, no crypto trading exchanges are included, maybe that will change in the future.
I'm working on a parser for Deribit which will include a new income type Futures, once that's implemented you can enter your futures profit/loss manually for other exchanges, or additional parsers can be added, out of interest which exchange did you use for your futures trading?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/BittyTax/BittyTax/issues/22#issuecomment-752091295, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQ3CO2RWYWJMBMWD3BG7V5DSXHQDXANCNFSM4QX3Y4CA.
I am reading the HMRC link. It says in the very beginning:
Specific legislation provides that certain disposals which would have been dealt with under the capital gains rules are instead to give rise to income profits or losses. This applies:
for Corporation Tax purposes only, where the futures fall within the legislation in Part 7 CTA09 (Derivative Contracts). (Or previously, within the legislation in FA02 (Derivative Contracts), or FA94 (Financial Instruments)). See CFM50000+. or in cases where schemes or arrangements involving the use of futures or/and options are designed to give a guaranteed return, see Chapter 12 Part 4 ITTOIA05 and CG56200. (Or previously ICTA88/Sch5AA, which applied also for Corporation Tax until such options and futures were brought within the FA02 rules for derivative contracts.)
Individuals trading in crypto futures fall in neither of the two cases mentioned, so tax treatment should be CGT, not income.
Also, the freshly released manual gives a bit (pun intended) more clarity: https://www.gov.uk/hmrc-internal-manuals/cryptoassets-manual/crypto20050
In the vast majority of cases, individuals hold cryptoassets as a personal investment, usually for capital appreciation or to make particular purchases. They will be liable to pay Capital Gains Tax when they dispose of their cryptoassets.
Individuals will be liable to pay Income Tax and National Insurance contributions on cryptoassets which they receive from:
their employer as a form of non-cash payment (see CRYPTO21100) mining, transaction confirmation or airdrops (see CRYPTO21150, CRYPTO21200 and CRYPTO21250) As set out in CRYPTO20250 there may be cases where the individual is running a business which is carrying on a financial trade in cryptoassets and they will therefore have taxable trading profits. This is likely to be unusual, but in such cases Income Tax rules would take priority over the Capital Gains Tax rules.
One more comment on this: @nanonano mentioned the list of recognised futures exchanges here: https://www.gov.uk/hmrc-internal-manuals/capital-gains-manual/cg56120 While this list doesn't include any crypto exchange, it also doesn't include any retail CFD provider either. It only lists professional commodity and financial exchanges primarily aimed at institutions. CFDs on the other hand are mentioned earlier in the same manual and are closer to what crypto futures, primarily aimed at retail clients, are: https://www.gov.uk/hmrc-internal-manuals/capital-gains-manual/cg56100
Retail contracts for differences are financial futures, and, unless the profits are taxable as trading income, in almost every case TCGA92/S143 charges the outcomes under the capital gains regime (CG56000+). SP03/02 gives guidance on when profits or losses are to be regarded as trading income.
All debits and credits to the account, including commission and sums equivalent to interest and dividends, are brought within the computation of the net chargeable gain or allowable loss when the contract is closed out.
From what I have read pooling does not apply to CFDs/Futures contracts. The following talking about CFDs (which are essentially the same) was helpful. https://community.ig.com/forums/topic/17087-cfd-and-capital-gains-calculations/
Hi All, I've added a new branch which supports futures/margin trading. Currently for Binance, Kraken and Deribit, see https://github.com/BittyTax/BittyTax/tree/features/margin-trading, please give it a test.
Hi nanonano, Thanks for your project. I have tried the parser for deribit and kraken futures. I guess all futures gains/losses are going under Capital Gains tax, is this accurate?
I believe the Deribit parser needs a "withdrawal", other than that small fix, it looks good
I could not work the futures trading for Kraken, with a Kraken futures ledger csv
Hi @blodgetAng, thanks for testing!
Yes I would expect futures to be capital gains tax for most people.
I believe the Deribit parser needs a "withdrawal", other than that small fix, it looks good
Are you able to share a Deribit withdrawal, I didn't have an example to code from?
I could not work the futures trading for Kraken, with a Kraken futures ledger csv
I didn't add a parser for the Kraken futures trades export as hopefully everything is available from the Kraken ledgers export, so not required.
@nanonano Here's a Deribit "withdrawal" example
regarding Kraken. Unfortunately the spot ledger and futures ledger are separate and differ quite a bit, because anything else would be too easy !
Hi @blodgetAng, thanks for the withdrawal example. It looks like the headers have changed from below?
[
"ID",
"UserSeq",
"Date",
"Instrument",
"Type",
"Side",
"Size",
"Position",
"Price",
"Mark Price",
"Cash Flow",
"Funding",
"Fee Rate",
"Fee Paid",
"Fee Balance",
"Change",
"Balance",
"Equity",
"Trade ID",
"Order ID",
"Info",
],
Please can you provide the new headers by running the conv tool with debug.
Also, can you confirm the futures ledger export has the headers below?
['uid', 'dateTime', 'account', 'type', 'symbol', 'change', 'new balance', 'new average entry price', 'trade price', 'mark price', 'funding rate', 'realized pnl', 'fee', 'realized funding', 'collateral’]
If so I've got an example one, and I'll add a parser for it.
@nanonano yes the Deribit headers are slightly different.
Kraken Futures Ledger export headers are:
I can provide a sample one if you would like.
@nanonano here's a kraken futures ledger export krakenfutures_sample.csv
Hi @blodgetAng, thanks for the example kraken futures file, I'll take a look.
Re: Deribit withdrawal, are you able to confirm that the withdrawal fee is in the "Fee Paid" field in the old export, whereas now it's in the "Fee Charged" field?
@nanonano yes deribit withdrawal fee is in "Fee Charged" thanks!
Hello, thanks for this. I tested it with Deribit, it parses the file with no errors, but I don't think it uses the correct methodology for calculating the gains. First of all it seems to use the pooling rules for spot trading, including B&B rules, but for futures/CFDs the B&B rules shouldn't apply (it should be one pool for the whole position including margin/financing costs). Secondly the gains should be calculated only when the position is closed, not at every daily settlement which is effectively mark to market of the position, as described in the link posted above.
Hi @cantcodeatall, thanks for testing.
Margin trading/futures are handled completely separately from the spot trading rules (pooling, etc). The gain/loss is not calculated by BittyTax, instead there are 2 new transactions types Margin-Gain
and Margin-Loss
which are used to report these from the figures provided by the Deribit exported data file.
These Margin-Gain/Losses are totalled up along with any Margin-Fee's paid and appear in a new section in the tax report for that year.
If crypto is used to receive a margin gain or to pay a margin a loss or fee, then these will amounts are pooled, etc for capital gains as per normal.
Hi @blodgetAng, I've added the Deribit "withdrawal" type, see https://github.com/BittyTax/BittyTax/commit/31db78c7a68bc12bc8a9fee54fd56f015b857135.
At the moment this is for the legacy export format, if you are able to test it works okay? Then I'll add the new export format you provided also.
@nanonano what constitutes receiving a margin gain or paying a margin loss though? As it's done at the moment, the daily settlements (mark to market) are included, which I believe shouldn't. Upon closing the position they should. This is not a crypto matter btw, it works exactly the same with futures in traditional markets where the settlement currency is USD, there's daily settlement with debiting or crediting USD, these are not acquisitions/disposals, only position closing is considered a disposal.
@cantcodeatall, how do we identify when the position is closed from the Deribit export? Are you able to make changes to the parser, or describe the logic for how this should be calculated correctly?
The position size is shown at every line. If it goes to zero, the position is closed (or if it crosses zero, as you can go from long to short in one transaction, in which case the software can break it down to two transactions, one closing the position and one initiating another one in the opposite direction). Also, when a position is reduced, the "side" column is either "close buy" or "close sell".
@nanonano here is an example deribit ledger so you can see what @cantcodeatall is describing so the margin gain/loss should exclude "settlement" in the header named "Type" transaction_log-deribitExample.csv
Agree that P&L on futures trading (and perpetuals) should only be accounted for tax purposes on exit/reversal/unwinding. Day to day marked to market adjustments should be ignored. Only just coming to test this.
Equally, opening a futures position does not amount to a trade ab initio. No coin changes hands at this stage. The trade only takes place at the closing of the position. But doubtless the code has taken care of all this by now.
OK, here is a question on the Kucoin parser.
# Futures Orders_Realized PNL (Bundle) DataParser( ParserType.EXCHANGE, "KuCoin Bundle Futures Orders Realized PNL", [ "UID", "Account Type", "Symbol", "Close Type", "Realized PNL", "Total Realized PNL", "Total Funding Fees", "Total Trading Fees", lambda c: re.match(r"(^Position Opening Time\((UTC[-+]\d{2}:\d{2})\))", c), lambda c: re.match(r"(^Position Closing Time\((UTC[-+]\d{2}:\d{2})\))", c), ], worksheet_name="Kucoin F", all_handler=parse_kucoin_futures,
Note the item "Total Funding Fees" Funding fees accrue in small amounts each day. While it is far more convenient to account for it all in one go at the end of the trade, will this suffice for the ghastly HMRC?
I sent you an email with a Deribit transaction log and I will post the details below so that others can see. You will note that Deribit gives each day's funding payment separately in the log.
Note the item "Total Funding Fees" Funding fees accrue in small amounts each day. While it is far more convenient to account for it all in one go at the end of the trade, will this suffice for the ghastly HMRC?
Yes, it will.
From the horse's mouth here:
[https://www.gov.uk/hmrc-internal-manuals/capital-gains-manual/cg56100]
"All debits and credits to the account, including commission and sums equivalent to interest and dividends, are brought within the computation of the net chargeable gain or allowable loss when the contract is closed out."
`<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">
ID | UserSeq | Date | Instrument | Type | Side | Base Amount | Position | Price | Mark Price | Index Price | Cash Flow | Funding | Fee Rate | Fee Charged | Fee Balance | Change | Balance | Equity | Trade ID | Order ID | Info -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- 3.E+08 | 173451230 | ######## | ETH-PERPETUAL | settlement | short | -4810 | -4810 | 3507.11 | 3507.11 | 3506.94 | 0.007929 | 4.35E-05 | - | 0 | 0 | 0.007929 | 1.399186 | 1.399226 | | |
Hi nanonano, I know the current version of the software does not deal specifically with futures but just wanted to double check with you to make sure my understanding is correct.
Due to foreign exchange effect, CGT calculations might be inaccurate if the transaction records file includes futures.
Example:
With current code Capital Gains =GBP 3.75601
calculation -> [(400 / 1.28 - 400/1.30) / 1.28 ]
Capital Gains should be = GBP 0 calculation -> (400-400)/1.28 = 0
thx Vi