compare them and determine which ones could be a good Store of Value ( SoV ).
Stock to Flow is a popular indicator used to predict scarcity. It evaluates the total stock of a commodity against the total amount that can be produced during a year. This model supposes that if scarcity is increasing, the price is going to increase.
This model has been used over the last years on Bitcoin to determine if the asset was undervalued or overvalued, and even make prediction models on the future price.
This script is going to focus on the Stock to Flow ratio (total stock/amount produced) to compare the following assets over time :
- Mining resources (mined) for Gold and Silver
- Cryptos assets (mined) for Bitcoin and Ethereum
- FIAT currencies (banknotes printed) for Dollar and Euro
The calculation of the Stock to Flow ratio evaluates the total stock of a commodity produced against the production made for a specific year. The data is calculated on a yearly basis, then interpolated to get monthly or daily values.
DATA ORIGIN :
The main information needed to calculate the Stock to Flow ratio is the "yearly production" of a commodity. I tried to retrieve that information from the most reliable sources :
- for Gold from research on http://www.gold.org
- for Silver from research on http://www.silverinstitute.org
- for Ethereum from research on http://etherscan.io
- for Bitcoin from data source "QUANDL:BCHAIN/TOTBC" from http://www.quandl.com
- for Dollar from research on http://www.federalreserve.gov
- for Euro from research on http://www.ecb.europa.eu
- Smoothing for interpolated data : Smoothing factor for assets that are calculated yearly and then interpolated ( Gold , Silver , Dollar, Euro , and Ethereum )
- Smoothing for non interpolated data : Smoothing factor for assets that are calculated daily and not interpolated ( Bitcoin )
- Display asset names : Display assets names in a colored on the right side of the chart
- Display asset values : Display assets Stock to Flow ratio in a colored on the right side of the chart
- Display key events for assets : Display important events for the assets at the bottom of the chart using the same color as the assets lines (for example Orange diamond is a Bitcoin halving). Please refer to the script code for the details of all events.
This script can be used on any asset available on TradingView as the data used is either static or external.
However I recommend using it the Gold asset from currency.com as the depth of the chart will be bigger (since 1980s).
It is recommended to used this script on the as the chart data is calculated yearly and then interpolated.
- Reorganised thanks area
Nello spirito di condivisione promosso da TradingView, l'autore (al quale vanno i nostri ringraziamenti) ha deciso di pubblicare questo script in modalità open-source, così che chiunque possa comprenderlo e testarlo. Puoi utilizzarlo gratuitamente, ma il riutilizzo del codice è subordinato al rispetto del Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.