Refactor code formatting and improve consistency across various test files

- Removed unnecessary blank lines in multiple test files to enhance readability.
- Ensured consistent spacing and formatting in the `Trima`, `Usf`, `Vidya`, `Wma`, and `Atr` test classes.
- Updated comments for clarity and consistency in the `Atr` and `Adl` classes.
- Adjusted project files for better structure and maintainability.
This commit is contained in:
Miha Kralj
2025-12-28 17:44:08 -08:00
parent ad6eebf812
commit 13d7c1215d
169 changed files with 10815 additions and 10814 deletions
+4 -4
View File
@@ -9,14 +9,14 @@ namespace QuanTAlib;
/// <remarks>
/// Beta is calculated as the covariance of the asset's returns and the market's returns,
/// divided by the variance of the market's returns.
///
///
/// Formula:
/// Beta = Cov(Ra, Rm) / Var(Rm)
///
///
/// Where:
/// Ra = Return of Asset
/// Rm = Return of Market
///
///
/// This implementation uses the O(1) slope formula for linear regression of Ra vs Rm:
/// Beta = (N * Sum(Ra*Rm) - Sum(Ra) * Sum(Rm)) / (N * Sum(Rm^2) - Sum(Rm)^2)
/// </remarks>
@@ -25,7 +25,7 @@ public sealed class Beta : AbstractBase
{
private readonly RingBuffer _returnsAsset;
private readonly RingBuffer _returnsMarket;
private double _prevAsset;
private double _prevMarket;
private double _p_prevAsset;