Comments (8)
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:
- 0 = Buy asset value
- 1 = Sell asset value
- 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.
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.
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.
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.
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.
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.
@aleqx are you happy to close this issue?
from bittytax.
Closing this issue as question has been answered.
from bittytax.
Related Issues (20)
- Error with Bittytax 0.5.3.dev0 HOT 2
- Nexo time / date format changed HOT 1
- adalite.py typo HOT 2
- Process stuck due to memory and disk usage HOT 6
- Accounting tool not processing sheets correctly HOT 29
- bscscan has changed its datetime format HOT 4
- binance unrecognised transactions HOT 8
- Can't convert Binance US yearly tax report HOT 22
- How to upgrade unreleased version? HOT 2
- Imports from relative paths fail HOT 4
- Bitpanda CSV format has changed HOT 2
- Koinly USA header HOT 3
- Kraken format change HOT 12
- Crypto.com change of Transaction Kind HOT 3
- Add support for ByBit?
- Crypto.com bittytax_conv: new transaction kinds HOT 2
- Problem with STRK symbol - This has two token associated with it, how to define the correct one?
- Unnecessary price lookup for Gift-Spouse and Charity-Sent HOT 1
- ImportError: attempted relative import with no known parent package
- year-end balance and average annual stock. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bittytax.