Merge branch 'dev'

This commit is contained in:
Miha Kralj
2026-03-13 13:47:10 -07:00
404 changed files with 2754 additions and 1763 deletions
+2 -4
View File
@@ -13,9 +13,7 @@
| **PineScript** | [twap.pine](twap.pine) |
- Time Weighted Average Price (TWAP) calculates the average price over a period by giving equal weight to each price point, regardless of volume.
- Parameterized by `period` (default defaultperiod).
- Output range: Unbounded.
- Requires `> 1` bars of warmup before first valid output (IsHot = true).
- **Similar:** [VWAP](../vwap/Vwap.md) | **Complementary:** Volume | **Trading note:** Time-Weighted Average Price; equal time weighting vs volume weighting. Algorithmic execution benchmark.
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
Time Weighted Average Price (TWAP) calculates the average price over a period by giving equal weight to each price point, regardless of volume. Unlike VWAP which emphasizes high-volume periods, TWAP treats every moment as equally important. This makes it a pure temporal benchmark—ideal for evaluating execution quality when volume patterns could bias the analysis.
@@ -271,4 +269,4 @@ Target: Minimize absolute slippage to achieve the unbiased average price.
- Almgren, R., & Chriss, N. (2001). "Optimal Execution of Portfolio Transactions." *Journal of Risk*.
- Berkowitz, S., Logue, D., & Noser, E. (1988). "The Total Cost of Transactions on the NYSE." *Journal of Finance*.
- Kissell, R., & Glantz, M. (2003). *Optimal Trading Strategies*. AMACOM.
- TradingView. "PineScript TWAP Implementation." Community Scripts.
- TradingView. "PineScript TWAP Implementation." Community Scripts.