adjust 1 year return threshold to allow for landing the snap on weekends/holidays
All checks were successful
Generic zig build / build (push) Successful in 26s

This commit is contained in:
Emil Lerch 2026-03-11 12:00:03 -07:00
parent 31ae11cec0
commit 2f49a99ca4
Signed by: lobo
GPG key ID: A7B62D657EF764F8

View file

@ -40,7 +40,7 @@ fn totalReturnFromAdjCloseSnap(candles: []const Candle, from: Date, to: Date, st
return .{
.total_return = total,
.annualized_return = if (years >= 1.0)
.annualized_return = if (years >= 0.95)
std.math.pow(f64, 1.0 + total, 1.0 / years) - 1.0
else
null,
@ -104,7 +104,7 @@ fn totalReturnWithDividendsSnap(
return .{
.total_return = total,
.annualized_return = if (years >= 1.0)
.annualized_return = if (years >= 0.95)
std.math.pow(f64, 1.0 + total, 1.0 / years) - 1.0
else
null,