module Quant.Test (
baseYC
, val
, black
, opt
, val'
, val''
, val'''
, val''''
, heston
, opt'
, opt''
)
where
import Quant.MonteCarlo
import Quant.YieldCurve
import Quant.ContingentClaim
import Quant.Models.Black
import Quant.Models.Heston
baseYC = FlatCurve 0.05
black = Black
100
0.2 --volatility
baseYC
baseYC
opt = vanillaOption Put 100 1
val = quickSim black opt 10000
opt' = multiplier 100
$ vanillaOption Call 100 1 ++ short (vanillaOption Call 120 1)
val' = quickSimAnti black opt' 10000
black' = Black
100
0.2 --volatility
(NetYC (FlatCurve 0.05) (FlatCurve 0.02))
baseYC
val'' = quickSimAnti black' opt' 10000
heston = Heston
100
0.04
0.04
0.2 --volvol
(0.7)
1.0
baseYC
baseYC
val''' = quickSimAnti heston opt' 10000
opt'' = terminalOnly 1 $ \x -> x*x
val'''' = quickSimAnti heston opt'' 10000