APPENDIX 5

Fourier Transformation

The original computer program that solves the Fourier transformation as described by Jack Hutson and Anthony Warren (Technical Analysis of Stocks & Commodities) is based on the Cooley-Tukey Fast Fourier Transform Algorithm (1965), developed at the IBM Thomas J. Watson Research Center. A full explanation of this program and its interpretation can be found in the two articles that appeared in the January 1983 edition of Technical Analysis of Stocks & Commodities, then reprinted in the September 1986 issue.

The following program appeared in the September 1986 issue of Technical Analysis of Stocks & Commodities. It was written by John Ehlers and appended to the article “A Comparison of the Fourier and Maximum Entropy Methods.”

FAST FOURIER TRANSFORM PROGRAM

10 REM “FAST FOURIER TRANSFORM”
  20 REM FOR APPLE ][ WITH 2 DISKS USING
  30 REM DATA IN CSI OR COMPU-TRAC FORMAT
  40 REM BY JOHN F. EHLERS
  45 REM COPYRIGHT (C) 1986 BY TECHNICAL ANALYSIS, INC.
  50 HOME
  60 DIM DF$(20)
  70 HTAB 5: INVERSE : PRINT “* FAST FOURIER TRANSFORM *” :
     NORMAL
  71 HTAB 19: PRINT “BY”
  72 HTAB 14: PRINT “JOHN EHLERS”
  73 HTAB 16: PRINT “BOX 1801”
  74 HTAB 12: PRINT “GOLETA, CA 93116”: PRINT
  80 LET D$ = CHR$(4)
  90 PRINT D$ + “OPEN MASTER,L40,D2”
 100 FOR I = 1 TO 20
 110 PRINT D$ + “READ MASTER,R”;I 120 INPUT DF$(I) 130 IF LEFT$ (DF$(I),5) = “99999” GOTO 150 140 NEXT I 150 PRINT D$ + “CLOSE” 160 FOR J = 1 TO I–1 170 PRINT “<”; CHR$ (J + 64); “>”; MID$ (DF$(J),4,16) 180 NEXT J 190 ...

Get New Trading Systems and Methods, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.