floatwing
2017-04-11 01:39:21 UTC
I tried many times, but it went wrong and i don't know how to fix it.
I used the DiscreteAveragingAsianOption method to price the arithmetic
option where i used the MCDiscreteArithmeticAPEngine to generize the Monte
Carlo path of Underlying prices. But I cann't correctly quote the two
functions. If there are any python docs or examples to price the arithmetc
option?
I searched the internet for a long time with little materials.Some of my
codes are as follows:
process2 = GeneralizedBlackScholesProcess(QuoteHandle(underlying),
YieldTermStructureHandle(dividendYield),
YieldTermStructureHandle(riskFreeRate),
BlackVolTermStructureHandle(volatility))
#asian settings
averageType = Average().Arithmetic
runningAccumulator = 1
pastFixings = 0
fixingDates = []
isBrownianbridge = False
isAntitheticvariate = True
isControlvariate = False
requiredSamples = 10000
requiredTolerance = 1e-3
maxSamples = 100000
seed = 42
enginestr = 'pr'
option = DiscreteAveragingAsianOption(averageType, runningAccumulator,
pastFixings, fixingDates, payoff, excercise)
engine = MCDiscreteArithmeticAPEngine(process2, enginestr, isBrownianbridge,
isAntitheticvariate, isControlvariate, requiredSamples, requiredTolerance,
maxSamples, seed)
Plz tell what's wrong or how to quote the two functions!!
--
View this message in context: http://quantlib.10058.n7.nabble.com/How-to-price-the-arithmetic-option-using-python-quantlib-tp18180.html
Sent from the quantlib-users mailing list archive at Nabble.com.
I used the DiscreteAveragingAsianOption method to price the arithmetic
option where i used the MCDiscreteArithmeticAPEngine to generize the Monte
Carlo path of Underlying prices. But I cann't correctly quote the two
functions. If there are any python docs or examples to price the arithmetc
option?
I searched the internet for a long time with little materials.Some of my
codes are as follows:
process2 = GeneralizedBlackScholesProcess(QuoteHandle(underlying),
YieldTermStructureHandle(dividendYield),
YieldTermStructureHandle(riskFreeRate),
BlackVolTermStructureHandle(volatility))
#asian settings
averageType = Average().Arithmetic
runningAccumulator = 1
pastFixings = 0
fixingDates = []
isBrownianbridge = False
isAntitheticvariate = True
isControlvariate = False
requiredSamples = 10000
requiredTolerance = 1e-3
maxSamples = 100000
seed = 42
enginestr = 'pr'
option = DiscreteAveragingAsianOption(averageType, runningAccumulator,
pastFixings, fixingDates, payoff, excercise)
engine = MCDiscreteArithmeticAPEngine(process2, enginestr, isBrownianbridge,
isAntitheticvariate, isControlvariate, requiredSamples, requiredTolerance,
maxSamples, seed)
Plz tell what's wrong or how to quote the two functions!!
--
View this message in context: http://quantlib.10058.n7.nabble.com/How-to-price-the-arithmetic-option-using-python-quantlib-tp18180.html
Sent from the quantlib-users mailing list archive at Nabble.com.