INVITE-ONLY SCRIPT

Volatility Simulation & Analysis

47
🙏🏻 The main purpose of this tool is to define your stop-losses and take-profits, even tho it's really fast (time complexity O(n)), it does Monte Carlo simulations inside, providing you the Way higher info gain.

This method is more advanced than using structural volatility analysis, such as stdev on raw data, in a sense that the outputs have lower variance but higher bias. However, in return for that, it provides means to know where to look for breakeven exits, smth you can't really do non-arbitrary with structural volatility.

...

How to use:
The script outputs 4 lines, 2 outer lines are used for hard stop-losses and take-profits distances, and inner 2 lines are used for the soft stop-losses and take-profits distances.

Hard ones are used to setup final SLs and TP.
Soft ones are used to trigger attempts to exit at breakeven.


The choice of direction (blue/red line) should be based according to your initial position direction. So for longs you'll need blue lines for soft & hard take profits, and red lines for soft & hard stop-losses. Vice versa for shorts.

Feel free to improve it, but that's the baseline ruleset and tbh it's more than enough.

...


How it works
It's fully O(N).
This method is closely related to Monte Carlo and VaR, but adapts them to live use for more practical tasks rather than offline simulations & post analysis. The method fully resides in L2.

I use 2 separate streams of innovations from MFPM model (explained here).

From each stream I learn it's parameters, and generate numerous Gamma distributed noise instances, that unlike Exponential noise are more flexible and allow to use both location and scale as separate parameters. Synthetic data generation is the Only part of the method that degrades it to O(N), everything else is O(1).

Then I process data cross-sectionally (all samples per one time-stamp), to discover location and scale of each section. These 2 streams then smoothed with attributing higher weights to higher values, so even tho we smooth, we still are honest to the higher importance of higher values.

Finally I construct soft and hard volatility envelopes, and scale them from local to global frame. Soft (inner) envelopes model the typical max excursions, while outer (hard) envelopes model rare extreme excursions.

...

be cool aye?



คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน