Trading Financial Markets
This tab contains information and download links for two books related to the development of financial market trading systems. The 'Indicators' tab contains information about a related book.
1) Testing and Tuning Market Trading Systems covers many effective yet not widely known algorithms to help the developer of market trading systems test and tune their models.
2) Permutation and Randomization Tests for Trading System Development covers the specialized topic of Monte-Carlo tests. They are extremely useful, even vital, for evaluating the degree to which good apparent performance is due to true skill versus luck.
Testing and Tuning Market Trading Systems
After spending many years tackling prediction and classification problems in remote sensing, defense, and biomedical applications, I turned my attention to predicting moves in financial markets. Since the early 90's I have been employed as a consultant by multiple market trading firms, using rigorous, statistically supportable algorithms to help them evaluate and improve their trading systems. After I retired a couple years ago I began documenting some of my most important tools for developing, evaluating, tweaking, and monitoring ongoing efficacy of market trading systems. This book presents a collection of some of my favorite go-to methods.
Note that this book does not include actual, practical trading systems. Any such systems that live in my head are either worthless or proprietary trade secrets. But if you have your own ideas for trading systems, this book will provide you with a set of tools that will help you evaluate the potential value of your system, tweak it to improve its profitability, and monitor its ongoing performance to detect deterioration before it fails catastrophically. Any serious market trader would do well to employ the methods described in this book.
To download the Table of Contents and Introduction, click here.
To view and optionally purchase this book on Amazon, click here.
To download the source code referenced in the book, click here. Note that a long-standing bug in GoDaddy's web hosting service occasionally makes it difficult to download Zip files. They sometimes give the file a long nonsensical name without the zip extension, which makes it necessary to download their file and then rename it to a zip file before unzipping it yourself.
Permutation and Randomization Tests for Trading System Development
My Testing and Tuning Market Trading Systems gave a limited overview of a few permutation and randomization tests that help the developer distinguish between true skill and good luck, along with several examples. This book picks up where that book left off (although that prior book is not a prerequisite to understanding and using this book). This book digs into the specialized topic of Monte-Carlo tests more deeply, providing many complete programs that implement a larger variety of tests, including some important recent developments.
To view this book on Amazon and optionally purchase it, click here.
To view the Table of Contents, click here.
To view a few overview pages, click here.
To download a zip file containing all source code referenced in the book, click here. Be sure to unzip with the option to preserve directories, as each project is in a different directory.
ERRATUM... The IND.CPP file prior to 2/22/2020 and printed on page 81 of the first edition of the book contains a coding error that results in modest anti-conservative behavior when computing p-values. The problem is that negative correlation between the indicator and the permuted target should be prevented exactly as is done in the original test. I accidentally omitted those five lines of code. This has been fixed in the version that can now be downloaded from the link above. This error has been fixed in subsequent editions.
Note on Third Edition... On March 30, 2020, I released a third edition of the book which fixes the error mentioned above and which includes an important new section. This new section introduces an alternative permutation test for selection bias that is substantially superior to the traditional test. There is no need to purchase the third edition if you have already purchased a prior edition. Click here to download a pdf file of the new section. Also, code illustrating this new algorithm is now available in the source code link shown above.