hasquant
Safe HaskellNone
LanguageHaskell2010

QuantLib.Context

Description

process-global evaluation context: run-time library settings and the exception type raised across the FFI boundary

Synopsis

Types

data Error Source #

Instances

Instances details
Exception Error Source # 
Instance details

Defined in QuantLib.Internal

Show Error Source # 
Instance details

Defined in QuantLib.Internal

Methods

showsPrec :: Int -> Error -> ShowS #

show :: Error -> String #

showList :: [Error] -> ShowS #

Eq Error Source # 
Instance details

Defined in QuantLib.Internal

Methods

(==) :: Error -> Error -> Bool #

(/=) :: Error -> Error -> Bool #

Mutators

setEvaluationDate :: Maybe Day -> IO () Source #

sets the value of the Evaluation Date. Nothing sets the evaluation date to Date::todaysDate() and allow it to change at midnight. This comes at the price of losing some performance, since the evaluation date is re-evaluated each time it is read.

setEnforceTodaysHistoricFixings :: Bool -> IO () Source #

sets the value of the boolean which enforce the usage of historic fixings for today's date

setIncludeTodaysCashFlows :: Maybe Bool -> IO () Source #

sets whether CashFlows occurring on today's date should enter the NPV

setIncludeReferenceDateEvents :: Bool -> IO () Source #

sets whether Events occurring on the reference date should, by default, be taken into account as not happened yet

disableUpdates Source #

Arguments

:: Bool

deferred

-> IO () 

Disables observer notifications. When deferred is True, notifications are queued until enableUpdates is called; otherwise they are discarded.

enableUpdates :: IO () Source #

Enables observer notifications and runs any notifications queued while updates were deferred.

keepingSettings :: IO b -> IO b Source #

brackets to restore settings once action has completed or raised an exception

keepingSettingsGc :: IO b -> IO b Source #

brackets to restore settings once action has completed or raised an exception. Before restoring settings collectGarbage is run to avoid problems with market data objects watching evaluation date

collectGarbage :: IO () Source #

Best effort: give the finalizers of unreachable QuantLib objects a chance to run, so their C++ destructors fire before, say, setEvaluationDate notifies surviving observers.

performGC only schedules finalizers, it does not run them synchronously, so this is a nudge rather than a guarantee. Where correctness depends on an object being gone, anchor its dates so staleness cannot arise in the first place.

setExtendedPrecision :: IO () Source #

Sets the x87 floating-point unit to 64-bit extended precision. On Windows, call on each OS thread before it prices, since the control word is per-thread; a no-op elsewhere.

Inspectors

evaluationDate :: IO Day Source #

returns the current value of the Evaluation Date: the date at which pricing is to be performed

enforceTodaysHistoricFixings :: IO Bool Source #

returns the current value of the boolean which enforce the usage of historic fixings for today's date

includeTodaysCashFlows :: IO (Maybe Bool) Source #

if set, whether CashFlows occurring on today's date should enter the NPV; when the NPV date equals today's date this overrides includeReferenceDateEvents and cannot be overridden locally

includeReferenceDateEvents :: IO Bool Source #

This flag specifies whether or not Events occurring on the reference date should, by default, be taken into account as not happened yet. It can be overridden locally when calling the Event::hasOccurred method.

updatesEnabled :: IO Bool Source #

Whether observer notifications are currently enabled.

updatesDeferred :: IO Bool Source #

Whether observer notifications are currently disabled with deferred delivery enabled.