1989issue C061-3
Staging Fast Fourier construction under memory limits
When memory, not the mathematics, is the binding constraint, Fast Fourier construction is a staging problem. Keep the transform kernel small and portable, then design overlays, the data array, and a separate frequency display so a cycle baseline can still be built.
- A published Fast Fourier Transform BASIC subroutine can be expected to run on another machine whose language is a close facsimile of Microsoft BASIC.
- On a machine with very little memory, the binding constraint is the size of the data array rather than the size of the BASIC transform subroutine.
- The transform-with-preprocessing program can be split into overlayable subprograms so the pipeline still runs when the whole listing will not fit.
- Spectral subroutines were designed to feed a graphics package, and about half of a 260 by 192 pixel grid was judged still usable for inspecting frequencies of interest.
A cycle baseline from a staged transform
A Fast Fourier Transform is a discrete spectral transform that turns an ordered price, volume, or breadth series into frequency components over a stated sampling interval and lookback. Fourier analysis is the decomposition of an ordered market series into sinusoidal components so an explicit quantitative cycle baseline can be inspected and later compared with held-out observations.
Editorial reading: treat the published workflow as a staging problem. Keep the transform kernel small and portable, then design overlays, the ordered-series data array, and a separate frequency display so that baseline can still be built when memory, not the mathematics, is the binding constraint.
A portable transform kernel
A published Fast Fourier Transform BASIC subroutine can be expected to run on another machine whose language is a close facsimile of Microsoft BASIC. Portions of that transform routine were first written for a consumer color computer and later translated to another microcomputer BASIC for publication.
Related published BASIC spectral code was described as nearly generic. Output-formatting statements were the main change needed to run it on another microcomputer BASIC.
Overlays and preprocessing
An overlay is a construction pattern that loads successive program segments in place so the full transform pipeline can run when the whole listing will not fit in memory. Preprocessing is the set of separable steps applied to the ordered series before the transform, treated as its own construction stage.
The transform-with-preprocessing program can be split into overlayable subprograms, with suggested line-number blocks 1100-1175, 1180-1255, and 1260-1320. The largest overlay segment is lines 1395-1690, which can replace line 1325. Control then continues through 1330-1390 back to a custom graphics layer.
When the data array is the limit
On a machine with very little memory, the binding constraint is the size of the data array rather than the size of the BASIC transform subroutine. The data array is the in-memory block of ordered observations. Its length, not the transform kernel, is the main memory cost.
A frequency display outside the kernel
Frequency display is the visualization or recording layer that presents frequencies of interest after the transform, independent of the kernel itself. A then-standard microcomputer graphics grid of 260 by 192 pixels was cited, and about half that resolution was judged still usable for inspecting frequencies of interest.
Those spectral subroutines were designed to feed a graphics package. Using them without that package requires enough programming skill to display the results independently.
Three ways to stage limited hardware
Three limited-hardware staging strategies were posed: run all observations through successive substages, run data batches through the whole program, or finish one substage for every batch before advancing. The published reply treated overlayable subprograms as compatible with the transform’s internal structure.
All readings on this track · 16 readings
- 1982Building FFT spectra to size cycle filters
- 1988Fourier cycle models break in major swings
- 1988Constructing moving average filters from price Fast Fourier Transforms
- 1989Staging Fast Fourier construction under memory limits
- 1993Constructing forecast inputs with moving averages, Fourier transforms and intermarket spreads
- 1994Preprocessing prices so Fourier peaks set moving-average lengths
- 1994Constructing a spreadsheet FFT power spectrum from daily prices
- 1994Building dominant-cycle spectra with FFT preprocessing
- 1994Constructing labeled cycle lengths from FFT spectra
- 1999Fast Fourier Transform reconstruction is not a walk-forward decision tool
- 1999Walk-forward endpoint Fourier construction as a same-day mechanical procedure
- 2002From the power spectrum to indicator windows
- 2003Endpoint Fast Fourier Transform evaluation with walk-forward mechanical rules
- 2004Constructing signal and noise from market waveforms
- 2012A two-stage case study in market cycle analysis
- 2015Whitening pink noise to build a near-zero-lag cycle oscillator