Search in sources :

Example 6 with CalendarDateSeries

use of org.ojalgo.series.CalendarDateSeries in project ojAlgo-finance by optimatika.

the class FinanceUtils method makeDatePriceSeries.

public static CalendarDateSeries<BigDecimal> makeDatePriceSeries(final double[] prices, final Date startDate, final CalendarDateUnit resolution) {
    final CalendarDateSeries<BigDecimal> retVal = new CalendarDateSeries<>(resolution);
    FinanceUtils.copyValues(retVal, new CalendarDate(startDate), prices);
    return retVal;
}
Also used : CalendarDate(org.ojalgo.type.CalendarDate) BigDecimal(java.math.BigDecimal) CalendarDateSeries(org.ojalgo.series.CalendarDateSeries)

Aggregations

CalendarDateSeries (org.ojalgo.series.CalendarDateSeries)6 CalendarDate (org.ojalgo.type.CalendarDate)5 GeometricBrownianMotion (org.ojalgo.random.process.GeometricBrownianMotion)3 BigDecimal (java.math.BigDecimal)2 Test (org.junit.jupiter.api.Test)2 ArrayList (java.util.ArrayList)1 SimpleAsset (org.ojalgo.finance.portfolio.SimpleAsset)1 PrimitiveDenseStore (org.ojalgo.matrix.store.PrimitiveDenseStore)1 Deterministic (org.ojalgo.random.Deterministic)1 LogNormal (org.ojalgo.random.LogNormal)1 RandomNumber (org.ojalgo.random.RandomNumber)1 SampleSet (org.ojalgo.random.SampleSet)1 GeometricBrownian1D (org.ojalgo.random.process.GeometricBrownian1D)1 PrimitiveSeries (org.ojalgo.series.primitive.PrimitiveSeries)1 CalendarDateUnit (org.ojalgo.type.CalendarDateUnit)1