never executed always true always false
1 -- GENERATED by C->Haskell Compiler, version 0.28.8 Switcheroo, 25 November 2017 (Haskell)
2 -- Edit the ORIGNAL .chs file instead!
3
4
5 module QuantLib.Quote
6 (
7 -- * Types
8 -- ** Quote hierarchy
9 GenQuote
10 , Quote
11 , SimpleQuote
12 , DeltaVolQuote
13 , FuturesConvAdjustmentQuote
14 , RelinkableQuote
15
16 -- ** Configuration
17 , PriceType(..)
18 , IntervalPriceType(..)
19 , AtmType(..)
20 , DeltaType(..)
21 , QuoteOp(..)
22 , MultiQuoteOp(..)
23
24 -- * Constructors
25 -- ** Basic quotes and conversions
26 , asQuote
27 , simpleQuote
28 , deltaVolQuote
29 , atmVolQuote
30 , eurodollarFuturesImpliedStdDevQuote
31 , forwardSwapQuote
32 , forwardValueQuote
33 , futuresConvAdjustmentQuoteFromImmCode
34 , futuresConvAdjustmentQuote
35 , impliedStdDevQuote
36 , lastFixingQuote
37 , relinkableQuote
38 -- ** Composite quotes
39 , derivedQuote
40 , compositeQuote
41 , multiCompositeQuote
42 , withDerivedQuote
43 , withCompositeQuote
44 , withMultiCompositeQuote
45
46 -- * Mutators
47 , setValue
48 , linkTo
49
50 -- * Inspectors
51 , value
52 , isValid
53 , futuresValue
54 ) where
55 import qualified Foreign.C.String as C2HSImp
56 import qualified Foreign.C.Types as C2HSImp
57 import qualified Foreign.ForeignPtr as C2HSImp
58 import qualified Foreign.Marshal.Utils as C2HSImp
59 import qualified Foreign.Ptr as C2HSImp
60
61
62
63 import QuantLib.Internal
64 import QuantLib.Internal.Common
65 import QuantLib.Internal.Type
66
67
68
69
70
71
72
73 data IntervalPriceType = IntervalPriceOpen
74 | IntervalPriceClose
75 | IntervalPriceHigh
76 | IntervalPriceLow
77 deriving (Enum,Show,Eq,Read)
78
79
80 data AtmType = AtmNull
81 | AtmSpot
82 | AtmFwd
83 | AtmDeltaNeutral
84 | AtmVegaMax
85 | AtmGammaMax
86 | AtmPutCall50
87 deriving (Enum,Show,Eq,Read)
88
89
90 data PriceType = Bid
91 | Ask
92 | Last
93 | Close
94 | Mid
95 | MidEquivalent
96 | MidSafe
97 deriving (Enum,Show,Eq,Read)
98
99
100 data DeltaType = Spot
101 | Fwd
102 | PaSpot
103 | PaFwd
104 deriving (Enum,Show,Eq,Read)
105
106
107
108 -- |Operation used by 'derivedQuote' or 'compositeQuote'. The former applies
109 -- @quote \`op\` operand@; the latter applies @quote1 \`op\` quote2@. Use
110 -- 'withDerivedQuote' for reversed unary operations such as FX inversion.
111 data QuoteOp = QuoteAdd
112 | QuoteSubtract
113 | QuoteMultiply
114 | QuoteDivide
115 deriving (Show,Eq,Read,Bounded)
116 instance Enum QuoteOp where
117 succ QuoteAdd = QuoteSubtract
118 succ QuoteSubtract = QuoteMultiply
119 succ QuoteMultiply = QuoteDivide
120 succ QuoteDivide = error "QuoteOp.succ: QuoteDivide has no successor"
121
122 pred QuoteSubtract = QuoteAdd
123 pred QuoteMultiply = QuoteSubtract
124 pred QuoteDivide = QuoteMultiply
125 pred QuoteAdd = error "QuoteOp.pred: QuoteAdd has no predecessor"
126
127 enumFromTo from to = go from
128 where
129 end = fromEnum to
130 go v = case compare (fromEnum v) end of
131 LT -> v : go (succ v)
132 EQ -> [v]
133 GT -> []
134
135 enumFrom from = enumFromTo from QuoteDivide
136
137 fromEnum QuoteAdd = 0
138 fromEnum QuoteSubtract = 1
139 fromEnum QuoteMultiply = 2
140 fromEnum QuoteDivide = 3
141
142 toEnum 0 = QuoteAdd
143 toEnum 1 = QuoteSubtract
144 toEnum 2 = QuoteMultiply
145 toEnum 3 = QuoteDivide
146 toEnum unmatched = error ("QuoteOp.toEnum: Cannot match " ++ show unmatched)
147
148
149
150 -- |Which fold a catalogue 'multiCompositeQuote' applies over its elements.
151 data MultiQuoteOp = QuoteSum
152 | QuoteProduct
153 | QuoteNorm2
154 deriving (Show,Eq,Read,Bounded)
155 instance Enum MultiQuoteOp where
156 succ QuoteSum = QuoteProduct
157 succ QuoteProduct = QuoteNorm2
158 succ QuoteNorm2 = error "MultiQuoteOp.succ: QuoteNorm2 has no successor"
159
160 pred QuoteProduct = QuoteSum
161 pred QuoteNorm2 = QuoteProduct
162 pred QuoteSum = error "MultiQuoteOp.pred: QuoteSum has no predecessor"
163
164 enumFromTo from to = go from
165 where
166 end = fromEnum to
167 go v = case compare (fromEnum v) end of
168 LT -> v : go (succ v)
169 EQ -> [v]
170 GT -> []
171
172 enumFrom from = enumFromTo from QuoteNorm2
173
174 fromEnum QuoteSum = 0
175 fromEnum QuoteProduct = 1
176 fromEnum QuoteNorm2 = 2
177
178 toEnum 0 = QuoteSum
179 toEnum 1 = QuoteProduct
180 toEnum 2 = QuoteNorm2
181 toEnum unmatched = error ("MultiQuoteOp.toEnum: Cannot match " ++ show unmatched)
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202 -- |market element returning a stored value
203 simpleQuote :: (Double) -> IO ((SimpleQuote))
204 simpleQuote a1 =
205 let {a1' = realToFrac a1} in
206 preErrorCheck $ \a2' ->
207 simpleQuote'_ a1' a2' >>= \res ->
208 peekSimpleQuote res >>= \res' ->
209 errorCheck a2'>>
210 return (res')
211
212
213
214 -- |quotation of an FX delta vs vol, e.g. a 25-delta risk-reversal/butterfly point
215 deltaVolQuote :: (Double) -- ^delta
216 -> (GenQuote q) -- ^vol
217 -> (Double) -- ^maturity
218 -> (DeltaType) -> IO ((DeltaVolQuote))
219 deltaVolQuote a1 a2 a3 a4 =
220 let {a1' = realToFrac a1} in
221 withQuote a2 $ \a2' ->
222 let {a3' = realToFrac a3} in
223 let {a4' = fromEnumC a4} in
224 preErrorCheck $ \a5' ->
225 deltaVolQuote'_ a1' a2' a3' a4' a5' >>= \res ->
226 peekDeltaVolQuote res >>= \res' ->
227 errorCheck a5'>>
228 return (res')
229
230
231
232 -- |quotation of an FX at-the-money vol point (e.g. ATM straddle)
233 atmVolQuote :: (GenQuote q) -- ^vol
234 -> (DeltaType) -> (Double) -- ^maturity
235 -> (AtmType) -> IO ((DeltaVolQuote))
236 atmVolQuote a1 a2 a3 a4 =
237 withQuote a1 $ \a1' ->
238 let {a2' = fromEnumC a2} in
239 let {a3' = realToFrac a3} in
240 let {a4' = fromEnumC a4} in
241 preErrorCheck $ \a5' ->
242 atmVolQuote'_ a1' a2' a3' a4' a5' >>= \res ->
243 peekDeltaVolQuote res >>= \res' ->
244 errorCheck a5'>>
245 return (res')
246
247
248
249 -- |Returns the current value of the given Quote object
250 value :: (GenQuote q) -> IO ((Double))
251 value a1 =
252 withQuote a1 $ \a1' ->
253 preErrorCheck $ \a2' ->
254 value'_ a1' a2' >>= \res ->
255 let {res' = realToFrac res} in
256 errorCheck a2'>>
257 return (res')
258
259
260
261 -- |returns the difference between the new value and the old value
262 -- /NB/ The change will propagate to all users of the quote
263 setValue :: (SimpleQuote) -> (Double) -> IO ((Double))
264 setValue a1 a2 =
265 withGenQuote a1 $ \a1' ->
266 let {a2' = realToFrac a2} in
267 preErrorCheck $ \a3' ->
268 setValue'_ a1' a2' a3' >>= \res ->
269 let {res' = realToFrac res} in
270 errorCheck a3'>>
271 return (res')
272
273
274
275 -- |implied standard deviation of a Eurodollar future's underlying, solved from its call/put prices
276 eurodollarFuturesImpliedStdDevQuote :: (GenQuote q1) -- ^forward
277 -> (GenQuote q2) -- ^callPrice
278 -> (GenQuote q3) -- ^putPrice
279 -> (Double) -- ^strike
280 -> (Double) -- ^guess
281 -> (Double) -- ^accuracy
282 -> (Word) -- ^maxIter
283 -> IO ((Quote))
284 eurodollarFuturesImpliedStdDevQuote a1 a2 a3 a4 a5 a6 a7 =
285 withQuote a1 $ \a1' ->
286 withQuote a2 $ \a2' ->
287 withQuote a3 $ \a3' ->
288 let {a4' = realToFrac a4} in
289 let {a5' = realToFrac a5} in
290 let {a6' = realToFrac a6} in
291 let {a7' = fromIntegral a7} in
292 preErrorCheck $ \a8' ->
293 eurodollarFuturesImpliedStdDevQuote'_ a1' a2' a3' a4' a5' a6' a7' a8' >>= \res ->
294 peekQuote res >>= \res' ->
295 errorCheck a8'>>
296 return (res')
297
298
299
300 -- |implied rate of a forward-starting swap on the given swap index, offset by a spread quote
301 forwardSwapQuote :: (GenSwapIndex sidx) -> (GenQuote q) -- ^spread
302 -> ((Int,TimeUnit)) -- ^fwdStart
303 -> IO ((Quote))
304 forwardSwapQuote a1 a2 a3 =
305 withSwapIndex a1 $ \a1' ->
306 withQuote a2 $ \a2' ->
307 let {(a3'1, a3'2) = fromEnumQuantity a3} in
308 preErrorCheck $ \a4' ->
309 forwardSwapQuote'_ a1' a2' a3'1 a3'2 a4' >>= \res ->
310 peekQuote res >>= \res' ->
311 errorCheck a4'>>
312 return (res')
313
314
315
316 -- |forward value of an index as of a given fixing date
317 forwardValueQuote :: (GenIndex idx) -> (Day) -> IO ((Quote))
318 forwardValueQuote a1 a2 =
319 withIndex a1 $ \a1' ->
320 withDay a2 $ \a2' ->
321 preErrorCheck $ \a3' ->
322 forwardValueQuote'_ a1' a2' a3' >>= \res ->
323 peekQuote res >>= \res' ->
324 errorCheck a3'>>
325 return (res')
326
327
328
329 -- |futures-convexity adjustment for an Ibor future identified by its IMM code
330 futuresConvAdjustmentQuoteFromImmCode :: (GenIborIndex ibor) -> (String) -- ^immCode
331 -> (GenQuote q1) -- ^futuresQuote
332 -> (GenQuote q2) -- ^volatility
333 -> (GenQuote q3) -- ^meanReversion
334 -> IO ((FuturesConvAdjustmentQuote))
335 futuresConvAdjustmentQuoteFromImmCode a1 a2 a3 a4 a5 =
336 withIborIndex a1 $ \a1' ->
337 C2HSImp.withCString a2 $ \a2' ->
338 withQuote a3 $ \a3' ->
339 withQuote a4 $ \a4' ->
340 withQuote a5 $ \a5' ->
341 preErrorCheck $ \a6' ->
342 futuresConvAdjustmentQuoteFromImmCode'_ a1' a2' a3' a4' a5' a6' >>= \res ->
343 peekFuturesConvAdjustmentQuote res >>= \res' ->
344 errorCheck a6'>>
345 return (res')
346
347
348
349 -- |futures-convexity adjustment for an Ibor future identified by its futures (IMM) date
350 futuresConvAdjustmentQuote :: (GenIborIndex ibor) -> (Day) -- ^futuresDate
351 -> (GenQuote q1) -- ^futuresQuote
352 -> (GenQuote q2) -- ^volatility
353 -> (GenQuote q3) -- ^meanReversion
354 -> IO ((FuturesConvAdjustmentQuote))
355 futuresConvAdjustmentQuote a1 a2 a3 a4 a5 =
356 withIborIndex a1 $ \a1' ->
357 withDay a2 $ \a2' ->
358 withQuote a3 $ \a3' ->
359 withQuote a4 $ \a4' ->
360 withQuote a5 $ \a5' ->
361 preErrorCheck $ \a6' ->
362 futuresConvAdjustmentQuote'_ a1' a2' a3' a4' a5' a6' >>= \res ->
363 peekFuturesConvAdjustmentQuote res >>= \res' ->
364 errorCheck a6'>>
365 return (res')
366
367
368
369 -- |The futures-vs-forward-rate value implied by the futures quote alone (@futuresQuote_->value()@).
370 futuresValue :: (FuturesConvAdjustmentQuote) -> IO ((Double))
371 futuresValue a1 =
372 withGenQuote a1 $ \a1' ->
373 preErrorCheck $ \a2' ->
374 futuresValue'_ a1' a2' >>= \res ->
375 let {res' = realToFrac res} in
376 errorCheck a2'>>
377 return (res')
378
379
380
381 -- |implied standard deviation of an underlying, solved from its option price at a given strike
382 impliedStdDevQuote :: (OptionType) -> (GenQuote q1) -- ^forward
383 -> (GenQuote q2) -- ^price
384 -> (Double) -- ^strike
385 -> (Double) -- ^guess
386 -> (Double) -- ^accuracy
387 -> (Word) -- ^maxIter
388 -> IO ((Quote))
389 impliedStdDevQuote a1 a2 a3 a4 a5 a6 a7 =
390 let {a1' = fromEnumC a1} in
391 withQuote a2 $ \a2' ->
392 withQuote a3 $ \a3' ->
393 let {a4' = realToFrac a4} in
394 let {a5' = realToFrac a5} in
395 let {a6' = realToFrac a6} in
396 let {a7' = fromIntegral a7} in
397 preErrorCheck $ \a8' ->
398 impliedStdDevQuote'_ a1' a2' a3' a4' a5' a6' a7' a8' >>= \res ->
399 peekQuote res >>= \res' ->
400 errorCheck a8'>>
401 return (res')
402
403
404
405 -- |last available fixing of the given index, updating whenever a new fixing is added
406 lastFixingQuote :: (GenIndex idx) -> IO ((Quote))
407 lastFixingQuote a1 =
408 withIndex a1 $ \a1' ->
409 preErrorCheck $ \a2' ->
410 lastFixingQuote'_ a1' a2' >>= \res ->
411 peekQuote res >>= \res' ->
412 errorCheck a2'>>
413 return (res')
414
415
416
417 -- |returns true if the Quote holds a valid value
418 isValid :: (GenQuote q) -> IO ((Bool))
419 isValid a1 =
420 withQuote a1 $ \a1' ->
421 preErrorCheck $ \a2' ->
422 isValid'_ a1' a2' >>= \res ->
423 let {res' = C2HSImp.toBool res} in
424 errorCheck a2'>>
425 return (res')
426
427
428
429 -- |A relinkable quote handle. Objects built from it follow later 'linkTo' calls.
430 -- 'Nothing' creates an empty handle; reading it throws until linked.
431 relinkableQuote :: (Maybe (GenQuote q)) -> IO ((RelinkableQuote))
432 relinkableQuote a1 =
433 withMaybeQuote a1 $ \a1' ->
434 preErrorCheck $ \a2' ->
435 relinkableQuote'_ a1' a2' >>= \res ->
436 peekRelinkableQuote res >>= \res' ->
437 errorCheck a2'>>
438 return (res')
439
440
441
442 -- |Point a relinkable handle at another quote. Existing dependents reprice without reconstruction.
443 -- Use 'setValue' for a value bump; this swaps the quote object.
444 linkTo :: (RelinkableQuote) -> (GenQuote q) -> IO ()
445 linkTo a1 a2 =
446 withRelinkableQuote a1 $ \a1' ->
447 withQuote a2 $ \a2' ->
448 preErrorCheck $ \a3' ->
449 linkTo'_ a1' a2' a3' >>
450 errorCheck a3'>>
451 return ()
452
453
454
455 -- These composite quotes are live observer-graph nodes. Haskell-side recomputation would be a snapshot and would not notify dependent curves or instruments.
456
457 -- |A quote derived from another by applying @quote \`op\` operand@, live: it recomputes whenever
458 -- the underlying quote moves, and notifies everything built on it.
459 --
460 -- @'derivedQuote' 'QuoteAdd' base 0.0005@ is the "base plus 5bp" spread quote for a rate helper.
461 -- For anything outside the 'QuoteOp' catalogue -- @1\/x@, a cap, a nonlinear transform -- use
462 -- 'withDerivedQuote'.
463 derivedQuote :: (QuoteOp) -> (GenQuote q) -> (Double) -- ^operand
464 -> IO ((Quote))
465 derivedQuote a1 a2 a3 =
466 let {a1' = fromEnumC a1} in
467 withQuote a2 $ \a2' ->
468 let {a3' = realToFrac a3} in
469 preErrorCheck $ \a4' ->
470 derivedQuote'_ a1' a2' a3' a4' >>= \res ->
471 peekQuote res >>= \res' ->
472 errorCheck a4'>>
473 return (res')
474
475
476
477 -- |A quote combining two others as @quote1 \`op\` quote2@, live in both: it recomputes whenever
478 -- either moves. Use 'withCompositeQuote' for an operation outside the 'QuoteOp' catalogue.
479 compositeQuote :: (QuoteOp) -> (GenQuote q1) -> (GenQuote q2) -> IO ((Quote))
480 compositeQuote a1 a2 a3 =
481 let {a1' = fromEnumC a1} in
482 withQuote a2 $ \a2' ->
483 withQuote a3 $ \a3' ->
484 preErrorCheck $ \a4' ->
485 compositeQuote'_ a1' a2' a3' a4' >>= \res ->
486 peekQuote res >>= \res' ->
487 errorCheck a4'>>
488 return (res')
489
490
491
492 -- |A quote folding any number of others, live in all of them. An empty list is accepted and
493 -- gives the fold's identity (@0@ for 'QuoteSum' and 'QuoteNorm2', @1@ for 'QuoteProduct') --
494 -- upstream imposes no non-empty requirement. Use 'withMultiCompositeQuote' for a fold outside
495 -- the 'MultiQuoteOp' catalogue.
496 multiCompositeQuote :: (MultiQuoteOp) -> ([GenQuote q]) -> IO ((Quote))
497 multiCompositeQuote a1 a2 =
498 let {a1' = fromEnumC a1} in
499 withQuoteArray a2 $ \(a2'1, a2'2) ->
500 preErrorCheck $ \a3' ->
501 multiCompositeQuote'_ a1' a2'1 a2'2 a3' >>= \res ->
502 peekQuote res >>= \res' ->
503 errorCheck a3'>>
504 return (res')
505
506
507
508 qlDerivedQuoteFromFunction :: (GenQuote q) -> (Callback) -> IO ((Quote))
509 qlDerivedQuoteFromFunction a1 a2 =
510 withQuote a1 $ \a1' ->
511 withCallbackPtr a2 $ \a2' ->
512 preErrorCheck $ \a3' ->
513 qlDerivedQuoteFromFunction'_ a1' a2' a3' >>= \res ->
514 peekQuote res >>= \res' ->
515 errorCheck a3'>>
516 return (res')
517
518
519 qlCompositeQuoteFromFunction :: (GenQuote q1) -> (GenQuote q2) -> (Callback) -> IO ((Quote))
520 qlCompositeQuoteFromFunction a1 a2 a3 =
521 withQuote a1 $ \a1' ->
522 withQuote a2 $ \a2' ->
523 withCallbackPtr a3 $ \a3' ->
524 preErrorCheck $ \a4' ->
525 qlCompositeQuoteFromFunction'_ a1' a2' a3' a4' >>= \res ->
526 peekQuote res >>= \res' ->
527 errorCheck a4'>>
528 return (res')
529
530
531 qlMultiCompositeQuoteFromFunction :: ([GenQuote q]) -> (Callback) -> IO ((Quote))
532 qlMultiCompositeQuoteFromFunction a1 a2 =
533 withQuoteArray a1 $ \(a1'1, a1'2) ->
534 withCallbackPtr a2 $ \a2' ->
535 preErrorCheck $ \a3' ->
536 qlMultiCompositeQuoteFromFunction'_ a1'1 a1'2 a2' a3' >>= \res ->
537 peekQuote res >>= \res' ->
538 errorCheck a3'>>
539 return (res')
540
541
542
543 -- |As 'derivedQuote', with an arbitrary Haskell function.
544 --
545 -- The quote and its native dependents retain the callback after the continuation returns.
546 -- Callback exceptions are rethrown by the enclosing Haskell call.
547 withDerivedQuote :: (Double -> Double) -- ^f(value)
548 -> GenQuote q -> (Quote -> IO b) -> IO b
549 withDerivedQuote f q k = withPayoffFun f (\fp -> qlDerivedQuoteFromFunction q fp >>= k)
550
551 -- |As 'compositeQuote', but combining the two quotes with an arbitrary Haskell function. Same
552 -- ownership and exception rules as 'withDerivedQuote'.
553 withCompositeQuote :: (Double -> Double -> Double) -- ^f(value1, value2)
554 -> GenQuote q1 -> GenQuote q2 -> (Quote -> IO b) -> IO b
555 withCompositeQuote f q1 q2 k = withQuoteBinaryFun f (\fp -> qlCompositeQuoteFromFunction q1 q2 fp >>= k)
556
557 -- |As 'multiCompositeQuote', but folding with an arbitrary Haskell function. The whole element
558 -- vector is passed per evaluation, so this crosses into Haskell once per value, not once per
559 -- element. Same ownership and exception rules as 'withDerivedQuote'.
560 withMultiCompositeQuote :: ([Double] -> Double) -- ^f(values)
561 -> [GenQuote q] -> (Quote -> IO b) -> IO b
562 withMultiCompositeQuote f qs k = withBasketAccumulateFun f (\fp -> qlMultiCompositeQuoteFromFunction qs fp >>= k)
563
564 -- vim: set ff=unix ts=8 sts=2 sw=2 et:
565
566 foreign import ccall safe "QuantLib/Quote.chs.h qlSimpleQuote"
567 simpleQuote'_ :: (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr ())) -> (IO (C2HSImp.Ptr (CSimpleQuote')))))
568
569 foreign import ccall safe "QuantLib/Quote.chs.h qlDeltaVolQuote1"
570 deltaVolQuote'_ :: (C2HSImp.CDouble -> ((C2HSImp.Ptr (CQuote')) -> (C2HSImp.CDouble -> (C2HSImp.CInt -> ((C2HSImp.Ptr (C2HSImp.Ptr ())) -> (IO (C2HSImp.Ptr (CDeltaVolQuote'))))))))
571
572 foreign import ccall safe "QuantLib/Quote.chs.h qlDeltaVolQuote2"
573 atmVolQuote'_ :: ((C2HSImp.Ptr (CQuote')) -> (C2HSImp.CInt -> (C2HSImp.CDouble -> (C2HSImp.CInt -> ((C2HSImp.Ptr (C2HSImp.Ptr ())) -> (IO (C2HSImp.Ptr (CDeltaVolQuote'))))))))
574
575 foreign import ccall safe "QuantLib/Quote.chs.h qlQuoteValue"
576 value'_ :: ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (C2HSImp.Ptr ())) -> (IO C2HSImp.CDouble)))
577
578 foreign import ccall safe "QuantLib/Quote.chs.h qlSimpleQuoteSetValue"
579 setValue'_ :: ((C2HSImp.Ptr (CSimpleQuote')) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr ())) -> (IO C2HSImp.CDouble))))
580
581 foreign import ccall safe "QuantLib/Quote.chs.h qlEurodollarFuturesImpliedStdDevQuote"
582 eurodollarFuturesImpliedStdDevQuote'_ :: ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (CQuote')) -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr ())) -> (IO (C2HSImp.Ptr (CQuote')))))))))))
583
584 foreign import ccall safe "QuantLib/Quote.chs.h qlForwardSwapQuote"
585 forwardSwapQuote'_ :: ((C2HSImp.Ptr (CSwapIndex')) -> ((C2HSImp.Ptr (CQuote')) -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr (C2HSImp.Ptr ())) -> (IO (C2HSImp.Ptr (CQuote'))))))))
586
587 foreign import ccall safe "QuantLib/Quote.chs.h qlForwardValueQuote"
588 forwardValueQuote'_ :: ((C2HSImp.Ptr (CIndex')) -> (C2HSImp.CInt -> ((C2HSImp.Ptr (C2HSImp.Ptr ())) -> (IO (C2HSImp.Ptr (CQuote'))))))
589
590 foreign import ccall safe "QuantLib/Quote.chs.h qlFuturesConvAdjustmentQuote1"
591 futuresConvAdjustmentQuoteFromImmCode'_ :: ((C2HSImp.Ptr (CIborIndex')) -> ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (C2HSImp.Ptr ())) -> (IO (C2HSImp.Ptr (CFuturesConvAdjustmentQuote')))))))))
592
593 foreign import ccall safe "QuantLib/Quote.chs.h qlFuturesConvAdjustmentQuote"
594 futuresConvAdjustmentQuote'_ :: ((C2HSImp.Ptr (CIborIndex')) -> (C2HSImp.CInt -> ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (C2HSImp.Ptr ())) -> (IO (C2HSImp.Ptr (CFuturesConvAdjustmentQuote')))))))))
595
596 foreign import ccall safe "QuantLib/Quote.chs.h qlFuturesConvAdjustmentQuoteFuturesValue"
597 futuresValue'_ :: ((C2HSImp.Ptr (CFuturesConvAdjustmentQuote')) -> ((C2HSImp.Ptr (C2HSImp.Ptr ())) -> (IO C2HSImp.CDouble)))
598
599 foreign import ccall safe "QuantLib/Quote.chs.h qlImpliedStdDevQuote"
600 impliedStdDevQuote'_ :: (C2HSImp.CInt -> ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (CQuote')) -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr ())) -> (IO (C2HSImp.Ptr (CQuote')))))))))))
601
602 foreign import ccall safe "QuantLib/Quote.chs.h qlLastFixingQuote"
603 lastFixingQuote'_ :: ((C2HSImp.Ptr (CIndex')) -> ((C2HSImp.Ptr (C2HSImp.Ptr ())) -> (IO (C2HSImp.Ptr (CQuote')))))
604
605 foreign import ccall safe "QuantLib/Quote.chs.h qlQuoteIsValid"
606 isValid'_ :: ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (C2HSImp.Ptr ())) -> (IO C2HSImp.CInt)))
607
608 foreign import ccall safe "QuantLib/Quote.chs.h qlRelinkableQuote"
609 relinkableQuote'_ :: ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (C2HSImp.Ptr ())) -> (IO (C2HSImp.Ptr (CRelinkableQuote')))))
610
611 foreign import ccall safe "QuantLib/Quote.chs.h qlRelinkableQuoteLinkTo"
612 linkTo'_ :: ((C2HSImp.Ptr (CRelinkableQuote')) -> ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (C2HSImp.Ptr ())) -> (IO ()))))
613
614 foreign import ccall safe "QuantLib/Quote.chs.h qlDerivedQuote"
615 derivedQuote'_ :: (C2HSImp.CInt -> ((C2HSImp.Ptr (CQuote')) -> (C2HSImp.CDouble -> ((C2HSImp.Ptr (C2HSImp.Ptr ())) -> (IO (C2HSImp.Ptr (CQuote')))))))
616
617 foreign import ccall safe "QuantLib/Quote.chs.h qlCompositeQuote"
618 compositeQuote'_ :: (C2HSImp.CInt -> ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (C2HSImp.Ptr ())) -> (IO (C2HSImp.Ptr (CQuote')))))))
619
620 foreign import ccall safe "QuantLib/Quote.chs.h qlMultiCompositeQuote"
621 multiCompositeQuote'_ :: (C2HSImp.CInt -> (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr (CQuote'))) -> ((C2HSImp.Ptr (C2HSImp.Ptr ())) -> (IO (C2HSImp.Ptr (CQuote')))))))
622
623 foreign import ccall safe "QuantLib/Quote.chs.h qlDerivedQuoteFromFunction"
624 qlDerivedQuoteFromFunction'_ :: ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr (C2HSImp.Ptr ())) -> (IO (C2HSImp.Ptr (CQuote'))))))
625
626 foreign import ccall safe "QuantLib/Quote.chs.h qlCompositeQuoteFromFunction"
627 qlCompositeQuoteFromFunction'_ :: ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr (C2HSImp.Ptr ())) -> (IO (C2HSImp.Ptr (CQuote')))))))
628
629 foreign import ccall safe "QuantLib/Quote.chs.h qlMultiCompositeQuoteFromFunction"
630 qlMultiCompositeQuoteFromFunction'_ :: (C2HSImp.CUInt -> ((C2HSImp.Ptr (C2HSImp.Ptr (CQuote'))) -> ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr (C2HSImp.Ptr ())) -> (IO (C2HSImp.Ptr (CQuote')))))))