I am looking for some software implementation of pricing Average Price Call option (APO) mostly Python (or any other package.)

Exercise style is European only.

Also, any link to any research paper for pricing such option much appreciated.

Many thanks,


1 Answer 1


Give QuantLib a try:

import QuantLib as ql
today = ql.Settings.instance().evaluationDate

averageType = ql.Average.Geometric
option_type = ql.Option.Call

strike = 120.0
exerciseDate = ql.TARGET().advance(today, 90, ql.Days)

payoff = ql.PlainVanillaPayoff(option_type, strike)
exercise = ql.EuropeanExercise(exerciseDate)
option = ql.ContinuousAveragingAsianOption(averageType, payoff, exercise)

initialValue = ql.QuoteHandle(ql.SimpleQuote(100))
sigma = 0.2
riskFreeTS = ql.YieldTermStructureHandle(ql.FlatForward(today, 0.05, ql.Actual365Fixed()))
volTS = ql.BlackVolTermStructureHandle(ql.BlackConstantVol(today, ql.NullCalendar(), sigma, ql.Actual365Fixed()))
stochProcess = ql.BlackScholesProcess(initialValue, riskFreeTS, volTS)

engine = ql.AnalyticContinuousGeometricAveragePriceAsianEngine(stochProcess)

price = option.NPV()

print(f"Option price: {price}")
  • $\begingroup$ Is there any documentation available for various pricing engines? $\endgroup$
    – Bogaso
    Jun 24, 2020 at 20:55
  • $\begingroup$ Here: quantlib.org/reference/group__asianengines.html $\endgroup$ Jun 25, 2020 at 0:22
  • $\begingroup$ I realised that in above example there is no option to supply particular dates which to be considered in averaging the underlying's price. In above example it is considered all prices during the lifetime. Is there any option to provide select dates? $\endgroup$
    – Bogaso
    Jun 27, 2020 at 16:52
  • $\begingroup$ Could this class be what you want: ql.DiscreteAveragingAsianOption ?? $\endgroup$ Jun 27, 2020 at 20:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.