type
status
date
slug
summary
AI summary
AI translation
tags
category
password
icon
💡
By registering an account on OKX Crypto Exchange using the invitation link from blackcat1402, you can enjoy several benefits. These include a 10% rebate on spot contract trades, a 20% discount on fees, permanent access to blackcat1402 Membership and Advanced Indicators, free internal testing of the Advanced Trading System, and exclusive services such as member technical indicator customization and development.
💡
OKX Crypto Exchange blackcat1402 invitation registration link:
Today, I want to talk to everyone about one of the core concepts in John F Ehlers' theory: derivatives. This is my knowledge summary and a share for those who are interested. So, a friend with a background in humanities messaged me, asking me to simplify my explanation. So, let me start from the beginning and explain to everyone.
First, we need to understand the essence of Ehlers' theory. Well, he actually proposed some cool indicators to analyze market trends. You know, the market is like a crazy cat, sometimes jumping around, sometimes lazy. We need to find a way to reveal its secrets.
Mr. Ehlers is a genius in this regard. He discovered some indicators, such as the "Super Filter" and the "Reverse EMA." Sounds impressive, right? They are actually used to filter market noise and predict trends. Just like in the world of cats, using big ears to filter out noise and hear the truly important sounds.
However, in order to understand these indicators, we need to first understand the basic principles of signal processing. Well, just like in the world of cats, if we want to hear the owner's commands, we have to filter out other noises and listen attentively.
So, Mr. Ehlers' theory tells us that the market is like a crazy cat, and we need to use some special indicators to capture its traces. Just like in the world of cats, using a sensitive nose to sniff out the owner's scent.
The previous article introduced various types of filters, and the most typical element of a high-pass filter, derivatives, is laid as a foundation for more exciting articles to come. Although it may sound difficult, it's still better than encountering something incomprehensible later on. Derivatives, does it sound like some advanced mathematics? But actually, derivatives quietly exist in the technical indicators we are familiar with. Only when you understand the essence of derivatives can you better utilize these technical indicators and even develop better ones!
However, many people are confused about the difference between derivatives and differentials. In mathematics and physics, the first derivative and differentiation are actually two different ways of expressing the same concept. Just like in the world of cats, sometimes we like to express the same meaning in different ways.
The first derivative, also known as the slope or velocity of a function. Just like describing the running speed of a cat in the world of cats, isn't it useful? In mathematical notation, "dy/dx" is used to represent the first derivative of a function. There is also a decentralized exchange called DYDX, which actually means derivatives. This is actually intentional by its founder: the English translation of "导数" in Chinese is "derivative", and "derivatives" in finance refer to futures contracts, perpetual contracts, and options. The founder of DYDX actually used a subtle way to indicate that their exchange only deals with contracts! I think if the founder of Deribit exchange hadn't acted early, the founder of DYDX exchange wouldn't have been forced to choose such an unfriendly name.
On the other hand, differentiation is a more general concept that describes the small changes in the values of a function. In fact, differentiation can also be used to represent the first derivative. Just like in the world of cats, we use subtle movements to express our emotions, isn't it interesting?
notion image
In practical applications, both the first derivative and differentiation are used to describe the local behavior of a function, that is, how the function responds to small changes in its variables. Just like in the world of cats, we express our affection or dissatisfaction to our owners through small actions, isn't it interesting? In physics, derivatives are commonly used to describe velocity and acceleration; in economics, it may be used to describe the rate of change in costs or profits.
In general, both the first derivative and differentiation describe the same concept in many contexts, which is how the function value changes with respect to changes in its variables. These terms may have slightly different meanings in different contexts and fields, but their core concepts are similar. Just like in the world of cats, we express our emotions in different ways, which is quite interesting, isn't it? I hope these words can give you a deeper understanding of derivatives and make you more proficient in the world of mathematics!
For humanities students who don't understand the language of cats, let me give you a more popular example to understand derivatives and differentiation:
Imagine you are flying a kite in the park. The kite rises in the air due to the force of the wind.
  1. Initial: The kite is on the ground and not moving at all.
  1. Later: The kite starts to rise slowly.
  1. Even later: The kite's ascent speed increases! This is because the wind has become stronger.
