mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-22 04:28:04 +00:00
feat(tests): update tests to use GBM for random data generation; improve consistency and realism in Skew and Variance tests; refine validation logic in Beta tests
This commit is contained in:
@@ -176,11 +176,11 @@ public class SkewTests
|
||||
{
|
||||
// Run for > 1000 updates to trigger Resync
|
||||
var skew = new Skew(10);
|
||||
var random = new Random(123);
|
||||
var gbm = new GBM(startPrice: 100, mu: 0.05, sigma: 0.2, seed: 123);
|
||||
|
||||
for (int i = 0; i < 1100; i++)
|
||||
{
|
||||
skew.Update(new TValue(DateTime.UtcNow, random.NextDouble() * 100));
|
||||
skew.Update(new TValue(DateTime.UtcNow, gbm.Next().Close));
|
||||
}
|
||||
|
||||
Assert.True(double.IsFinite(skew.Last.Value));
|
||||
|
||||
Reference in New Issue
Block a user