robertkarl / yabc Goto Github PK
View Code? Open in Web Editor NEWA cryptocurrency tax calculator.
Home Page: https://velvetax.com
License: MIT License
A cryptocurrency tax calculator.
Home Page: https://velvetax.com
License: MIT License
Required for #62.
Currently the algorithm looks like this:
for each different coin:
select all tx's that appear to contain that coin
create an empty pool
for each tx we selected:
call process_one()
At the very least we need to make sure that we select the right tx's for each coin.
resolved when:
the cost basis reports generated from running yabc on adhoc.csv look up a dollar value for the amount of BTC and ETH on that date.
$ python -m yabc /home/rk/code/yabc/testdata/adhoc/adhoc.csv
...
<Sold 10000 ETH on 2018-05-22 00:00:00 for $0. Exchange: adhoc. Profit:$0.
<TX 2018-05-22 00:00:00 SELL 0.33 BTC for 10000 ETH, from exchange adhoc. Fee 0.001 BTC>>
Perpetual futures are a strange beast.
https://help.bybit.com/hc/en-us/articles/360012865933-Bybit-Definition-Features-Uses
Two traders, one short and one long, enter into a contract with each other. Payments are made, typically in BTC, based on price movements in the underlying asset. TODO: Does the exchange take long and short positions with their customers?
bybit, bitmex and deribit offer these contracts.
Make yabc understand them better. AFAIK no IRS guidance has been given about this, so the best way to treat this seems to me to be:
Support markets like ETH/BTC.
These are required for importing trade data from Binance for example.
usd_subtotal
and quantity
fieldsusd_subtotal
in basis.py. This is the most critical step for making sure basis calculations are still correct.At this point we should be able to use both syntaxes. Either usd_subtotal
and asset_name
, or the fully specified one.
ether, bch, litecoin should be supported
Make sure that the following history makes sense:
buy 1 bitcoin
give 1 bitcoin as a gift
No 8949 needs to be filed
gain_or_loss
field should be quantized the
Make it consistent
The day mining occurs, trigger a taxable event.
If inputs are received with only SELLs, but no BUYS, we currently panic.
Instead detect this and use a cost basis of zero for those sells.
"__main__", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/rk/code/yabc/src/yabc/__main__.py", line 42, in <module>
main()
File "/home/rk/code/yabc/src/yabc/__main__.py", line 36, in main
reports = processor.process()
File "/home/rk/code/yabc/src/yabc/basis.py", line 293, in process
reports, pool = _process_all(self.method, self.txs)
File "/home/rk/code/yabc/src/yabc/basis.py", line 257, in _process_all
ops = process_one(tx, pool)
File "/home/rk/code/yabc/src/yabc/basis.py", line 128, in process_one
amount += pool[pool_index].quantity
IndexError: list index out of range
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.