Quick scan for cycles🙏🏻
The followup for
As I told before, ML based algorading is all about detecting any kind of non-randomness & exploiting it (cuz allegedly u cant trade randomness), and cycles are legit patterns that can be leveraged
But bro would u really apply Fourier / Wavelets / 'whatever else heavy' on every update of thousands of datasets, esp in real time on HFT / nearly HFT data? That's why this metric. It works much faster & eats hell of a less electicity, will do initial rough filtering of time series that might contain any kind of cyclic behaviour. And then, only on these filtered datasets u gonna put Periodograms / Autocorrelograms and see what's going there for real. Better to do it 10x times less a day on 10x less datasets, right?
I ended up with 2 methods / formulas, I called em 'type 0' and 'type 1':
- type 0: takes sum of abs deviations from drift line, scales it by max abs deviation from the same drift line;
- type 1: takes sum of abs deviations from drift line, scales it by range of non-abs deviations from the same drift line.
Finnaly I've chosen type 0 , both logically (sum of abs dev divided by max abs dev makes more sense) and experimentally. About that actually, here are both formulas put on sine waves with uniform noise:
^^ generated sine wave with uniform noise
^^ both formulas on that wave
^^ both formulas on real data
As you can see type 0 is less affected by noise and shows higher values on synthetic data, but I decided to put type 1 inside as well, in case my analysis was not complete and on real data type 1 can actually be better since it has a lil higher info gain / info content (still not sure). But I can assure u that out of all other ways I've designed & tested for quite a time I tell you, these 2 are really the only ones who got there.
Now about dem thresholds and how to use it.
Both type 0 and type 1 can be modelled with Beta distribution, and based on it and on some obvious & tho non mainstream statistical modelling techniques, I got these thresholds, so these are not optimized overfitted values, but natural ones. Each type has 3 thresholds (from lowest to highest):
- typical value (turned off by default). aka basis ;
- typical deviation from typical value, aka deviation ;
- maximum modelled deviation from typical value (idk whow to call it properly for now, this is my own R&D), aka extension .
So when the metric is above one of these thresholds (which one is up to you, you'll read about it in a sec), it means that there might be a strong enough periodic signal inside the data, and the data got to be put through proper spectral analysis tools to confirm / deny it.
If you look at the pictures above again, you'll see gray signal, that's uniform noise. Take a look at it and see where does it sit comparing to the thresholds. Now you just undertand that picking up a threshold is all about the amount of false positives you care to withstand.
If you take basis as threshold, you'll get tons of false positives (that's why it's even turned off by default), but you'll almost never miss a true positive. If you take deviation as threshold, it's gonna be kinda balanced approach. If you take extension as threshold, you gonna miss some cycles, and gonna get only the strongest ones.
More true positives -> more false positives, less false positives -> less true positives, can't go around that mane
Just to be clear again, I am not completely sure yet, but I def lean towards type 0 as metric, and deviation as threshold.
Live Long and Prosper
P.S.: That was actually the main R&D of the last month, that script I've released earlier came out as derivative.
P.S.: These 2 are the first R&Ds made completely in " art-space", St. Petersburg. Come and see me, say wassup🤘🏻
Seasonaliy
Seasonal Tendencies - SMC IndicatorsA Seasonal Tendency refers to a historical price action behaviour that tends to repeat during specific times of the year, month over month.
It's a roadmap to navigate price action on the daily chart to help determine the medium to long-term bias.
Seasonal Tendencies are NOT an exact prediction of future price action but rather serve as a guideline for spotting high-probability opportunities when combined with other elements of SMC Price Action analysis, such as Order Blocks, Fair Value Gaps, etc...
The Seasonal Tendencies Indicator has been tested to match what ICT has taught in his lectures. It can be applied to any Market or Asset. However, it's limited by the maximum number of years available on tradingview.
Traders can use this Seasonal Tendencies indicator to support their already existing analysis as an added confirmation tool. This indicator should not be used as a main reason to enter a trade idea.
The Seasonal Tendencies Indicator can be used in 2 ways:
1) To look for potential points of long-term reversals during specific times of the year.
2) To look for confirmation and align with an existing long-term trend.
So how does it work?
The Seasonal Tendencies Indicator takes the averages of the last 30, 10, and 5 years' prices by default and compares them to the current year's price action (Green Line).
However, the number of years chosen for the averages can be modified in the indicator's setting.
When looking at the historical price action lines, generally, the price tends to make the lows and highs during specific times of the year.
Note that we should not look at the exact dates these lows and highs form, but we take time periods conceptually instead.
In the example below, the SP500 5-year average made the low on 14 March, and the SP500 10-year average made the low on 23 March.
This gives us the idea that "generally" SP500 makes the low of the year around the 2nd to 3rd week of March every year.
So, IF the trader's analysis was pointing out that SP500 is Bullish, then we use the information that we derived from the Seasonal Tendencies Indicator to look for long setups around the 2nd to 3rd week of March for medium to long-term swing trades.
The Seasonal Tendencies Indicator can also be useful for day traders as it helps support their daily bias to look for trades within the direction of the higher timeframe trend.
How do we measure the strength of the Seasonal Tendencies?
When using the Seasonal Tendencies Indicator, it's important to look for periods where the averages converge and get closer to each other. This usually indicates that during those specific periods, there is a high probability for the price to behave in a certain way.
So the closer the averages are to each other, the more likely the price would respect the Seasonal Tendencies.
Bonus Feature
Premium Discount Range
As a bonus feature, split the Seasonal Tendencies Indicator's Range into 4 quarters to indicate when the price is at a Premium (above the 50% level in Red) and when the price is at a Discount (below the 50% level in blue).
Each Premium and Discount range is also split into 2 halves.
Those levels can also be used to identify potential turning points when comparing the Current Year's price positioning in the Yearly Range to historical price action.
As you can see from the example below, most major turning points happen at around key price levels.
Seasonal Open Interest° by toodegreesDescription:
The Open Interest (OI) is a valuable metric that gets released at the end of each trading day. This metric represents the number of outstanding futures contracts held by market participants for a given commodity or market
The concept of utilizing the OI data as a strategic trading tool was first introduced by Larry Williams :
Rise in Price + Rise in OI: strong trend – new money is coming into the market, showing aggressive buying activity
Rise in Price + Decline in OI: weakening trend – less money coming into the market, suggesting that the move is likely to reverse lower
Decline in Price + Decline in OI: strong trend – new money is coming into the market, showing aggressive selling activity
Decline in Price + Rise in OI: weakening trend – less money coming into the market, suggesting that the move is likely to reverse higher
The Inner Circle Trader (ICT) expanded on these ideas, by exposing Smart Money's behaviour:
Rise in Price + Rise in OI: shorts are being stopped out, and new sellers take their place – gradually, longs get stronger and shorts get weaker
Rise in Price + Decline in OI: Smart Money longs are taking profit and liquidating their positions, and weak shorts are exiting the market
Decline in Price + Decline in OI: longs are being stopped out, and new buyers take their place – gradually, shorts get stronger and longs get weaker
Decline in Price + Rise in OI: Smart Money shorts are taking profit and liquidating their positions, and weak longs are exiting the market
Further, ICT showed the importance of OI in consolidations at Institutional Support or Resistance levels:
Consolidation + Rise in OI: bearish sign due to Smart Money is playing the short side and accumulating positions
Consolidation + Decline in OI: bullish sign due to Smart Money covering their short positions
Last but not least, the Seasonal Open Interest shows us a historical reference point of how OI usually, but not always, develops over the trading year.
Depending on the narrative, a higher/lower OI than its Seasonal Tendency can provide an incredible edge by pointing traders towards what side Smart Money is taking.
The Open Interest Meter shows you a visual representation of how many Standard Deviations the Open Interest is deviating from its Seasonal Tendency.
You can also display this visually as a shaded area between the two metrics:
Features:
Plot Open Interest Data
Plot the Seasonal Open Interest for a specific year
See the OI vs. Seasonal OI in a tailored meter
Shade the area between the OI and the Seasonal OI based on their difference