Daily Return
systemic:core-drIndicatorsfunction1 crInputs
| Name | Type | Description |
|---|---|---|
| Price | floatarray | The **price_data** input represents the historical closing prices of an asset to be analyzed by the Daily Return indicator. |
Outputs
| Name | Type | Description |
|---|---|---|
| DR | floatarray | The **dr** output provides the calculated daily return values as a percentage change from each price point to the previous one. |
Overview
The Daily Return (DR) indicator measures the percentage change in the closing price of an asset from one trading day to the next. It is a foundational metric in financial analysis, providing insight into an asset's day-to-day performance and volatility. Daily Return is widely used in both traditional markets (stocks, ETFs, indices) and cryptocurrencies, where it is especially valuable due to the high volatility and 24/7 trading nature of digital assets.
Daily Return is essential for:
- Assessing short-term price movements
- Quantifying daily volatility
- Comparing performance across assets
- Building more complex indicators (e.g., volatility, Sharpe ratio, cumulative return)
For more, see Investopedia: Daily Return and Binance Academy: Volatility in Crypto.
Mathematical Formulation
The Daily Return is calculated as:
Where:
- is the closing price of the asset at day
- is the closing price of the asset at day
Visualizing Daily Return
Calculation Flow
flowchart TD
A[Price Data] --> B[Get Previous Day's Close]
B --> C[Calculate Price Change]
C --> D[Divide by Previous Close]
D --> E[Multiply by 100]
E --> F[Daily Return Output]
Daily Return Signal Workflow
sequenceDiagram
participant Market
participant DR
participant Trader
Market->>DR: New closing price
DR->>DR: Calculate Daily Return
DR->>Trader: Output return value
Trader->>Market: Adjust position or hold
Missing Data
DR computes the percentage change over observed bars only and reindexes back to the full input grid:
- Closed-market gaps (e.g. weekends) stay gaps, and bridge. A missing input slot produces
Nonein the output — never a carried-forward (stale) return, never a sentinel like0. The first observed bar after a gap is measured against the last observed price before it (e.g. Friday's close), so the Monday return is a real bridged change, not a discarded weekend delta. - First bar is
None. The very first observed price has no predecessor, so its return is honestly undetermined — never fabricated as0.0. - Zero-base slots are
None. A return computed against a0.0prior price is mathematically undefined (division by zero); the module emitsNonerather than a laundered sentinel. - Live mode. DR returns exactly one value for a live request: the most recent slot's return,
or
Noneif that slot itself is a closed-market gap or its base is undeterminable.
Practical Use Cases
In Cryptocurrencies
- Volatility Monitoring: Crypto assets are known for their high volatility. Daily Return helps traders and risk managers monitor and react to large price swings, which are more frequent in crypto than in traditional markets. See Binance Academy: Volatility in Crypto.
- Performance Comparison: Daily Return allows for direct comparison of performance across different coins/tokens, regardless of their price levels.
- Risk Management: By tracking the distribution of daily returns, traders can set stop-losses, position sizes, and risk limits tailored to the asset's volatility profile. For more, see Cointelegraph: Crypto Risk Management.
- Strategy Development: Many algorithmic and quantitative trading strategies in crypto use daily returns as a core input for momentum, mean reversion, and volatility targeting models. See CoinDesk: Quant Strategies in Crypto.
In Securities
- Trend and Volatility Analysis: Daily Return is used to analyze short-term trends and volatility in stocks and indices.
- Portfolio Construction: Helps in calculating risk-adjusted returns and optimizing asset allocation.
Daily Return in Macroeconomic Context
Daily Return is often analyzed alongside macroeconomic indicators (e.g., CPI, VIX) to understand how broader economic events impact asset volatility and performance. In crypto, macro shocks (like inflation data releases or regulatory news) can trigger outsized daily returns due to the market's sensitivity and leverage.
flowchart TD
A[Macro Event: CPI, Fed Decision, Regulation] --> B[Market Reaction]
B --> C[Price Change in Crypto]
C --> D[Calculate Daily Return]
D --> E[Adjust Trading or Risk]
For more on macro impacts, see Investopedia: How Economic Indicators Affect Markets.
Advantages and Limitations
Advantages:
- Simple and intuitive calculation
- Provides daily insight into asset performance
- Useful for volatility and risk management
- Enables cross-asset comparison
Limitations:
- Focuses on short-term movements; may not reflect long-term trends
- Can be noisy, especially in highly volatile markets like crypto
- Sensitive to outliers and price anomalies
Data Alignment in Systemic
In Systemic, the Daily Return module processes price data that may come from various sources with different sampling frequencies. Understanding how the system handles data alignment is essential for accurate results.
Frequency and Padding Behavior
When connecting price data from a data source (e.g., a stock or cryptocurrency node), Systemic automatically handles alignment:
| Scenario | Behavior |
|---|---|
| Single source | Price data is processed directly with no padding |
| Multiple sources (same frequency) | Data is aligned by timestamp; shorter series are padded with their last value |
| Multiple sources (different frequencies) | Lower-frequency data is upsampled to match the highest frequency before processing |
Example: If you connect BTC at 1-hour frequency (3 data points) and ETH at 15-minute frequency (12 data points), Systemic will:
- Upsample BTC from 1h to 15m by repeating each value 4 times
- Pad both series to equal length if needed
- Calculate Daily Return on the aligned series
Practical Implications
- Accuracy at lower frequencies: The Daily Return calculation is most meaningful on daily closing prices. Using intraday data will compute "period returns" rather than true daily returns.
- Upsampling effects: Upsampled data contains repeated values, which may result in zero returns during interpolated periods.
- Cross-asset comparisons: When comparing Daily Return across assets with different data frequencies, ensure the frequency context is understood to avoid misinterpretation.
Indicator Assessment
The following quadrant chart evaluates the Daily Return indicator across key dimensions for both traditional securities and cryptocurrencies:
%%{init: {"themeVariables": {"quadrant1Fill": "#e8f5e9", "quadrant2Fill": "#e3f2fd", "quadrant3Fill": "#fff3e0", "quadrant4Fill": "#fce4ec"}}}%%
quadrantChart
title Daily Return Indicator Assessment
x-axis Low Complexity --> High Complexity
y-axis Low Popularity --> High Popularity
quadrant-1 High Popularity & Complex
quadrant-2 High Popularity & Simple
quadrant-3 Low Popularity & Simple
quadrant-4 Low Popularity & Complex
DR - Stocks: [0.15, 0.88]
DR - Crypto: [0.18, 0.92]
Dimension Breakdown
| Dimension | Stocks | Crypto | Explanation |
|---|---|---|---|
| Popularity | 9/10 | 9.5/10 | Universal metric; foundational to nearly all quantitative analysis |
| Reliability | 9/10 | 8/10 | Highly reliable in stocks; crypto's 24/7 trading and gaps affect consistency |
| Complexity | 1/10 | 1/10 | Extremely simple calculation—requires only price data |
| Versatility | 9/10 | 9/10 | Applicable across all asset classes, timeframes, and strategies |
| Recent Interest | 7/10 | 8.5/10 | Stable long-term; renewed interest in crypto volatility analysis |
Key Insight: Daily Return scores exceptionally high on popularity and versatility while maintaining minimal complexity. Both traditional and crypto markets position it in the "High Popularity & Simple" quadrant, making it an essential foundational indicator for any trading system.
References and Further Reading
- Investopedia: Daily Return
- Binance Academy: Volatility in Crypto
- Cointelegraph: Crypto Risk Management
- CoinDesk: Quant Strategies in Crypto
- Investopedia: How Economic Indicators Affect Markets
Glossary
- Daily Return (DR): The percentage change in an asset's closing price from one day to the next
- Volatility: The degree of variation in an asset's price over time
- Risk Management: Strategies to control potential losses in trading
- Macro Indicator: Economic data such as inflation, interest rates, or regulatory events
- Outlier: An unusually large or small value in a data set
This documentation is for educational purposes and should not be considered investment advice. Always consult multiple sources and consider your risk tolerance before trading.