- Reconstructing SWIG interface files for building Python wrapper.
- Reimplementing QuantLib examples by Python.
- Reimplementing QuantLib test-suite by Python.
Related blog (in Chinese): https://www.cnblogs.com/xuruilong100/p/13281006.html
Environment:
- QuantLib: 1.27
- swig: 4.0.2
- icx, icpx: Intel(R) oneAPI DPC++/C++ Compiler 2022.1.0 (2022.1.0.20220316)
- ubuntu: 22.04 LTS
Open ../SWIGpy/
and run the following commands.
- Generate
.cpp
file:
swig4.0 -w509 -c++ -python -outdir QuantLib -o QuantLib/ql_wrap.cpp quantlib.i
- Compile
.cpp
file:
CC=icx CXX=icpx python3 setup.py build
- Install Python wrapper:
python3 setup.py install
- BasketLosses
- BermudanSwaption
- Bonds
- CallableBonds
- CDS
- ConvertibleBonds
- CVAIRS
- DiscreteHedging
- EquityOption
- FittedBondCurve
- FRA
- Gaussian1dModels
- GlobalOptimizer
- LatentModel
- MarketModels
- MultidimIntegral
- Replication
- Repo
- MulticurveBootstrapping
- americanoption
- amortizingbond
- andreasenhugevolatilityinterpl
- array
- asianoptions
- assetswap
- autocovariances
- barrieroption
- basismodels
- basisswapratehelpers
- basketoption
- batesmodel
- bermudanswaption
- binaryoption
- blackdeltacalculator
- blackformula
- bondforward
- bonds
- brownianbridge
- businessdayconventions
- calendars
- callablebonds
- capflooredcoupon
- capfloor
- cashflows
- catbonds
- cdo
- cdsoption
- chooseroption
- cliquetoption
- cms
- cmsspread
- commodityunitofmeasure
- compoundoption
- convertiblebonds
- covariance
- creditdefaultswap
- creditriskplus
- crosscurrencyratehelpers
- currency
- curvestates
- dates
- daycounters
- defaultprobabilitycurves
- digitalcoupon
- digitaloption
- distributions
- dividendoption
- doublebarrieroption
- doublebinaryoption
- europeanoption
- everestoption
- exchangerate
- extendedtrees
- extensibleoptions
- fastfouriertransform
- fdcev
- fdcir
- fdheston
- fdmlinearop
- fdsabr
- fittedbonddiscountcurve
- forwardoption
- forwardrateagreement
- functions
- garch
- gaussianquadratures
- gjrgarchmodel
- gsr
- hestonmodel
- hestonslvmodel
- himalayaoption
- hybridhestonhullwhiteprocess
- indexes
- inflation
- inflationcapfloor
- inflationcapflooredcoupon
- inflationcpibond
- inflationcpicapfloor
- inflationcpiswap
- inflationvolatility
- inflationzciisinterpolation
- instruments
- integrals
- interestrates
- interpolations
- jumpdiffusion
- lazyobject
- libormarketmodel
- libormarketmodelprocess
- linearleastsquaresregression
- lookbackoptions
- lowdiscrepancysequences
- margrabeoption
- marketmodel_cms
- marketmodel
- marketmodel_smmcapletalphacalibration
- marketmodel_smmcapletcalibration
- marketmodel_smmcaplethomocalibration
- marketmodel_smm
- markovfunctional
- matrices
- mclongstaffschwartzengine
- mersennetwister
- money
- noarbsabr
- normalclvmodel
- nthorderderivativeop
- nthtodefault
- numericaldifferentiation
- observable
- ode
- operators
- optimizers
- optionletstripper
- overnightindexedcoupon
- overnightindexedswap
- pagodaoption
- partialtimebarrieroption
- pathgenerator
- period
- piecewiseyieldcurve
- piecewisezerospreadedtermstructure
- quantooption
- quotes
- rangeaccrual
- riskneutraldensitycalculator
- riskstats
- rngtraits
- rounding
- sampledcurve
- schedule
- settings
- shortratemodels
- sofrfutures
- solvers
- spreadoption
- squarerootclvmodel
- stats
- subperiodcoupons
- svivolatility
- swap
- swapforwardmappings
- swaption
- swaptionvolatilitycube
- swaptionvolatilitymatrix
- swingoption
- termstructures
- timegrid
- timeseries
- tqreigendecomposition
- tracing
- transformedgrid
- twoassetbarrieroption
- twoassetcorrelationoption
- ultimateforwardtermstructure
- variancegamma
- varianceoption
- varianceswaps
- volatilitymodels
- vpp
- zabr
- zerocouponswap