lib/roi/rentability.rb in roi_calculator-0.1.3 vs lib/roi/rentability.rb in roi_calculator-0.1.4
- old
+ new
@@ -62,10 +62,10 @@
0.upto(filtered.size - days).map do |low|
series = filtered.slice(low, days + 1)
vol = MathUtil.volatility(series)
date = dates_with_position.fetch(low + days) { dates_with_position.last }
- [date.to_s(:db), vol] if date
+ [date.strftime("%Y-%m-%d"), vol] if date
end
end
def to_a
dates_with_position.map do |date|