utilities.hpp File Reference

Some utilities used within test-suites. More...

#include <ql/instruments/payoffs.hpp>
#include <ql/exercise.hpp>
#include <ql/termstructures/yieldtermstructure.hpp>
#include <ql/termstructures/volatility/equityfx/blackvoltermstructure.hpp>
#include <ql/quote.hpp>
#include <ql/patterns/observable.hpp>
#include <ql/time/daycounters/actual365fixed.hpp>
#include <boost/test/unit_test.hpp>
#include <boost/function.hpp>
#include <vector>
#include <string>
#include <numeric>
#include <iomanip>

Go to the source code of this file.

Namespaces

namespace  QuantLib
namespace  QuantLib::detail

Classes

class  QuantLib::detail::quantlib_test_case
 used to avoid no-assertion messages in Boost 1.35 More...
class  QuantLib::Flag
class  QuantLib::IndexHistoryCleaner
 this cleans up index-fixing histories when destroyed More...

Defines

#define LENGTH(a)   (sizeof(a)/sizeof(a[0]))
 This makes it easier to use array literals (alas, no std::vector literals).
#define QL_FIXED   ""
#define QL_SCIENTIFIC   ""
#define QL_TEST_START_TIMING
#define QUANTLIB_TEST_CASE(f)   BOOST_TEST_CASE(f)

Functions

const char * demangle (const char *)
std::string QuantLib::payoffTypeToString (const boost::shared_ptr< Payoff > &h)
std::string QuantLib::exerciseTypeToString (const boost::shared_ptr< Exercise > &h)
boost::shared_ptr
< YieldTermStructure > 
QuantLib::flatRate (const Date &today, const boost::shared_ptr< Quote > &forward, const DayCounter &dc)
boost::shared_ptr
< YieldTermStructure > 
QuantLib::flatRate (const Date &today, Rate forward, const DayCounter &dc)
boost::shared_ptr
< YieldTermStructure > 
QuantLib::flatRate (const boost::shared_ptr< Quote > &forward, const DayCounter &dc)
boost::shared_ptr
< YieldTermStructure > 
QuantLib::flatRate (Rate forward, const DayCounter &dc)
boost::shared_ptr
< BlackVolTermStructure > 
QuantLib::flatVol (const Date &today, const boost::shared_ptr< Quote > &vol, const DayCounter &dc)
boost::shared_ptr
< BlackVolTermStructure > 
QuantLib::flatVol (const Date &today, Volatility vol, const DayCounter &dc)
boost::shared_ptr
< BlackVolTermStructure > 
QuantLib::flatVol (const boost::shared_ptr< Quote > &vol, const DayCounter &dc)
boost::shared_ptr
< BlackVolTermStructure > 
QuantLib::flatVol (Volatility vol, const DayCounter &dc)
Real QuantLib::relativeError (Real x1, Real x2, Real reference)
template<class Iterator>
Real QuantLib::norm (const Iterator &begin, const Iterator &end, Real h)


Detailed Description

Some utilities used within test-suites.

Author:
Walter Eaves <Walter.Eaves@depfa.com>
Date:
Mon Jan 18 17:34:34 2010

Definition in file utilities.hpp.


Define Documentation

#define LENGTH (  )     (sizeof(a)/sizeof(a[0]))

This makes it easier to use array literals (alas, no std::vector literals).

Definition at line 50 of file utilities.hpp.

#define QL_FIXED   ""

the following works around a problem with Boost 1.32 where std::fixed and similar manipulators could not be sent to the Boost streams

Definition at line 58 of file utilities.hpp.

#define QL_SCIENTIFIC   ""

Definition at line 59 of file utilities.hpp.

#define QL_TEST_START_TIMING

the following displays the elapsed time for the test if QL_DISPLAY_TEST_TIME is defined.

Definition at line 68 of file utilities.hpp.

#define QUANTLIB_TEST_CASE (  )     BOOST_TEST_CASE(f)

Definition at line 72 of file utilities.hpp.


Generated on Thu Feb 18 21:30:12 2010 for eleve by  doxygen 1.5.6