1. Motivation Theoretical results Features Application conclusion
A general software tool for
constructing rank-1 polynomial lattice rules
Polynomial Lattice Builder
Mohamed Hanini & Pierre L’Ecuyer
Département de mathématiques et de génie industriel
École Polytechnique de Montréal
CORS/INFORMS Montreal June 2015
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 1 / 24
3. Motivation Theoretical results Features Application conclusion
Monte Carlo (MC)
Multidimensional Integration methods
1 Monte Carlo (MC), Quasi-Monte Carlo (QMC) and
randomized QMC (RQMC)
µ = E[X] = E[f(U)] =
∫
[0,1)t
f(u) du
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 3 / 24
4. Motivation Theoretical results Features Application conclusion
Monte Carlo (MC)
Multidimensional Integration methods
1 Monte Carlo (MC), Quasi-Monte Carlo (QMC) and
randomized QMC (RQMC)
µ = E[X] = E[f(U)] =
∫
[0,1)t
f(u) du
MC Estimator
ˆµn,MC =
1
n
n−1∑
i=0
f(Ui)
U0, . . . , Un−1 : n i.i.d points in (0, 1)t.
Var[ˆµn,MC] = E[(ˆµn,MC − µ)2)] = O(n−1) converges slowly
as a function of nMohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 3 / 24
5. Motivation Theoretical results Features Application conclusion
Quasi-Monte Carlo (QMC)
Multidimensional Integration
µ = E[f(U)] =
∫
[0,1)t
f(u) du
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 4 / 24
6. Motivation Theoretical results Features Application conclusion
Quasi-Monte Carlo (QMC)
Multidimensional Integration
µ = E[f(U)] =
∫
[0,1)t
f(u) du
QMC Estimator
ˆµn,QMC =
1
n
n−1∑
i=0
f(Ui)
U0, . . . , Un−1 : a set of n (structured) points that cover the
unit cube more evenly (0, 1)t, thus the Var[ˆµn,QMC] = 0
Solution: square error or RQMC
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 4 / 24
7. Motivation Theoretical results Features Application conclusion
Randomized Quasi-Monte Carlo (RQMC)
Multidimensional Integration
µ = E[f(U)] =
∫
[0,1)t
f(u) du
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 5 / 24
8. Motivation Theoretical results Features Application conclusion
Randomized Quasi-Monte Carlo (RQMC)
Multidimensional Integration
µ = E[f(U)] =
∫
[0,1)t
f(u) du
RQMC Estimator
ˆµn,RQMC,l =
1
n
n−1∑
i=0
f(Ui)
U0, . . . , Un−1 : a set of n (structured) points shifted
individually
With m i.i.d estimators, we can construct the unbiased
estimator ˆµn,RQMC = 1
m
∑m
l=1 ˆµn,RQMC,l
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 5 / 24
9. Motivation Theoretical results Features Application conclusion
Rank-1 Lattice Rules
Rank-1 Lattice Rules
P0
n =
{
ui =
ia
n
mod 1 : 0 ≤ i ≤ n − 1
}
number of points: n
generating vector: a ∈ Zs 0 1
0
1
a/n
u1
u2
original
a = (1, 3)
0 1
0
1
u1
u2
shifted
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 6 / 24
10. Motivation Theoretical results Features Application conclusion
Rank-1 Lattice Rules
Rank-1 Lattice Rules
P0
n =
{
ui =
ia
n
mod 1 : 0 ≤ i ≤ n − 1
}
number of points: n
generating vector: a ∈ Zs
Randomly-Shifted Lattice Rule
Pn = {Ui = (ui + U) mod 1 : 0 ≤ i ≤ n − 1}
random shift: U ∼ U[0, 1)
0 1
0
1
a/n
u1
u2
original
a = (1, 3)
0 1
0
1
U
u1
u2
shifted
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 6 / 24
11. Motivation Theoretical results Features Application conclusion
Rank-1 Lattice Rules
Rank-1 Lattice Rules
P0
n =
{
ui =
ia
n
mod 1 : 0 ≤ i ≤ n − 1
}
number of points: n
generating vector: a ∈ Zs
Randomly-Shifted Lattice Rule
Pn = {Ui = (ui + U) mod 1 : 0 ≤ i ≤ n − 1}
random shift: U ∼ U[0, 1)
0 1
0
1
a/n
u1
u2
original
a = (1, 3)
0 1
0
1
U
u1
u2
shifted
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 6 / 24
12. Motivation Theoretical results Features Application conclusion
Rank-1 Polynomial Lattice Rules
QMC square error
Can converge with n faster than with Monte Carlo depending
on:
Smoothness of the integrand
Uniformity of the polynomial lattice points (choice of the
parameter g(z))
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 7 / 24
13. Motivation Theoretical results Features Application conclusion
Rank-1 Polynomial Lattice Rules
QMC square error
Can converge with n faster than with Monte Carlo depending
on:
Smoothness of the integrand
Uniformity of the polynomial lattice points (choice of the
parameter g(z))
polynomial lattice
points for n =
64, P(z) = z6 + z + 1
in 2D
0
1
good lattice
g(z) = (1, z5
+
z3
+ z2
+ z + 1)
0
1
very bad lattice
g(z) = (1, 1)
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 7 / 24
14. Motivation Theoretical results Features Application conclusion
How to Choose a Generating Vector?
Ideal Approach
1 Consider all possible generating vectors
2 Minimize the error or variance for our problem
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 8 / 24
15. Motivation Theoretical results Features Application conclusion
How to Choose a Generating Vector?
Ideal Approach
1 Consider all possible generating vectors
2 Minimize the error or variance for our problem
Practical Approach
1 Narrow down the search space for generating vectors
2 Minimize a figure of merit
representative of:
square error (QMC)
variance (RQMC)
others?
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 8 / 24
16. Motivation Theoretical results Features Application conclusion
How to Choose a Generating Vector?
Ideal Approach
1 Consider all possible generating vectors
2 Minimize the error or variance for our problem
Practical Approach
1 Narrow down the search space for generating vectors
2 Minimize a figure of merit
representative of:
square error (QMC)
variance (RQMC)
others?
That is the purpose of Polynomial Lattice Builder!
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 8 / 24
17. Motivation Theoretical results Features Application conclusion
What Was Needed
Find Good Polynomial Lattice Rules
Figures of merit and weights adapted to one’s problem
Any number of points, any polynomial and any dimension
Various construction methods
Optional normalization and filters
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 9 / 24
18. Motivation Theoretical results Features Application conclusion
What Was Needed
Find Good Polynomial Lattice Rules
Figures of merit and weights adapted to one’s problem
Any number of points, any polynomial and any dimension
Various construction methods
Optional normalization and filters
Research Purposes
Evaluate a figure of merit for a polynomial lattice
Compare performance of algorithms
Financial application
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 9 / 24
19. Motivation Theoretical results Features Application conclusion
What Was Already Out There
Constructing
Dirk Nuyens’ Matlab Code
One method construction (Fast CBC)
Very small choice of parameters (ex:primitive polynomials)
Only one type of weight (product weights)
No QMC/RQMC points generated
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 10 / 24
20. Motivation Theoretical results Features Application conclusion
What Was Already Out There
Constructing
Dirk Nuyens’ Matlab Code
One method construction (Fast CBC)
Very small choice of parameters (ex:primitive polynomials)
Only one type of weight (product weights)
No QMC/RQMC points generated
Tables of Generating Vectors
J. Dick
D. Nuyens
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 10 / 24
21. Motivation Theoretical results Features Application conclusion
Structure of Polynomial Lattice Builder
Polynomial lattice
rank-1 points
Figure of merits Type of weights
Construction
methods
Error on Walsh
space
Error on Ko-
robov space
Heuristic
Product
weights
Order depen-
dant weights
General
weightsProduct-
and-order-
dependant
(POD) weights
CBC
Fast CBC
Random Ko-
robov
Korobov
Exhaustive
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 11 / 24
22. Motivation Theoretical results Features Application conclusion
Points of a rank-1 polynomial lattice rule
We want to approximate an integral with rank-1
polynomial lattice rule
Qn(f, Ui
n−1
i=0 ) =
1
n
n−1∑
i=0
f(Ui)
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 12 / 24
23. Motivation Theoretical results Features Application conclusion
Points of a rank-1 polynomial lattice rule
We want to approximate an integral with rank-1
polynomial lattice rule
Qn(f, Ui
n−1
i=0 ) =
1
n
n−1∑
i=0
f(Ui)
The point Ui
Ui(z) = φ(q(z)g(z)
P(z) ) ∈ (Zb[z−1])t
Pn = {φ(q(z)g1(z)
P(z) , . . . , q(z)gt(z)
P(z) ) : q(z) ∈ Zb[z]/P(z)}
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 12 / 24
24. Motivation Theoretical results Features Application conclusion
Points of a rank-1 polynomial lattice rule
We want to approximate an integral with rank-1
polynomial lattice rule
Qn(f, Ui
n−1
i=0 ) =
1
n
n−1∑
i=0
f(Ui)
The point Ui
Ui(z) = φ(q(z)g(z)
P(z) ) ∈ (Zb[z−1])t
Pn = {φ(q(z)g1(z)
P(z) , . . . , q(z)gt(z)
P(z) ) : q(z) ∈ Zb[z]/P(z)}
The kth coordonate uj,k of the kth point Uk
uj,k =
∑L
l=w xlz−l, where xl ∈ F2
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 12 / 24
25. Motivation Theoretical results Features Application conclusion
Points of a rank-1 polynomial lattice rule
Lattice representation
Lt = {v(z) =
t∑
j=1
hjvj such that hj ∈ Zb[z]}
v1(z), v2(z), v3(z), . . . , vt(z) ∈ Lt
b, and vj(z) = gj(z)/P(z) , Thus
Pn = Lt ∩ [0, 1)t
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 13 / 24
26. Motivation Theoretical results Features Application conclusion
Points of a rank-1 polynomial lattice rule
Lattice representation
Lt = {v(z) =
t∑
j=1
hjvj such that hj ∈ Zb[z]}
v1(z), v2(z), v3(z), . . . , vt(z) ∈ Lt
b, and vj(z) = gj(z)/P(z) , Thus
Pn = Lt ∩ [0, 1)t
Dual lattice representation
L∗⊥
t = {h(z) ∈ Lt
b : h(z)v(z) ∈ Zb[z] for each v(z) ∈ Lt}
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 13 / 24
27. Motivation Theoretical results Features Application conclusion
Quality measures
Figure of merit used for a practical example
E(f, g(z))1/q
= e(g(z); n; ||.||p,α,γ)
e(g(z); n; ||.||p,α,γ) =
∑
0̸=v⊂1:t
γv
q/2
∏
j∈v
ω(uj)
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 14 / 24
28. Motivation Theoretical results Features Application conclusion
Quality measures
Figure of merit used for a practical example
E(f, g(z))1/q
= e(g(z); n; ||.||p,α,γ)
e(g(z); n; ||.||p,α,γ) =
∑
0̸=v⊂1:t
γv
q/2
∏
j∈v
ω(uj)
The kernel
ω(uj) =
∞∑
h=1
wal2,h(uj)
2qα⌊log2hj⌋
= 12(
1
6
− 2⌊log)2uj⌋−1
)
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 14 / 24
29. Motivation Theoretical results Features Application conclusion
Construction methods
CBC construction
et(gt(z); n; ||.||p,α,γ)q
= et−1(g(z)t−1; n; ||.||p,α,γ)q
+ Θt(g(z)t)
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 15 / 24
30. Motivation Theoretical results Features Application conclusion
Construction methods
CBC construction
et(gt(z); n; ||.||p,α,γ)q
= et−1(g(z)t−1; n; ||.||p,α,γ)q
+ Θt(g(z)t)
CBC construction (fast)
Ωb =
(
ω
(
q(z)g(z)
P(z)
))
g(z)=1,2,...,bm−1
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 15 / 24
32. Motivation Theoretical results Features Application conclusion
QMC square error
This was done in C++
Encouraging results
Uniformity of the polynomial lattice points (optimal
parameter g(z))
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 17 / 24
33. Motivation Theoretical results Features Application conclusion
QMC square error
This was done in C++
Encouraging results
Uniformity of the polynomial lattice points (optimal
parameter g(z))
polynomial lattice
points for
n = 1023, P(z) =
z10 + z3 + 1 in 2D
0 1
0
1
good lattice
g(z)
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 17 / 24
34. Motivation Theoretical results Features Application conclusion
Flexibility with Performance
Challenges
Support different:
Figures of merit
Types of weights
Construction methods
Lattice types
Normalizations
Filters
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 18 / 24
35. Motivation Theoretical results Features Application conclusion
Flexibility with Performance
Challenges
Support different:
Figures of merit
Types of weights
Construction methods
Lattice types
Normalizations
Filters
Allow for extensions
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 18 / 24
36. Motivation Theoretical results Features Application conclusion
Flexibility with Performance
Challenges
Support different:
Figures of merit
Types of weights
Construction methods
Lattice types
Normalizations
Filters
Allow for extensions
Maintain good performance
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 18 / 24
37. Motivation Theoretical results Features Application conclusion
Flexibility with Performance
Challenges
Support different:
Figures of merit
Types of weights
Construction methods
Lattice types
Normalizations
Filters
Allow for extensions
Maintain good performance
Avoid duplication of code
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 18 / 24
38. Motivation Theoretical results Features Application conclusion
Financial application–Call Asian option
Stochstic Differential equation (SDE)
dSt = µSt dt + σSt dWt
The solution of SDE is St = S0 exp(r−σ2/2)t+σBt
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 19 / 24
39. Motivation Theoretical results Features Application conclusion
Financial application–Call Asian option
Stochstic Differential equation (SDE)
dSt = µSt dt + σSt dWt
The solution of SDE is St = S0 exp(r−σ2/2)t+σBt
Asian pricing
The payoff of the option is X = e−rt max(0, 1
s
∑s
j=1 Stj − K),
and the price
c = E[X |Ft]
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 19 / 24
40. Motivation Theoretical results Features Application conclusion
Financial application–Asian call option
Stochstic Differential equation (SDE)
dSt = µSt dt + σSt dWt
The solution of SDE is St = S0 exp(r−σ2/2)t+σWt
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 20 / 24
41. Motivation Theoretical results Features Application conclusion
Financial application–Asian call option
Stochstic Differential equation (SDE)
dSt = µSt dt + σSt dWt
The solution of SDE is St = S0 exp(r−σ2/2)t+σWt
Asian call pricing
The payoff f(S1, . . . Sd) = max(0, 1
d
∑d
j=1 Stj − K), and the
price
v(s0, T) = E[e−rt
f(S1 . . . St) |Ft]
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 20 / 24
42. Motivation Theoretical results Features Application conclusion
Call Asian option– Numerical results
v(s0, T) = e−rt
∫
(0,1)d
max(0,
1
d
d∑
i=1
S0 exp [(r − σ2
)ti
+σ
√
ti − ti−1
i∑
j=1
Φ−1
(uj)] − K)du1 . . . dud
Reduction variance techniquess
control variate CV1 = e−rt max(0, Y − K) where
Y =
∏t
j=1(Stj )1/d
control variate CV2 = e−rt max(0, Y − K) where
Y =
∑t
j=1(Stj )1/d
Antithetic variate (AV)
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 21 / 24
44. Motivation Theoretical results Features Application conclusion
Call Asian option– Numerical results
Comparison with QMC points
MC RQMC
Strike price K= 100
Option value 3.54 3.33
Standard deviation 4.52 0.015
Variance Ratio 90802
Efficiency ratio 1804200
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 23 / 24
45. Motivation Theoretical results Features Application conclusion
Conclusion
Search for good polynomial lattice rules with specific input
parameters for RQMC integration.
Analyze and compare algorithms and figures of merit for
RQMC research.
What else are you interested in?
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 24 / 24
46. Functional ANOVA Decomposition
ANOVA Decomposition
f(u) = µ +
∑
q
fq(uq) where
∑
q
→
∑
∅̸=q⊆{1,...,s}
q: coordinate set
uq: projection of u onto q
fq(uq): integrates to zero
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 1 / 2
47. ANOVA Components of the RQMC Variance
ANOVA Decomposition
Var[ˆµ(f)] =
∑
q
Var[ˆµ(fq)]
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 2 / 2
48. ANOVA Components of the RQMC Variance
ANOVA Decomposition
Var[ˆµ(f)] =
∑
q
Var[ˆµ(fq)]
Weighted Figure of Merit
D2
(Pn) =
∑
q
γqD2
q(Pn)
D2
q(Pn) depends only on the
projection of Pn onto q
γq: weight (free to be chosen)
Mohamed Hanini & Pierre L’Ecuyer Polynomial Lattice Builder 2 / 2