Package org.jquantlib.indexes

Examples of org.jquantlib.indexes.IndexManager


        else {
            final Handle<YieldTermStructure> termStructure = index_.termStructure();
            QL.require(termStructure != null , NULL_TERM_STRUCTURE)// QA:[RG]::verified
            final Date today = settings.evaluationDate();
            final Date fixing_date = fixingDate();
            final IndexManager indexManager = IndexManager.getInstance();
            if (fixing_date.lt(today)) {
                final double pastFixing = indexManager.get (index_.name()).get(fixing_date);
                QL.require(!Double.isNaN(pastFixing), "Missing fixing"); // TODO: message
                return pastFixing;
            }
            if (fixing_date.equals(today)) {
                try {
                    final double pastFixing = indexManager.get(index_.name()).get(fixing_date);
                    if (! Double.isNaN (pastFixing))
                        return pastFixing;
                } catch (final Exception e) {
                    ; // fall through and forecast
                }
View Full Code Here


        else {
            final Handle<YieldTermStructure> termStructure = index_.termStructure();
            QL.require(termStructure != null , NULL_TERM_STRUCTURE)// QA:[RG]::verified
            final Date today = settings.evaluationDate();
            final Date fixing_date = fixingDate();
            final IndexManager indexManager = IndexManager.getInstance();
            if (fixing_date.lt(today)) {
                final double pastFixing = indexManager.getHistory(index_.name()).get(fixing_date);
                QL.require(!Double.isNaN(pastFixing), "Missing fixing"); // TODO: message
                return pastFixing;
            }
            if (fixing_date.equals(today)) {
                try {
                    final double pastFixing = indexManager.getHistory(index_.name()).get(fixing_date);
                    if (! Double.isNaN (pastFixing))
                        return pastFixing;
                } catch (final Exception e) {
                    ; // fall through and forecast
                }
View Full Code Here

TOP

Related Classes of org.jquantlib.indexes.IndexManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.