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** | [beta.pine](beta.pine) |
- Beta measures the volatility of an asset in relation to the overall market.
- Parameterized by `period`.
- Output range: Varies (see docs).
- Requires `period + 1` bars of warmup before first valid output (IsHot = true).
- **Similar:** [Correlation](../correlation/Correlation.md), [Covariance](../covariance/Covariance.md) | **Trading note:** Beta coefficient; measures systematic risk vs benchmark. β>1 = amplifies market moves.
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
Beta measures the volatility of an asset in relation to the overall market. It's the slope of the regression line between the asset's returns and the market's returns. A beta of 1.0 means the asset moves in lockstep with the market. A beta of 2.0 means the asset is twice as volatile as the market.
@@ -109,4 +107,4 @@ var beta = new Beta(20);
// (e.g., AAPL price and SPY price)
TValue result = beta.Update(assetPrice, marketPrice);
Console.WriteLine($"Beta: {result.Value:F4}");
Console.WriteLine($"Beta: {result.Value:F4}");