I. Wavelet calculations.
 II. Calculation of approximation spaces in one dimension.
 III. Calculation of approximation spaces in one dimension II.
 IV. One dimensional problems.
 1 Decomposition of payoff function in one dimension. Adaptive multiscaled approximation.
 2 Constructing wavelet basis with Dirichlet boundary conditions.
 3 Accelerated calculation of Gram matrix.
 4 Adapting wavelet basis to arbitrary interval.
 5 Solving one dimensional elliptic PDEs.
 6 Discontinuous Galerkin technique II.
 7 Solving one dimensional Black PDE.
 A. Example Black equation parameters.
 B. Reduction to system of linear algebraic equations for Black PDE.
 C. Adaptive time step for Black PDE.
 D. Localization.
 E. Reduction to system of linear algebraic equations for q=1.
 F. Preconditioner for Black equation in case q=1.
 G. Summary for Black equation in case q=1.
 H. Implementation of Black equation solution.
 8 Solving one dimensional mean reverting equation.
 V. Stochastic optimization in one dimension.
 VI. Scalar product in N-dimensions.
 VII. Wavelet transform of payoff function in N-dimensions.
 VIII. Solving N-dimensional PDEs.

## Implementation of Black equation solution. flat code including adaptive basis selection for one step is placed in the script blackGd2.py in the directory OTSProjects/python/wavelet2. The full code, calculating full time interval solution with adaptive basis selection is placed in the script blackFinal.py.

For logic behind the adaptive basis selection see the section ( Rebalancing wavelet basis ).

We get numerical solution value versus the value that comes from analytical solution calculated with substitution .

The grid length is 87 on the last step. Experimentation shows that we can get it down to 30 while keeping difference to the same digit. The main tool of such experimentation is removing more basis functions with smallest contribution, see section ( Rebalancing wavelet basis ). Plot of . Plot of .