Thursday, October 29, 2015

Collaboration to Translate

The code of Derivatives Algorithms is almost exclusively in C++; but the ideas about program structure are drawn from other sources as well.

I am interested in translating the library into another high-performance, multi-paradigm language. The new code would support a "foreign language" version of the book, and provide a showcase and a beachhead into financial analytics for that language's practitioners.

My ambition is for the translation to be idiomatic and make the best use of the target language, not just to transliterate the C++ version.  This finally brings us to the purpose of this post:  I am looking for a strong collaborator.

The most interesting target languages to me are Rust and F#.  If you are fluent in one of these languages; an experienced and non-dogmatic programmer; and willing to invest the time to master both the C++ code and the concepts it embodies; then please contact me and we'll discuss the details.

Thursday, September 24, 2015

Access to the Source Code

The code of Derivatives Algorithms is in two codebases.

One, for the code generator "Machinist", is publicly available at https://bitbucket.org/hyer/machinist.  It has somewhat more capabilities than are used for the samples in the book.  Those interested in code generation are welcome to critique, use, or contribute to it.

Note that Machinist contains no explicitly financial or quantitative content.

The C++ code presented directly in the book is extracted from is in a different repository, at https://github.com/TomHyer/DA_Bones_Mirror (a mirror of the master repo on Bitbucket).  This is a private repository, which I intend to open to all buyers of the book. 

If you are such a buyer (of the first or second edition), please write me at ${book_title}@gmail.com.  Enclose some evidence of your purchase, and I will invite you as a viewer of the code repository. 

Note that the code on Bitbucket is subject to change and development, and I may from time to time update the GitHub mirror.  Occasionally this will cause code snippets to differ from those presented in the book, but not so as to dilute their didactic value.

Second Edition is Now Published

World Scientific has confirmed to me that the Second Edition has been published.  It is available to order at their site.

Sunday, May 3, 2015

LLVM/Clang Compatibility

The source code in the book relies on some Microsoft extensions to C++.  I have changed the online sample code to compile cleanly with LLVM.  There are two common cases where the resulting code is made significantly more awkward.

First, Microsoft allows derived classes to access public data members of their "dependent base class" (here "dependent" seems to mean "having a template parameter") directly; LLVM requires the use of the qualified name.

Second, consider the idiom for rescaling a matrix (here, shown for just one row and column):
auto doScale = bind2nd(multiplies<double>(), scale));
Transform(&corr->Row(ii), doScale);
Transform(&corr->Col(ii), doScale);
Microsoft allows this; but LLVM will not pass a pointer to the unnamed return values of Row and Col, and requires them to be assigned to named variables.

Thus the online code has become slightly more verbose and obscure.  The code in the book, where space is at a premium, continues to rely on Microsoft extensions.

Tuesday, April 21, 2015

Machinist -- the Code Generator

The examples in the second edition, and the supporting library, use my public-domain project "Machinist" for all code generation.  Bitbucket users can view the code here (after logging on). 

Wednesday, March 25, 2015

Second Edition

World Scientific has contracted to publish a second edition of Volume 1 (Bones), and I have submitted the draft manuscript.