At this point, if I ask you, "How fast is the kite rising?" you can tell me its speed. And this speed is like the "derivative" in mathematics. The derivative actually tells us how something (in this case, the height of the kite) changes rapidly or slowly with time. Therefore, the derivative is like a speedometer that tells us how fast an object is changing.
Furthermore, imagine you have a toy car and a ruler.
  1. Start: Place the toy car at 0 centimeters on the ruler.
  1. Movement: Push the car forward, moving it to 5 centimeters.
The car moved 5 centimeters, right? Now, imagine if you only moved the car 0.1 centimeters each time, and repeated this movement 0.1 centimeters at a time until you moved a total of 5 centimeters. These small movements each time are called "differentiation." Differentiation is like taking a small step to describe the change in things. In mathematics, we use differentiation to observe how an object gradually changes. Just like you push the toy car little by little and observe how it moves.
Now you understand what a derivative and differential are, right? Humanities students say they can understand them separately, but get confused when they are put together. Alright!
Imagine you're skateboarding in a park, and your friend is filming you with a camera.
  1. Derivative: When you're going faster or slower, it actually means your speed is changing. The derivative is like a speedometer that tells us how your skateboarding speed is changing. If you suddenly accelerate, the derivative (or speed) increases; if you decelerate, the derivative decreases.
  1. Differential: Now imagine your friend pauses the recording and carefully examines each frame. Each frame captures a small distance that you moved on the skateboard. These small movements are called "differentials". They represent how far you traveled in a very short time.
