<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="https://www.r-bloggers.com/rquantlib-0-4-3-lots-of-new-fixed-income-functions/"></div></div><div><a data-url="https://www.r-bloggers.com/rquantlib-0-4-3-lots-of-new-fixed-income-functions/" data-counturl="https://www.r-bloggers.com/rquantlib-0-4-3-lots-of-new-fixed-income-functions/" data-count="horizontal" data-text="RQuantLib 0.4.3: Lots of new Fixed Income functions" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://dirk.eddelbuettel.com/blog/2016/08/19#rquantlib_0.4.3"> Thinking inside the box </a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>A release of <a target="_blank" href="http://dirk.eddelbuettel.com/code/rquantlib.html">RQuantLib</a> is now on <a target="_blank" href="http://cran.r-project.org/">CRAN</a> and in <a target="_blank" href="http://www.debian.org/">Debian</a>. It contains <em>a lot</em> of new code contributed by Terry Leitch over a number of pull requests. See below for full details but the changes focus on Fixed Income and Fixed Income Derivatives, and cover swap, discount curves, swaptions and more.</p>
<p>In the <a target="_blank" href="http://dirk.eddelbuettel.com/blog/2015/12/03/#rquantlib_0.4.2">blog post for the previous release 0.4.2</a>, we noted that a volunteer was needed for a new Windows library build of <a target="_blank" href="http://www.quantlib.org/">QuantLib</a> for Windows to replace the outdated version 1.6 used there. <a target="_blank" href="http://joshuaulrich.com/">Josh Ulrich</a> stepped up, and built them. Josh and I tried for several month to get the <a target="_blank" href="http://win-builder.r-project.org/">win-builder</a> to install these, but sadly other things took priority and we were unsuccessful. So this release will not have Windows binaries on CRAN as QuantLib 1.8 is not available there. Instead, you can use the <a target="_blank" href="https://ghrr.github.io/drat/">ghrr drat</a> and do</p>
<div>
<pre><code>if (!<span>require</span>(<span>&quot;drat&quot;</span>)) <span>install.packages</span>(<span>&quot;drat&quot;</span>)
drat::<span>addRepo</span>(<span>&quot;ghrr&quot;</span>)
<span>install.packages</span>(<span>&quot;RQuantLib&quot;</span>)</code></pre>
</div>
<p>to fetch prebuilt Windows binaries from the <a target="_blank" href="https://ghrr.github.io/drat/">ghrr drat</a>. Everybody else gets sources from <a target="_blank" href="http://cran.r-project.org/">CRAN</a>.</p>
<p>The full changes are detailed below.</p>
<blockquote>
<h4>
Changes in RQuantLib version 0.4.3 (2016-08-19)<br>
</h4>
<ul>
<li>
<p>
Changes in RQuantLib code:
</p>
<ul>
<li>
<p>
Discount curve creation has been made more general by allowing additional arguments for day counter and fixed and floating frequency (contributed by Terry Leitch in <a target="_blank" href="https://github.com/eddelbuettel/rquantlib/pull/31">#31</a>, plus some work by Dirk in <a target="_blank" href="https://github.com/eddelbuettel/rquantlib/pull/32">#32</a>).
</p>
</li>
<li>
<p>
Swap leg parameters are now in combined variable and allow textual description (Terry Leitch in <a target="_blank" href="https://github.com/eddelbuettel/rquantlib/pull/34">#34</a> and <a target="_blank" href="https://github.com/eddelbuettel/rquantlib/pull/35">#35</a>)
</p>
</li>
<li>
<p>
BermudanSwaption has been modfied to take option expiration and swap tenors in order to enable more general swaption structure pricing; a more general search for the swaptions was developed to accomodate this. Also, a DiscountCurve is allowed as an alternative to market quotes to reduce computation time for a portfolio on a given valuation date (Terry Leitch in <a target="_blank" href="https://github.com/eddelbuettel/rquantlib/pull/42">#42</a> closing issue <a target="_blank" href="https://github.com/eddelbuettel/rquantlib/pull/41">#41</a>).
</p>
</li>
<li>
<p>
A new AffineSwaption model was added with similar interface to BermudanSwaption but allowing for valuation of a European exercise swaption utlizing the same affine methods available in BermudanSwaption. AffineSwaption will also value a Bermudan swaption, but does not take rate market quotes to build a term structure and a DiscountCurve object is required (Terry Leitch in <a target="_blank" href="https://github.com/eddelbuettel/rquantlib/pull/43">#43</a>).
</p>
</li>
<li>
<p>
Swap tenors can now be defined up to 100 years (Terry Leitch in <a target="_blank" href="https://github.com/eddelbuettel/rquantlib/pull/48">#48</a> fising issue <a target="_blank" href="https://github.com/eddelbuettel/rquantlib/issues/46">#46</a>).
</p>
</li>
<li>
<p>
Additional (shorter term) swap tenors are now defined (Guillaume Horel in <a target="_blank" href="https://github.com/eddelbuettel/rquantlib/pull/49">#49</a>, <a target="_blank" href="https://github.com/eddelbuettel/rquantlib/pull/54">#54</a>, <a target="_blank" href="https://github.com/eddelbuettel/rquantlib/pull/55">#55</a>).
</p>
</li>
<li>
<p>
New SABR swaption pricer (Terry Leitch in <a target="_blank" href="https://github.com/eddelbuettel/rquantlib/pull/60">#60</a> and <a target="_blank" href="https://github.com/eddelbuettel/rquantlib/pull/64">#64</a>, small follow-up by Dirk in <a target="_blank" href="https://github.com/eddelbuettel/rquantlib/pull/65">#65</a>).
</p>
</li>
<li>
<p>
Use of Travis CI has been updated and switch to maintained fork of deprecated mainline.
</p>
</li>
</ul>
</li>
</ul>
</blockquote>
<p>Courtesy of <a target="_blank" href="http://dirk.eddelbuettel.com/cranberries/">CRANberries</a>, there is also a diffstat report for the <a target="_blank" href="http://dirk.eddelbuettel.com/cranberries/2016/08/19#RQuantLib_0.4.3">this release</a>. As always, more detailed information is on the <a target="_blank" href="http://dirk.eddelbuettel.com/code/rquantlib.html">RQuantLib page</a>. Questions, comments etc should go to the <a target="_blank" href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rquantlib-devel">rquantlib-devel mailing list</a> off the <a target="_blank" href="http://r-forge.r-project.org/projects/rquantlib/">R-Forge</a> page. Issue tickets can be filed at the <a target="_blank" href="https://github.com/eddelbuettel/rquantlib">GitHub repo</a>.</p>
<p>
This post by <a target="_blank" href="http://dirk.eddelbuettel.com/">Dirk Eddelbuettel</a> originated on his <a target="_blank" href="http://dirk.eddelbuettel.com/blog/">Thinking inside the box</a> blog. Please report excessive re-aggregation in third-party for-profit settings.</p>
<p>
<p><div><div><div><div data-width="55" data-show-faces="false" data-send="true" data-layout="box_count" data-height="62" data-href="https://www.r-bloggers.com/rquantlib-0-4-3-lots-of-new-fixed-income-functions/"></div></div><div><a data-url="https://www.r-bloggers.com/rquantlib-0-4-3-lots-of-new-fixed-income-functions/" data-counturl="https://www.r-bloggers.com/rquantlib-0-4-3-lots-of-new-fixed-income-functions/" data-count="vertical" data-text="RQuantLib 0.4.3: Lots of new Fixed Income functions" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://dirk.eddelbuettel.com/blog/2016/08/19#rquantlib_0.4.3"> Thinking inside the box </a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a title="The R Project for Statistical Computing" rel="nofollow" href="https://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="https://www.r-bloggers.com/?s=data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="https://www.r-bloggers.com/?s=Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="https://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="https://www.r-bloggers.com/?s=map">maps</a>, <a title="Animation in R" rel="nofollow" href="https://www.r-bloggers.com/?s=animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="https://www.r-bloggers.com/?s=RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="https://www.r-bloggers.com/?s=sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="https://www.r-bloggers.com/?s=LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="https://www.r-bloggers.com/?s=SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="https://www.r-bloggers.com/?s=eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="https://www.r-bloggers.com/?s=git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="https://www.r-bloggers.com/?s=hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="https://www.r-bloggers.com/?s=Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="https://www.r-bloggers.com/?s=PCA">PCA</a>, <a title="Time series" rel="nofollow" href="https://www.r-bloggers.com/?s=time+series">time series</a>, <a title="finance trading" rel="nofollow" href="https://www.r-bloggers.com/?s=trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/Kle5P1Muj1U"></a></div>