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,


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}")
| improve this answer | |
  • $\begingroup$ Is there any documentation available for various pricing engines? $\endgroup$ – Bogaso Jun 24 at 20:55
  • $\begingroup$ Here: quantlib.org/reference/group__asianengines.html $\endgroup$ – David Duarte Jun 25 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 at 16:52
  • $\begingroup$ Could this class be what you want: ql.DiscreteAveragingAsianOption ?? $\endgroup$ – David Duarte Jun 27 at 20:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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