Difference: The derivative is more like "speed", telling us how something is changing quickly or slowly. The differential focuses on the specific "steps" of this change, describing the small changes that occur in a very short time or distance. So, when you're skateboarding, the derivative describes how your speed is changing, while the differential describes your movement at every instant. If you still can't understand the difference, quickly transfer the money you invested in the market to my Alipay, because sooner or later, you'll lose it all in the market. It's better to travel the world with your girlfriend, isn't it?
First, what is the significance of derivatives in the market? Well, they can help us with trend analysis. If the derivative of a stock's price curve is positive and increasing, it means that the rate of increase in stock price is accelerating. Conversely, if the derivative is negative and decreasing, it means that the rate of decrease in price is slowing down. In simple terms, the derivative tells us the rate of change in the market.
Derivatives can also help us identify turning points. When the derivative changes from positive to negative or from negative to positive, it indicates a local maximum or minimum of the original function (such as a price curve). Just like in the world of cats, when we jump in a parabolic trajectory on a soft grass, our speed changes from positive to negative, and the vertex of the parabola is a turning point. This turning point can help traders identify potential market tops or bottoms.
So, what are some technical indicators that use derivatives? First is the Momentum indicator, which is actually the first derivative of price (also called the first derivative), representing the rate of change of price over time. Just like in the world of cats, we use momentum to measure the speed of our running. There is also the Acceleration indicator, which shows how the speed of price change is changing over time, actually the derivative of momentum or the second derivative of price. Just like in the world of cats, we use acceleration to measure the changes in our running speed, but the acceleration indicator is not commonly used in the market (after all, the second derivative is the derivative of momentum, which is considered as the change in the rate of price change. Who understands all this with their Sharingan, and what's the point of understanding it?).
There is also an indicator called Stochastic Oscillator, which is the popular KDJ indicator in the domestic market. Some versions of it use derivatives to calculate the relative position between the price and its past range. Just like in the world of cats, we use relative position to determine our position in the cat group. Isn't it interesting?
So, how do we use these indicators? Well, when momentum is positive and increasing, it could be a buying signal; when momentum is negative and decreasing, it could be a selling signal. Just like in the world of cats, when our running speed gets faster and faster, it may mean that we should seize the opportunity. When the acceleration changes sign, for example, from positive to negative, it may indicate that the trend is about to end. Just like in the world of cats, when our running speed starts to slow down, it may mean that we should stop. Finally, when the Stochastic Oscillator or KDJ enters the overbought or oversold zone and starts to turn, it may indicate an upcoming price reversal. Just like in the world of cats, when my position in the cat group starts to change, it may mean that we need to reassess the situation. It has a bit of a "Tai Chi" flavor.
From shallow to deep, let's go back to TradingView scripts. If we consider price or a certain technical indicator as a continuous function, then its first derivative will tell us the rate of change of this function at a certain point. In actual market data, this derivative is usually approximated by calculating the difference between discrete points. Here is a simple Pine Script code to calculate the first derivative of price:
This script calculates the difference between the closing price and the previous day's closing price, which can be viewed as an approximation of the first derivative (first order derivative) of the closing price. When this value is positive, it indicates that the price is rising; when this value is negative, it indicates that the price is falling. The magnitude of the value indicates the speed of price change. This is just a simplified example, in reality, you can perform similar calculations on any other technical indicators or components of price data. Do you have a feeling of being fooled by a calculus teacher? The famous "derivative" is nothing but this "everyday seen" thing in the market.
The second derivative describes the rate of change of the rate of change of a function. In the context of financial market analysis, the second derivative can be used to measure the acceleration of prices or other indicators. In short, if the first derivative represents velocity (the rate at which prices rise or fall), then the second derivative represents acceleration (the increase or decrease in velocity). If the first derivative is positive and increasing, then the second derivative is also positive, indicating accelerating upward movement. If the first derivative is positive but decreasing, then the second derivative is negative, indicating decelerating upward movement. Below is a Pine Script code to calculate the second derivative of prices:
The third derivative describes the rate of change of the rate of change of a function. This may sound complex, but intuitively, if the first derivative represents velocity (the rate of change of price), and the second derivative represents acceleration (the rate of change of velocity), then the third derivative represents the rate of change of acceleration, also known as "jerk" or "snap". In financial markets, the third derivative is less commonly used directly because it can be too sensitive and easily influenced by noise. However, it can still provide useful information about the speed and intensity of market dynamics. Here is a Pine Script code to calculate the third derivative of price:
The fourth derivative describes the rate of change of the third derivative of a function. In mathematical terms, it represents the rate of change of the rate of change of acceleration. However, in practical applications, as the order of derivatives increases, the measure becomes increasingly sensitive and may be severely affected by noise.
Simply put, if:
  • The first derivative represents velocity (the rate of change of price),
  • The second derivative represents acceleration (the rate of change of velocity),
  • The third derivative represents the rate of change of acceleration, then the fourth derivative represents the rate of change of the rate of change of acceleration.
Here is a Pine Script code to calculate the fourth derivative of a price:
The fourth derivative can be very sensitive and easily influenced by market noise, making it highly unlikely to be used in practical applications. It is simply used here as an example.
The first derivative, second derivative, third derivative, and fourth derivative all belong to high-pass filters, but what are the differences in the type and parameters of their high-pass filters?
Derivatives indeed possess the characteristics of high-pass filters in signal processing because they emphasize or enhance the rapid changes in the input signal (such as price data).
  1. First Derivative:
      • Type: A simple high-pass filter.
      • Characteristics: Emphasizes the rapid changes in the signal, filtering out slow trends. It provides the rate of change of the signal, thus aiding in identifying velocity or momentum.
      • Parameters: The first derivative does not have specific parameters unless you combine it with other techniques to smooth or adjust the results.
  1. Second Derivative:
      • Type: The stacking of high-pass filters, as you are essentially applying a high-pass filter to the first derivative again.
      • Characteristics: Reveals changes in acceleration or velocity and can be used to identify whether momentum is increasing or decreasing.
      • Parameters: Similarly, the second derivative itself does not have specific parameters, but adjustments can be made through smoothing or other methods.
  1. Third Derivative:
      • Type: Further stacking of high-pass filters.
      • Characteristics: Represents the rate of change of acceleration. Due to its sensitivity, it may be more susceptible to market noise.
      • Parameters: Given its high sensitivity, it may require smoothing or other forms of adjustment.
  1. Fourth Derivative:
      • Type: More stacking of high-pass filters.
      • Characteristics: Describes changes in the rate of change of acceleration, but may be too sensitive and noisy in practical applications.
      • Parameters: Given its high sensitivity to noise, additional adjustment or smoothing may be necessary.
For all these derivatives, their high-pass filter characteristics involve the enhancement of rapid changes or high-frequency components. However, as the order of the derivative increases, the results become more sensitive and noisy, making them less practical.
Derivatives possess the characteristics of high-pass filters in signal processing because they can emphasize or enhance rapid changes in the input signal. However, in practical financial data applications, we are not often directly concerned with the cutoff frequency or cutoff frequencies of the derivatives, but rather more focused on the market dynamics they capture. Nevertheless, from a signal processing perspective, the following conclusions can be drawn:
  1. Cutoff Frequency: The cutoff frequency of a high-pass filter defines a frequency threshold, below which frequency components are attenuated or eliminated. The higher the order of the derivative, the higher its cutoff frequency, meaning it can capture higher-frequency changes.
  1. Modulation Frequency: Typically refers to the frequency point at which a filter starts to work effectively. For a high-pass filter, it will be above the cutoff frequency.
Based on the considerations mentioned above, the following ranking can be derived:
  • First Derivative: Has the lowest cutoff frequency and modulation frequency. It can capture relatively slow price changes.
  • Second Derivative: Has a higher cutoff frequency and modulation frequency than the first derivative. It focuses more on changes in acceleration or velocity of prices.
  • Third Derivative: Has a higher cutoff frequency and modulation frequency than the second derivative. It focuses on changes in acceleration rate.
  • Fourth Derivative: Has the highest cutoff frequency and modulation frequency. It captures changes in the rate of change of acceleration.
Therefore, from the perspective of cutoff frequency, the ranking is: First Derivative < Second Derivative < Third Derivative < Fourth Derivative.
Please note that this is a theoretical analysis, and actual financial data may vary due to the presence of various noise and irregularities in the market data. In practical applications, when using higher-order derivatives, additional smoothing or other processing techniques may be required to reduce the impact of errors and noise.
In TradingView and many other technical analysis tools, some technical indicators do utilize the concept of derivatives or differences to directly or indirectly measure the rate of change of prices, volumes, or other indicators. Here are some popular technical indicators that use the concept of derivatives:
  1. Momentum: Measures the difference between the current price and the price n days ago, essentially the difference of prices.
  1. Rate of Change (ROC): A normalized version of momentum, expressed as a percentage change in price.
  1. Stochastic Oscillator: Measures the position of the current closing price relative to the highest and lowest prices of the past n days. Although it does not directly calculate derivatives, its underlying idea is related to comparing the recent position of prices.
  1. Moving Average Convergence Divergence (MACD): Measures the difference between two moving average lines, where one has a shorter time frame and the other has a longer time frame.
  1. Commodity Channel Index (CCI): Measures the difference between the current price and the average price, often normalized with its average absolute deviation.
  1. Awesome Oscillator: The difference between two moving average lines of different time frames.
These indicators are largely related to price changes or changes in moving average lines, which are associated with the concepts of derivatives or differences. When using these indicators, it is important to understand their respective calculation methods and the logic behind them, and make appropriate adjustments and optimizations based on specific trading strategies.
 
市场怪咖:另类的自适应滤波器探索市场的秘密:导数到处都是
blackcat1402
blackcat1402
This cat is an esteemed coding influencer on TradingView, commanding an audience of over 8,000 followers. This cat is proficient in developing quantitative trading algorithms across a diverse range of programming languages, a skill that has garnered widespread acclaim. Consistently, this cat shares invaluable trading strategies and coding insights. Regardless of whether you are a novice or a veteran in the field, you can derive an abundance of valuable information and inspiration from this blog.
Announcement
type
status
date
slug
summary
AI summary
AI translation
tags
category
password
icon
🎉Webhook Signal Bots for Crypto are Coming!🎉
--- Stay Tuned ---
👏From TradingView to OKX, Binance and Bybit Exchange Directly!👏