Parsl Accelerated QMCPy Notebook Tests

Introduction Notebook regression testing ensures that interactive examples and analyses remain correct and reproducible, catching regressions introduced by changes in code, dependencies, or execution environments. For QMCPy [1], this process is both massively parallel and resource-intensive due to the number and complexity of its notebooks. This blog post summarizes our work on accelerating notebook regressionContinue reading “Parsl Accelerated QMCPy Notebook Tests”

Highly Efficient Geometric Brownian Motion Modeling with QMCPy

Example implementation of GBM using QMCPy Install the required Python packages: pip install qmcpy numpy matplotlib Generate 16 paths on [0,1] with QMCPy’s sampler (\(S_0 = 1, \mu = 0.05, \sigma^2 = 0.2\)) and plot five: import numpy as np import matplotlib.pyplot as plt import qmcpy as qp sampler = qp.Lattice(252, seed=42) # daily stepsContinue reading “Highly Efficient Geometric Brownian Motion Modeling with QMCPy”

Linear Matrix Scrambling and Digital Shift for Halton

Introduction: Halton Sequences and Their Randomizations The Halton sequence is a common low-discrepancy sequence used for Quasi-Monte Carlo simulations. It is based on the principle of using prime numbers as bases for each dimension, e.g., 2 is used for dimension 1, 3 for dimension 2, 5 for dimension 3, and so on. For each dimension,Continue reading “Linear Matrix Scrambling and Digital Shift for Halton”

Analysis of Quasi-Monte Carlo Efficiency for Asian Option Pricing

Introduction: The Asian Option Pricing Challenge Asian options are especially difficult to price because their payoffs involve the average price of an underlying asset over a period of time. In comparison to simpler European options, arithmetic (or average) Asian options cannot be easily handled to result in a closed-form solution due to their path dependence.Continue reading “Analysis of Quasi-Monte Carlo Efficiency for Asian Option Pricing”

Random Lattice Generators are Not Bad

Generating vectors are used by the lattice generators to compute point sets. Previous works [1,2,3,4] commonly applied greedy component-by-component (CBC) algorithms to construct generating vectors. However, this process is dependent on weight vectors and the decay of Fourier coefficients. To this end, Takashi Goda and Pierre L’Ecuyer suggested in their work [5] that generating vectorsContinue reading “Random Lattice Generators are Not Bad”

Accelerating Rare-event Reliability Simulations for CERN’s Large Hadron Collider using QMCPy

In this blog post, we share an example for using the QMPCy package to accelerate rare-event Monte Carlo (MC) simulations in AvailSim4 [1]. The effort is part of a more general study of advanced MC methods for reliability studies of the CERN Machine Protection group. Introduction The European Organization for Nuclear Research, CERN, is homeContinue reading “Accelerating Rare-event Reliability Simulations for CERN’s Large Hadron Collider using QMCPy”

Bayesian Stopping Criteria

The blog Why Add Q to MC?, explained the advantages of carefully chosen, low discrepancy sampling sites for approximating multivariate integrals, or equivalently, expectations of functions of multivariate random variables.  This blog post explains at a Bayesian approach to determining the sample size required to satisfy the user’s error tolerance. Recall that the problem ofContinue reading “Bayesian Stopping Criteria”

Digital Sequences, the Niederreiter Construction

The previous blog post on What Makes a Sequence “Low Discrepancy”? introduced the concept of so-called low discrepancy (LD) points. In the literature on QMC methods, there are in general two main families of low discrepancy points sets that are commonly used as integration nodes. These are, on the one hand, lattice point sets, asContinue reading “Digital Sequences, the Niederreiter Construction”

Visualizing the Internals of Object Classes in QMCPy

As a software library grows, so does its complexity. This comment certainly applies to QMCPy [1], our Python library for high-dimensional numerical integration. UML (Unified Modelling Language) diagrams are a helpful tool for visualizing QMCPy’s intricate object oriented framework. These network diagrams display an objects methods, attributes, dependencies, and inheritance relationships. We have used theContinue reading “Visualizing the Internals of Object Classes in QMCPy”

Speeding up QMCPy with Distributable C Code

Many Python packages rely on underlying C or C++ code to speed up their numerical methods. For example, NumPy calls C and C++ extensions in order to speed up matrix manipulation algorithms. Real Python’s article Python Bindings: Calling C or C++ From Python discusses a few reasons why you may want to utilize C or C++Continue reading “Speeding up QMCPy with Distributable C Code”

qEI with QMCPy

Quasi-Monte Carlo methods (QMC) are a valuable tool for sampling random variables in a structured fashion; this allows for computing key statistics of random variables more efficiently than with i.i.d. sampling.  Such quantities can play fundamental roles in larger algorithms, making their efficient computation fundamental to practical implementations of numerous applications.  This was the motivationContinue reading “qEI with QMCPy”

What Makes a Sequence “Low Discrepancy”?

The first blog post, “Why add Q to MC?”, introduced the concept of evenly spread points, which are commonly referred to as low discrepancy (LD) points. This is in contrast to independent and identically distributed (IID) points. Consider two sequences, $\boldsymbol{T}_1, \boldsymbol{T}_2, \ldots \overset{\text{IID}}{\sim} \mathcal{U}[0,1]^d$ \[\boldsymbol{X}_1, \boldsymbol{X}_2, \ldots \overset{\text{LD}}{\sim} \mathcal{U}[0,1]^d.\] Both sequences are expected toContinue reading “What Makes a Sequence “Low Discrepancy”?”

A QMCPy Quick Start

We have created QMCPy, an open-source, object-oriented quasi- Monte Carlo (QMC) software framework in Python 3, which contains standardized parent classes for modeling integrands, measure, discrete distribution, and stopping criteria.  We hope QMCPy could enable researchers and users to quickly extend and experiment with novel algorithmic components that validate their theories, or to simply leverage orContinue reading “A QMCPy Quick Start”