Coder Social home page Coder Social logo

Comments (8)

nanonano avatar nanonano commented on July 21, 2024

Hi @aleqx, thanks for your question.

Below is from the README, it explains how the asset is chosen (from the pair) for pricing of crypto-to-crypto trades.

trade_asset_type

Controls the method used to calculate the asset value of a trade:

    1. 0 = Buy asset value
    1. 1 = Sell asset value
    1. 2 = Priority asset value (recommended)

For every trade there are always two assets involved: fiat-to-crypto, crypto-to-fiat or crypto-to-crypto. When bittytax is trying to calculate the value of a trade, it uses this parameter to determine which asset value should be used to price the trade in UK pounds.

For trades involving fiat, it's obvious that we want to price the asset using the fiat value. However, it's not so straight forward for crypto-to-crypto trades.

The recommended setting is 2 (Priority). This means that the asset value chosen will be selected according to the priority order defined by the fiat_list and crypto_list parameters combined. Fiat will always be chosen first, followed by the most prevalent cryptoasset.

Setting this parameter to 1 or 2 will result in either the buy asset value or the sell asset value always being used, regardless of whether the trades involved fiat or not.

The reason the cost basis of 1 ETH is not used for this disposal is because of the same day rule. With the same day rule (and bed and breakfast rule), the cost basis is not used, instead the ETH sell and ETH buy-back are matched. The gain is then calculated according to the prices of those specific trades, i.e. buy 1 ETH = £447, sell 1 ETH = £14377, gain = £13929.

Hope that explains it okay? If you run bittytax with the -d option you can see all the calculations yourself.

from bittytax.

aleqx avatar aleqx commented on July 21, 2024

Thanks for the answer. Hmm, I'm still (say) confused as to why the cost of 447 isn't propagated. Reading the same-day rules it is not apparent that what you described must be the case, instead of ETH @ 447 GBP is sold for 447 GBP, buyer offers 1 BTC for 447 GBP.

Thanks for pointing out the trade_asset_type setting. If I was to change that, would it affect the way BittyTax treats the above scenario?

I had another related question which I'll ask without context - perhaps this should go in a different issue: on recap.io I can choose a default accounting price for transactions that are missing their cost basis or nominal value: day average, day open, day close, day low, day high. Is there such a setting for bittytax? If not, which one does BT consider when fetching prices online? As you know, luck or bad luck can add/subtract quite bit from the tax bill given we had plenty of 50%+ swings in a single day. Even though this choice should be made once and then stuck with (HMRC doesn't like us gaming the system), the nature of someone's trading can take advantage of this choice.

from bittytax.

nanonano avatar nanonano commented on July 21, 2024

The trades are priced independently, the cost basis is only used for a section 104 disposal.

If you wanted to record that you bought the BTC at an undervalued price, you could set the ETH value to £447 for the sell.

I would not recommend changing the trade_asset_type parameter, you will get lots of missing price data if you don't use asset priority.

Re: Q2.

BT uses the day close price when getting price data.

I need to check but I think one, or more of the price APIs only provides this one, otherwise I would have made it config as well. If you raise another issue for this I'll confirm.

from bittytax.

aleqx avatar aleqx commented on July 21, 2024

Yes, I was mentioning myself that I could manually set 447 GBP, but that would be a tall order when dealing with a large number of transactions. A default setting would have been nicer. I guess I could fork it and stop complaining, maybe then push a PR :)

I'll put the other question in a different issue.

Many thanks for the answers.

from bittytax.

nanonano avatar nanonano commented on July 21, 2024

You raise a good point, I'll have a bit more of think about how I could implement this. For Koinly is the swap setting global or per transaction?

from bittytax.

nanonano avatar nanonano commented on July 21, 2024

If you change the trade_asset_type config parameter to a value of 1, the sell assets price will always being used for crypto-to-crypto trades, so will result in a gain of zero for your example.

You could use this, but you might find that for some of your trades there's no price data available. BT will raise a warning if no historic price data is available, and default it to £0.

from bittytax.

nanonano avatar nanonano commented on July 21, 2024

@aleqx are you happy to close this issue?

from bittytax.

nanonano avatar nanonano commented on July 21, 2024

Closing this issue as question has been answered.

from bittytax.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.