mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-22 04:28:04 +00:00
validation and profiles
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
using OoplesFinance.StockIndicators;
|
||||
using OoplesFinance.StockIndicators.Models;
|
||||
using Skender.Stock.Indicators;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
@@ -88,4 +90,19 @@ public sealed class BbbValidationTests : IDisposable
|
||||
|
||||
_output.WriteLine("BBB validated successfully against Skender PercentB.");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Bbb_MatchesOoples_Structural()
|
||||
{
|
||||
// CalculateBollingerBandsPercentB — structural test
|
||||
var ooplesData = _testData.SkenderQuotes
|
||||
.Select(q => new TickerData { Date = q.Date, Open = (double)q.Open, High = (double)q.High, Low = (double)q.Low, Close = (double)q.Close, Volume = (double)q.Volume })
|
||||
.ToList();
|
||||
|
||||
var result = new StockData(ooplesData).CalculateBollingerBandsPercentB();
|
||||
var values = result.CustomValuesList;
|
||||
|
||||
int finiteCount = values.Count(v => double.IsFinite(v));
|
||||
Assert.True(finiteCount > 100, $"Expected >100 finite Ooples BBB values, got {finiteCount}");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user