tag:blogger.com,1999:blog-24010373840045490732024-03-13T06:07:44.397-07:00Derivatives AlgorithmsAnonymoushttp://www.blogger.com/profile/17209555002015408159noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-2401037384004549073.post-74951570601203475952015-10-29T17:15:00.002-07:002015-10-29T17:15:55.270-07:00Collaboration to TranslateThe code of <i>Derivatives Algorithms</i> is almost exclusively in C++; but the ideas about program structure are drawn from other sources as well.<br />
<br />
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.<br />
<br />
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. <br />
<br />
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.<br />
<div>
<br /></div>
Anonymoushttp://www.blogger.com/profile/17209555002015408159noreply@blogger.com6tag:blogger.com,1999:blog-2401037384004549073.post-91534528152919692172015-09-24T18:09:00.001-07:002015-11-05T17:35:03.935-08:00Access to the Source CodeThe code of Derivatives Algorithms is in two codebases.<br />
<br />
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.<br />
<br />
Note that Machinist contains no explicitly financial or quantitative content.<br />
<br />
The C++ code presented directly in the book is extracted from is in a different repository, at <span style="color: #0000ee;"><u>https://github.com/TomHyer/DA_Bones_Mirror</u></span> (a mirror of the master repo on Bitbucket). This is a private repository, which I intend to open to all buyers of the book. <br />
<br />
If you are such a buyer (of the first or second edition), please write me at <a href="mailto:$%7Bbook_title%7D@gmail.com">${book_title}</a><a href="https://www.blogger.com/null">@gmail.com</a>. Enclose some evidence of your purchase, and I will invite you as a viewer of the code repository. <br />
<br />
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.<br />
<br />Anonymoushttp://www.blogger.com/profile/17209555002015408159noreply@blogger.com0tag:blogger.com,1999:blog-2401037384004549073.post-36621454667343655642015-09-24T17:50:00.000-07:002015-09-24T17:50:21.608-07:00Second Edition is Now PublishedWorld Scientific has confirmed to me that the Second Edition has been published. It is available to order at <a href="http://www.worldscientific.com/worldscibooks/10.1142/9686">their site</a>.Anonymoushttp://www.blogger.com/profile/17209555002015408159noreply@blogger.com0tag:blogger.com,1999:blog-2401037384004549073.post-89725814152387068012015-05-03T18:22:00.001-07:002015-05-03T18:22:33.515-07:00LLVM/Clang CompatibilityThe 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.<br />
<br />
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. <br />
<br />
Second, consider the idiom for rescaling a matrix (here, shown for just one row and column):<br />
<span style="font-family: Courier New, Courier, monospace;"><span class="Apple-tab-span" style="white-space: pre;"> </span>auto doScale = bind2nd(multiplies<double>(), scale));</span><br />
<span style="font-family: Courier New, Courier, monospace;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Transform(&corr->Row(ii), doScale);</span><br />
<span style="font-family: Courier New, Courier, monospace;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Transform(&corr->Col(ii), doScale);</span><br />
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.<br />
<br />
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.<br />
<div>
<br /></div>
Anonymoushttp://www.blogger.com/profile/17209555002015408159noreply@blogger.com0tag:blogger.com,1999:blog-2401037384004549073.post-87655859653163283552015-04-21T17:42:00.000-07:002015-04-21T17:42:07.089-07:00Machinist -- the Code GeneratorThe 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 <a href="https://bitbucket.org/hyer/Machinist">here</a> (after logging on). Anonymoushttp://www.blogger.com/profile/17209555002015408159noreply@blogger.com0tag:blogger.com,1999:blog-2401037384004549073.post-32423756715479966942015-03-25T06:07:00.005-07:002015-03-25T06:07:56.577-07:00Second EditionWorld Scientific has contracted to publish a second edition of Volume 1 (Bones), and I have submitted the draft manuscript.Anonymoushttp://www.blogger.com/profile/17209555002015408159noreply@blogger.com0