Crypto Portfolio Visualisation


Description

The Portfolio simulator is part of D3.js tutorials and showcasing series of D3 capabilities. Other examples and tutorials can be found on the main page.
This is Stacked Area Chart example that visualises gain (or loss) buying and selling Crypto at specified dates.
Available are some selected cryptocurrencies with the highest market caps.
Complete engine used to build this interactive portfolio can be found on src/cryptoVisualisation.js.

Model is simplified in a way that data is discretized per day: only daily high is used for coin price, and buying means buying at the beginning of the day, selling means selling at the end of the day.
Some other things to consider:

Crypto price data is from coinmarketcap.com.

Usage

Just select any available crypto from dropdown list, set valid quantity, and set the start date as the bought date, and end date as the sell date, and click Modify crypto.
Modification on graph will be calculated and displayed automatically, as well as info panel below the graph.


Modifying initial cash will not affect positions unless cash value is set too low; reset removes all positions and sets cash to default value of 400$: