# Author Archive: cogitolearning

## QuantLib: Yield Curves

In a previous post I discussed the abstract class TermStructure that defines methods common to any kind of term structure. It was pointed out that many classes inherit from the TermStructure class, including a class called YieldTermStructure. This class is, again,…

## QuantLib: Interest Rates

In the section on numeric types in QuantLib, the Rate type was introduced which was intended to hold any kind of rates, including interest rates. The Rate type is essentially a double or a float number, depending on the configuration at…

## Writing a Parser in Java: Setting Variables

During the course of this series we have written a tokenizer, designed a grammar, implemented the grammar in a recursive descent parser and built an expression tree that corresponds to the mathematical expression and  that is able to calculate a…

## Writing a Parser in Java: Creating the Expression Tree

In the last post I  created classes that can represent a mathematical expression in the form of a tree data structure. We saw how expressions could be stored and evaluated but the code was not linked to the parser yet….

## Writing a Parser in Java: The Expression Tree

The last post in this series showed you how a mathematical expression parser was implemented from the grammar that we designed earlier. This was all fine and good but the parser did not do much except confirm if a mathematical…

## Writing a Parser in Java: Implementing the Parser

In the last post about the Java expression parser we designed a grammar for analysing a mathematical expression. That was certainly all a bit abstract and theoretical for many readers. Now we are ready to put some meat on these…

## Writing a Parser in Java: A Grammar for Mathematical Expressions

Previously I introduced the concept on the LL(1) grammar and explained how a parser would go about parsing an input. In this post I want to design a grammar that is capable of parsing mathematical expressions. Before we actually get…

## Writing a Parser in Java: Introduction to the LL(1) Grammar

In the previous post in this series we wrote a tokenizer which splits the input into short segments called tokens. Each type of token is given a unique code and the input is reduced to a series of token codes….

## Writing a Parser in Java: The Tokenizer

In this short series I am talking about how to write a parser that analyses mathematical expressions and turns them into an object tree that is able to evaluate that expression. The first step in writing a parser is to…

## QuantLib: LastFixingQuote

The  LastFixingQuote is an implementation of the abstract Quote class. LastFixingQuote represents a quote for the last available fixing of an index. Essentially it is a simple wrapper around the Index class to allow indices to be used as Quotes. class…

Plugin by Social Author Bio