validation and profiles

This commit is contained in:
Miha Kralj
2026-02-26 22:02:52 -08:00
parent 9ab37c1200
commit 8a1ba95173
317 changed files with 18704 additions and 622 deletions
@@ -1,4 +1,6 @@
using System.Runtime.CompilerServices;
using OoplesFinance.StockIndicators;
using OoplesFinance.StockIndicators.Models;
using Xunit;
using Xunit.Abstractions;
@@ -192,4 +194,23 @@ public sealed class DpoValidationTests(ITestOutputHelper output) : IDisposable
}
#endregion
#region Ooples Cross-Validation
[Fact]
public void Dpo_MatchesOoples_Structural()
{
// CalculateDetrendedPriceOscillator — structural test (different centering convention)
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).CalculateDetrendedPriceOscillator();
var values = result.CustomValuesList;
int finiteCount = values.Count(v => double.IsFinite(v));
Assert.True(finiteCount > 100, $"Expected >100 finite Ooples DPO values, got {finiteCount}");
}
#endregion
}