Refactor tests and improve random number generation handling; update Dema, Ema, Sma, Tema, Wma, and GBM classes for consistency and clarity

This commit is contained in:
Miha Kralj
2025-12-05 10:33:27 -08:00
parent 9e152b9027
commit 3b146b68bd
10 changed files with 240 additions and 242 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
namespace QuanTAlib.Tests;
#pragma warning disable S2245 // Random is acceptable for simulation/testing purposes
public class EmaTests
{
[Fact]
@@ -441,7 +442,7 @@ public class EmaTests
{
double[] source = new double[10000];
double[] output = new double[10000];
var rng = new Random(42);
var rng = new Random(42); // nosemgrep
for (int i = 0; i < source.Length; i++)
source[i] = rng.NextDouble() * 100;