⛔ Avoid market GAP with PineTS #113
tripolskypetr
started this conversation in
Ideas
Replies: 1 comment
-
|
Hey, go review this |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
📉 Why the Price Drops in a Single Candle
In 2026, "buy and hold" is a bet that you can endure a -40…-70% drawdown without an emotional or margin-triggered exit. The market has become fragile: liquidation cascades happen several times a year. Static holding no longer works.
What Are Options
If you bought a stock for $100 and it went up 10%, you have +$10 — simple and linear. Options work differently. An option is an obligation to sell a stock later at a fixed price. Their price changes unevenly: sometimes slowly, sometimes very sharply. This "curvature" is the key feature. The further away from expiration, the more curvature is "accumulated." Closer to expiration it vanishes — time works against the holder.
Smooth Movement vs. Sudden Jumps
Most textbook models assume that a stock's price changes in very small steps — continuously, with no teleportation. Reality is different: the price suddenly drops. During such a jump, adjusting the position is impossible — there were no trades at intermediate prices. Therefore, the outcome during a gap depends more on luck than on the quality of your strategy.
How Positions Are Adjusted
There are two major client groups:
First group — pension funds and banks.
They buy put options to report nicely to management/depositors: "yes, the market fell, but we have protection, losses are unrealized."
Second group — company investors.
They buy products like "protected growth": if the market rises significantly — you get a share of the profit; if it falls — you lose nothing (at least on paper).
This creates a fork — if the price rises, we buy at a better price. If the price falls, we have a SHORT open from another investor.
Conflict of Interest
Hedge fund economics create a specific incentive structure.
A hedge fund does not guarantee loss coverage.
2% management fee — collected regardless of results, even if the client is at a loss
20% performance fee — only on profits (usually with a high-water mark)
Losses — borne entirely by the client
The first part (2% of AUM) is a "salary for time." The longer the money stays in the fund and the larger the AUM, the greater the guaranteed income.
The fund benefits from:
Goals 2 (keep longer) and 3 (generate profit) conflict. A fund can hold low-risk positions for years, collect 2%, and not chase performance fees. Many do exactly that.
This creates a mismatch: the fund benefits from long holding periods, while the client's capital remains exposed to tail risk.
How Cascades and "Sudden" Crashes Occur
When many participants are forced to close positions simultaneously, the price starts moving on its own, amplifying the pressure. One large gap → hedge can't keep up → big loss → even more forced selling → even larger gap. This is how famous crashes happened: 2008, March 2020, and dozens of smaller episodes.
How to Protect Against a Drop
To reduce the probability of being caught in a GAP, you need to minimize the time capital stays in a position.
The Compromise
To balance between holding time and stock returns, one could monitor market sentiment.
According to the efficient market hypothesis from Eugene Fama's work, Japanese candlesticks already incorporate the market's reaction to news. The thing is, traders buy on rumors and sell on news. You can verify this in practice by opening TradingView after a news event: the lightning bolt icon (Latest News) always shows a preceding sustained price movement of many points.
What Should an Individual Do
Instead of long-term holding — an adaptive system:
Example Skeleton:
Code Examples:
Over a long time horizon, this won't converge to 50/50 with a zero-sum and no profit under the efficient market hypothesis: any public information (including patterns, indicators, signals) is already priced in. If RSI oversold "works," then arbitrageurs will buy before RSI reaches 30, diluting the signal.
The key point: you need to cut backtest strategy time to zero through self-reinforcement runtime, since the bet is on temporary inefficiencies and regime adaptation.
The adaptive cycle has no "done" state — parameters are recalculated on each iteration for the current market regime.
Volatility filter (GARCH):
JavaScript integration:
Position management:
Staged exit: 33% at each TP level. This locks in profit before a reversal. After breakeven — tighten the SL to protect accumulated gains.
Beta Was this translation helpful? Give feedback.
All reactions