| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
QuantLib.Context
Contents
Description
process-global evaluation context: run-time library settings and the exception type raised across the FFI boundary
Synopsis
- data Error
- setEvaluationDate :: Maybe Day -> IO ()
- setEnforceTodaysHistoricFixings :: Bool -> IO ()
- setIncludeTodaysCashFlows :: Maybe Bool -> IO ()
- setIncludeReferenceDateEvents :: Bool -> IO ()
- disableUpdates :: Bool -> IO ()
- enableUpdates :: IO ()
- keepingSettings :: IO b -> IO b
- keepingSettingsGc :: IO b -> IO b
- collectGarbage :: IO ()
- setExtendedPrecision :: IO ()
- evaluationDate :: IO Day
- enforceTodaysHistoricFixings :: IO Bool
- includeTodaysCashFlows :: IO (Maybe Bool)
- includeReferenceDateEvents :: IO Bool
- updatesEnabled :: IO Bool
- updatesDeferred :: IO Bool
- version :: String
- boostVersion :: String
- epsilon :: Double
Types
Constructors
| CPlusPlusException String | |
| DateConversion Day | |
| EnumConversion String |
Instances
| Exception Error Source # | |
Defined in QuantLib.Internal Methods toException :: Error -> SomeException # fromException :: SomeException -> Maybe Error # displayException :: Error -> String # backtraceDesired :: Error -> Bool # | |
| Show Error Source # | |
| Eq Error Source # | |
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
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.