{"uuid":"a1e2c273-fdf1-4b79-78de-fdb77635426c","categoryUuid":"79074c4b-9122-423a-5752-9982e2c5ab9e","data":{"meta":{"name":"Tutorials: On-chain Analysis Methods"},"configs":[{"meta":{"content":"# On-chain Analysis Methods\n\n---\n\nOn-chain analysis is a relatively young discipline that started around 2018, with many metrics and tools being early in their development. This dashboard collects a series of methodologies the Glassnode team has found valuable in parsing and processing on-chain data. We will explore how various analysis methods are best applied to particular categories of on-chain metrics.\n\nThe purpose of this dashboard is to help analysts turn on-chain data and information, into actionable insights."},"uuid":"e984c9e8-7574-4a24-91a8-3429b9bbd080","extra":{"backgroundColor":"#ffffff"},"configType":"content"},{"meta":{"refUuid":"f7d19d81-32b1-4c60-65ac-b7d83cf56568"},"uuid":"31950b56-6dad-4af0-a3ef-e57bd6eb61b4","configType":"workbench"},{"meta":{"content":"# Momentum Cross-over\n\n---\n\nMomentum indicators consider a simple strategy of comparing a fast vs slow moving average. Often we will use a 30-day vs a 365-day, with the goal of assessing whether recent metric performance is elevated / declining relative to the long-term baseline.\n\n## Ideal Metric Candidates\n\nMomentum tools are ideally suited to metrics in the **On-chain Activity** category, which tend to expand and contract with market cycles.\n\n## Useful Workbench Functions\n\nMomentum charts make use of the moving average functions. Simple MA are most common, however Exponential MAs can be useful for more responsive (but noisier) variants.\n\n- **Simple MA** `sma(m1,period)`\n\n- **Exponential MA** `ema(m1,period)`"},"uuid":"2403c0dc-a0bb-44da-8cfc-a27f7ac53e20","extra":{"backgroundColor":"#ffffff"},"configType":"content"},{"meta":{"content":"# Puellification (Multiples)\n\n---\n\nLovingly named after the creator and on-chain pioneer David Puell, 'Puellification' is the simple yet robust method of taking the ratio between an indicator and the 365-day moving average. Often we refer to these metrics as an **[Insert Metric] Multiple**.\n\nWhilst simple at face value, this normalisation technique works remarkably well for establishing horizontally bounded oscillators, where deviations from, and acceleration of the metric relative to its yearly baseline is highlighted.\n\n## Ideal Metric Candidates\n\nPuellification is particularly useful for metrics which are expected to deviate from, or accelerate around market pivot / inflection points. Some examples include:\n\n- **The Puell Multiple**: miner revenues change dramatically at halving events, and again near cycle peaks/troughs.\n\n- **MVRV Ratio**: large volumes of supply change hands near cycle tops / bottoms, causing the Unrealized Profit/Loss measured by MVRV to accelerate quickly as price moves towards and away from these zones.\n\n## Useful Workbench Functions\n\nPuellification takes the ratio between the metric and its yearly moving average:\n\n`f1 = m1 / sma(m1,period)`"},"uuid":"78dba21a-cf39-41ee-8f0d-d8a133dfb27f","extra":{"backgroundColor":"#ffffff"},"configType":"content"},{"meta":{"content":"# Z-Scores\n\n---\n\nZ-Scores are a widely used normalisation technique in analysis, helping to quantify and visualise deviations from the mean.\n\n## Ideal Metric Candidates\n\nZ-Scores are an ideal tool for metrics which tend to be volatile and reactionary to market conditions.\n\nSome primary examples of suitable Z-Score candidates:\n\n- **Transaction fees [% or Revenue, or BTC]**\n- **Transaction or trade volumes [BTC]**\n- **Exchange inflow volumes [BTC]**\n- **Realized Profit/Loss Ratio**\n\n## Useful Workbench Functions\n\nZ-Scores can be calculated in Workbench using two different approaches:\n\n- **All-time Z-Score** which references the all-time-mean and standard deviation.\n\n`f1 = (m1-cummean(m1)) / cumstd(m1)`\n\n- **Period Z-Score** which references the mean and standard deviation over some defined rolling `period`.\n\n`f1 = (m1-sma(m1,period)) / std(m1,period)`\n\n\u003e 💡 It is important to ensure the units of the metric are stable over time when applying a Z-Score and selecting the period. Z-Scores are often best applied to BTC denominated metrics or relative percentages, or over periods where units are comparable.\n\u003e \n\u003e For example, an All-time Z-Score of USD denominated transfer volumes will provide poor signal, as events in 2012 are irrelevant in scale to those in 2022. However a 2yr Z-Score, or one applied to BTC units will provide a more useful indicator."},"uuid":"cbf91cd7-e3b0-4717-a091-34d8c69381cf","extra":{"backgroundColor":"#ffffff"},"configType":"content"},{"meta":{"content":"# Standard Deviation Levels\n\n---\n\nAn alternative approach to plotting a Z-Score can be to transfer a defined set of statistical deviations of interest into a trigger level. This approach allows for identifying points when a metric has reached some extreme deviation from the mean.\n\n## Ideal Metric Candidates\n\nDeviation bands are ideally applied to metrics which tend to trade within relatively constrained ranges (such as oscillators), and where extreme values are of significant interest. Key examples are:\n\n- **MVRV Ratio**\n- **SOPR**\n- **NVT Ratio**\n- **Futures funding rates**\n\n## Useful Workbench Functions\n\nDeviation Bands can be plotted over the indicator using the following formulas, which add/subtract a defined number of standard deviations from the mean:\n\n- **Base Metric:** `m1 = MVRV Ratio`\n- **All-time-Mean:** `f1 = cummean(m1)`\n- **Upper Band:** `f2 = f1 + 1*cumstd(m1)`\n- **Lower Band:** `f3 = f1 - 1*cumstd(m1)`\n\n\u003e Hint: Since day-to-day (or hour-to-hour) readings can be volatile, it may make sense to establish standard deviation bands off the raw metric, but set the alert trigger to be based off some moving average crossing over. This aSOPR variant for example uses a 7-day EMA as the indicator to smooth out anomalous events."},"uuid":"0f1b569a-19d1-45f8-9072-dee271b998ef","extra":{"backgroundColor":"#ffffff"},"configType":"content"},{"meta":{"content":"# Momentum Oscillator\n\n---\n\nA natural extension of both the momentum, and puellification methods above is to subtract 1 from the *Multiple** value to create an oscillator centered at 0. This can be a useful visualisation technique for identifying trends.\n\n## Ideal Metric Candidates\n\nMost metrics where Momentum or Multiples are appropriate are also suitable (except those requiring log-space to view). The example show here is for the MVRV Ratio, which was explored in detail in our [Mastering MVRV report](https://insights.glassnode.com/mastering-the-mvrv-ratio/).\n\n## Useful Workbench Functions\n\nMomentum Oscillators are simply the Multiple value minus 1.\n\n`f1 = m1 / sma(m1,period) - 1`\n\nAdditional functions can be used to establish colour coded positive and negative traces.\n\n- **Positive:** 'f2 = if(f1,\"\u003e\",0,f1,0)`\n- **Negative:** 'f3 = if(f1,\"\u003c=\",0,f3,0)`"},"uuid":"49148fe0-134a-491f-825f-f9c31596f1b4","extra":{"backgroundColor":"#ffffff"},"configType":"content"},{"meta":{"content":"# Net Position Change\n\n---\n\nThe Net Position Change is a tool well positioned for measuring the rate of change of a supply region over some period (usually 30-days).\n\n## Ideal Metric Candidates\n\nNet Position Change metrics are often associated with supply regions such as:\n\n- **Long-Term Holder Supply**\n- **HODLed and Lost Coins**\n- **Illiquid Supply**\n- **Entity Balances**\n\n## Useful Workbench Functions\n\nA Net Position Change can be calculated using either the difference function (for BTC/time) or the Percent Change function (for relative changes).\n\n- **Base Metric:** `m1 = Long-Term Holder Supply`\n- **Difference:** `diff(m1,period)`\n- **Percentage:** `percent_change(m1,period)`"},"uuid":"139446de-b935-48ea-b04d-fae624a3dfb0","extra":{"backgroundColor":"#ffffff"},"configType":"content"},{"meta":{"refUuid":"b1b0a4ec-14a6-4bc2-5eab-e16daf1106af"},"uuid":"adb81699-8730-4251-bd94-6855fe8aa9aa","configType":"workbench"},{"meta":{"date":1689033600000,"asset":"BTC","since":1310774400000,"until":1689033600000,"currency":"native","metricCode":"indicators.PuellMultiple","resolution":"24h"},"uuid":"6c1abdd1-48b6-4177-865e-fa5e70be929e","extra":{"price":true,"scale":"log","lineColor":"#f7931a","chartStyle":"line"},"configType":"metric"},{"meta":{"refUuid":"2b610246-d4a6-4557-5eba-58278da7696d"},"uuid":"edc5fce7-922b-4e28-9f97-7277a571133f","configType":"workbench"},{"meta":{"refUuid":"61f07f1a-02a4-4fea-708f-5dbd209e6621"},"uuid":"5e70d5d4-2093-4a0a-be09-74f9d9731a27","extra":{"zoom":"All"},"configType":"workbench"},{"meta":{"refUuid":"141874c7-0dc3-4bd3-597e-252d8917a11e"},"uuid":"92d060b0-cc85-4539-b4f1-c77cef424e41","extra":{"zoom":"5y"},"configType":"workbench"},{"meta":{"content":"# Binary Indicators\n\n---\n\nBinary indicators are used to identify periods of elevated activity, spending behaviour, and rates of change in a metric. It utilises a few analysis steps:\n\n1) Establish some threshold baseline for the metric where it is deemed important if the metric breaches the level (e.g. mean)\n\n2) Utilise if-then logic to return 1 or 0 if the metric is above or below that threshold, respectively.\n\n3) If required, apply a moving average to the result to better identify trends, and periods of consecutive breaches of the threshold level.\n\n## Ideal Metric Candidates\n\nMetrics which resemble some form of volume are often ideal candidates for a Binary indicator. Some key examples are:\n\n- **Transaction or trade volume**\n- **Revived Supply 1yr+**\n- **Coindays Destroyed (CDD)**\n- **1-day Open Interest Change**\n- **Supply Increase / Decrease**\n\n## Useful Workbench Functions\n\nBinary Indicators (like the one shown for CDD) can be constructed using the following functions. Here we use a threshold CDD value of 2yr Mean + 0.5*2yr Standard Deviation.\n\n- **Base Metric:** `m1 = Coindays Destroyed CDD`\n\n- **Threshold Value:** `f1 = sma(m1,730)+0.5*std(m1,730)`\n\n- **If-Then Statement:** `f2 = if(m1,\"\u003e\",f1,1,0)`\n\n- **Binary Indicator:** `f3 = ema(f2,7)`\n\n\u003e **💡 Hint:** the use of a 7-day EMA in this instance means that a Binary Indicator value of 1 indicates that CDD has exceed the threshold for 7-of-7 consecutive days."},"uuid":"0d9660f7-a8cf-4a70-aabc-49f537b4bb70","extra":{"backgroundColor":"#ffffff"},"configType":"content"},{"meta":{"refUuid":"73dfacb4-9230-4cc1-4119-0e1c208a85cf"},"uuid":"83f63720-264c-4569-a70c-518c4abf5320","configType":"workbench"},{"meta":{"refUuid":"3d749d34-f463-4f26-4f7e-6a35a151f9fd"},"uuid":"8e2d8046-2ba2-44fd-8b41-a6d9a064005a","configType":"workbench"}],"layouts":[{"h":4,"i":"e984c9e8-7574-4a24-91a8-3429b9bbd080","w":12,"x":0,"y":0,"minH":1,"minW":3,"moved":false,"static":false},{"h":8,"i":"31950b56-6dad-4af0-a3ef-e57bd6eb61b4","w":8,"x":4,"y":4,"minH":1,"minW":3,"moved":false,"static":false},{"h":8,"i":"2403c0dc-a0bb-44da-8cfc-a27f7ac53e20","w":4,"x":0,"y":4,"minH":1,"minW":3,"moved":false,"static":false},{"h":8,"i":"78dba21a-cf39-41ee-8f0d-d8a133dfb27f","w":4,"x":0,"y":12,"minH":1,"minW":3,"moved":false,"static":false},{"h":8,"i":"cbf91cd7-e3b0-4717-a091-34d8c69381cf","w":4,"x":0,"y":28,"minH":1,"minW":3,"moved":false,"static":false},{"h":16,"i":"0f1b569a-19d1-45f8-9072-dee271b998ef","w":4,"x":0,"y":36,"minH":1,"minW":3,"moved":false,"static":false},{"h":8,"i":"49148fe0-134a-491f-825f-f9c31596f1b4","w":4,"x":0,"y":20,"minH":1,"minW":3,"moved":false,"static":false},{"h":8,"i":"139446de-b935-48ea-b04d-fae624a3dfb0","w":4,"x":0,"y":60,"minH":1,"minW":3,"moved":false,"static":false},{"h":8,"i":"adb81699-8730-4251-bd94-6855fe8aa9aa","w":8,"x":4,"y":20,"minH":1,"minW":3,"moved":false,"static":false},{"h":8,"i":"6c1abdd1-48b6-4177-865e-fa5e70be929e","w":8,"x":4,"y":12,"minH":1,"minW":3,"moved":false,"static":false},{"h":8,"i":"edc5fce7-922b-4e28-9f97-7277a571133f","w":8,"x":4,"y":28,"minH":1,"minW":3,"moved":false,"static":false},{"h":8,"i":"5e70d5d4-2093-4a0a-be09-74f9d9731a27","w":8,"x":4,"y":36,"minH":1,"minW":3,"moved":false,"static":false},{"h":8,"i":"92d060b0-cc85-4539-b4f1-c77cef424e41","w":8,"x":4,"y":44,"minH":1,"minW":3,"moved":false,"static":false},{"h":8,"i":"0d9660f7-a8cf-4a70-aabc-49f537b4bb70","w":4,"x":0,"y":52,"minH":1,"minW":3,"moved":false,"static":false},{"h":8,"i":"83f63720-264c-4569-a70c-518c4abf5320","w":8,"x":4,"y":52,"minH":1,"minW":3,"moved":false,"static":false},{"h":8,"i":"8e2d8046-2ba2-44fd-8b41-a6d9a064005a","w":8,"x":4,"y":60,"minH":1,"minW":3,"moved":false,"static":false}]}}
