Package org.jquantlib.lang.exceptions

Examples of org.jquantlib.lang.exceptions.LibraryException


        case Months:
          return p.length();
        case Years:
          return p.length()*12.0;
        default:
          throw new LibraryException(UNKNOWN_TIME_UNIT);
      }
    }
View Full Code Here


          return p.length();
        case Months:
        case Years:
          throw new IllegalArgumentException(UNDECIDABLE_COMPARISON);
        default:
          throw new LibraryException(UNKNOWN_TIME_UNIT);
      }
    }
View Full Code Here

          return p.length()*7.0;
        case Months:
        case Years:
          throw new IllegalArgumentException(UNDECIDABLE_COMPARISON);
        default:
          throw new LibraryException(UNKNOWN_TIME_UNIT);
      }
    }
View Full Code Here

        case Weeks:
          return this.length()*7;
        case Days:
          return this.length();
        default:
          throw new LibraryException(UNKNOWN_TIME_UNIT);
      }
    }
View Full Code Here

    case Weeks:
      return this.length()*7;
    case Days:
      return this.length();
    default:
      throw new LibraryException(UNKNOWN_TIME_UNIT);
  }

    }
View Full Code Here

    public void accept(final TypedVisitor<TermStructure> v) {
        final Visitor<TermStructure> v1 = (v!=null) ? v.getVisitor(this.getClass()) : null;
        if (v1 != null) {
            v1.visit(this);
        } else
            throw new LibraryException("not a Black-volatility term structure visitor"); // QA:[RG]::verified // TODO: message
    }
View Full Code Here

    public GarmanKlassOpenClose(final double y, final double marketOpenFraction, final double a) {
        this.delegate = null;
        try {
            delegate = (T) TypeToken.getClazz(this.getClass()).getConstructor(double.class).newInstance(y);
        } catch (final Exception e) {
            throw new LibraryException(e); // QA:[RG]::verified
        }
        this.f = marketOpenFraction;
        this.a = a;
    }
View Full Code Here

    }

    public abstract Array volatility(double t, Array x);

    public double integratedVariance(final int i, final int ii, final double t, final Array list){
        throw new LibraryException(integrated_variance_not_supported); // QA:[RG]::verified
    }
View Full Code Here

      return (new Sabr()).sabrVolatility(x, forward_, itsCoeffs.t_, itsCoeffs.alpha_, itsCoeffs.beta_, itsCoeffs.nu_, itsCoeffs.rho_);
    }

    @Override
        public double primitive(final double x) {
      throw new LibraryException("SABR primitive not implemented");
    }
View Full Code Here

      throw new LibraryException("SABR primitive not implemented");
    }

    @Override
        public double derivative(final double x) {
      throw new LibraryException("SABR derivative not implemented");
    }
View Full Code Here

TOP

Related Classes of org.jquantlib.lang.exceptions.LibraryException

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.