[Rquantlib-commits] r210 - in papers/rinfinance2010: . figures/fixedIncomeDev

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Mar 24 03:16:42 CET 2010


Author: knguyen
Date: 2010-03-24 03:16:42 +0100 (Wed, 24 Mar 2010)
New Revision: 210

Added:
   papers/rinfinance2010/figures/fixedIncomeDev/Slide9.png
Modified:
   papers/rinfinance2010/figures/fixedIncomeDev/Thumbs.db
   papers/rinfinance2010/rquantlib_slides.tex
Log:
update slides

Added: papers/rinfinance2010/figures/fixedIncomeDev/Slide9.png
===================================================================
(Binary files differ)


Property changes on: papers/rinfinance2010/figures/fixedIncomeDev/Slide9.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: papers/rinfinance2010/figures/fixedIncomeDev/Thumbs.db
===================================================================
(Binary files differ)

Modified: papers/rinfinance2010/rquantlib_slides.tex
===================================================================
--- papers/rinfinance2010/rquantlib_slides.tex	2010-03-23 02:57:09 UTC (rev 209)
+++ papers/rinfinance2010/rquantlib_slides.tex	2010-03-24 02:16:42 UTC (rev 210)
@@ -250,53 +250,62 @@
 		\resizebox{95mm}{!}{\includegraphics{figures/fixedIncomeDev/Slide8.PNG}}
 	\end{center}
 \end{frame}
-
 \begin{frame}
-	\frametitle{Fixed Income in RQuantLib}
-	In summary,
-	\begin{itemize}
-		\item Fixed Income functions are added during the summer of 2009 as part of the Google Summer of Code program. 
-		\item  RQuantLib offeres strong support for fixed income pricing whereas several other packages (e.g. termstrc, YieldCurve, fBonds) focus on modelling term structure.		
-		\item The functions aim to support two primary tasks: pricing and curve fitting. 		
-	\end{itemize}
-\end{frame}
+	\frametitle{Fixed Income Development}
+	\begin{center}\huge In summary\end{center}
+	\begin{center}
+		\resizebox{95mm}{!}{\includegraphics{figures/fixedIncomeDev/Slide9.PNG}}
+	\end{center}
 
-
-\begin{frame}
-	\frametitle{Fixed Income in RQuantLib}
-	\framesubtitle{Primary tasks: Curve fitting}
-	\begin{itemize}
-		\item Curve fitting functions
-			\begin{itemize}
-				\item Curve fitting functions return a DiscountCurve object that contains a two column dates/zeroRates data frame.
-				\item The returned DiscountCurve object are used as inputs for pricing functions. 
-			\end{itemize}
-		\item Currently, there are two curve fitting functions
-			\begin{itemize}
-				\item DiscountCurve - constructs the spot term structure of interest rates based on input market data including the settltment date, deposit rates, future prices, FRA rates or swap rates in various combination.
-				\item FittedBondCurve - fits a term structure to a set of bonds using three different fitting methods (ExponentialSplinesFitting, SimplePolynomialFitting, NelsonSiegelFitting).
-			\end{itemize}
-	\end{itemize}
 \end{frame}
 
-\begin{frame}
-	\frametitle{Fixed Income in RQuantLib}
-	\framesubtitle{Primary tasks: Bond pricing}
-	\begin{itemize}
-		\item Bond pricing functions return clean price, dirty price, NPV and cash flow of a bond
-		\item Currently, the following bonds are supported
-			\begin{itemize}
-				\item Zero Coupon Bond
-				\item Fixed Rate Bond
-				\item Floating Rate Bond
-				\item Convertible Zero Coupon Bond
-				\item Convertible Fixed Rate Bond												
-				\item Convertible Floating Rate Bond
-				\item Callable Bond
-			\end{itemize}
-		\item The bonds available in QuantLib that yet are implemented are AmortizingCmsRateBond, AmortizingFixedRateBond, AmortizingFloatingRateBond, CallableFixedRateBond, CmsRateBond.
-	\end{itemize}
-\end{frame}
+%
+%\begin{frame}
+%	\frametitle{Fixed Income in RQuantLib}
+%	In summary,
+%	\begin{itemize}
+%		\item Fixed Income functions are added during the summer of 2009 as part of the Google Summer of Code program. 
+%		\item  RQuantLib offeres strong support for fixed income pricing whereas several other packages (e.g. termstrc, YieldCurve, fBonds) focus on modelling term structure.		
+%		\item The functions aim to support two primary tasks: pricing and curve fitting. 		
+%	\end{itemize}
+%\end{frame}
+%
+%
+%\begin{frame}
+%	\frametitle{Fixed Income in RQuantLib}
+%	\framesubtitle{Primary tasks: Curve fitting}
+%	\begin{itemize}
+%		\item Curve fitting functions
+%			\begin{itemize}
+%				\item Curve fitting functions return a DiscountCurve object that contains a two column dates/zeroRates data frame.
+%				\item The returned DiscountCurve object are used as inputs for pricing functions. 
+%			\end{itemize}
+%		\item Currently, there are two curve fitting functions
+%			\begin{itemize}
+%				\item DiscountCurve - constructs the spot term structure of interest rates based on input market data including the settltment date, deposit rates, future prices, FRA rates or swap rates in various combination.
+%				\item FittedBondCurve - fits a term structure to a set of bonds using three different fitting methods (ExponentialSplinesFitting, SimplePolynomialFitting, NelsonSiegelFitting).
+%			\end{itemize}
+%	\end{itemize}
+%\end{frame}
+%
+%\begin{frame}
+%	\frametitle{Fixed Income in RQuantLib}
+%	\framesubtitle{Primary tasks: Bond pricing}
+%	\begin{itemize}
+%		\item Bond pricing functions return clean price, dirty price, NPV and cash flow of a bond
+%		\item Currently, the following bonds are supported
+%			\begin{itemize}
+%				\item Zero Coupon Bond
+%				\item Fixed Rate Bond
+%				\item Floating Rate Bond
+%				\item Convertible Zero Coupon Bond
+%				\item Convertible Fixed Rate Bond												
+%				\item Convertible Floating Rate Bond
+%				\item Callable Bond
+%			\end{itemize}
+%		\item The bonds available in QuantLib that yet are implemented are AmortizingCmsRateBond, AmortizingFixedRateBond, AmortizingFloatingRateBond, CallableFixedRateBond, CmsRateBond.
+%	\end{itemize}
+%\end{frame}
 
 \subsection{Examples}
 \begin{frame}[shrink]
@@ -419,469 +428,11 @@
 \end{frame}
 
 
-%\begin{frame}[fragile]
-%	\frametitle{Fixed Income in RQuantLib}
-%	\framesubtitle{Examples: Curve fitting}
-%	\begin{itemize}
-%		\item FittedBondCurve example:
-%			\lstset{language=R,basicstyle=\tiny}
-%				\begin{lstlisting}
-%lengths <- c(2,4,6,8,10,12,14,16,18,20,22,24,26,28,30)
-%coupons <- c(0.0200, 0.0225, 0.0250, 0.0275, 0.0300,
-%         	 0.0325, 0.0350, 0.0375, 0.0400, 0.0425,
-%             0.0450, 0.0475, 0.0500, 0.0525, 0.0550 )
-%marketQuotes <- rep(100, length(lengths))
-%dateparams <- list(settlementDays=0, period="Annual", 
-%                             dayCounter="ActualActual", 
-%                             businessDayConvention ="Unadjusted")
-%curveparams <- list(method="ExponentialSplinesFitting", 
-%                                origDate = Sys.Date())
-%curve <- FittedBondCurve(curveparams, lengths, coupons, marketQuotes, dateparams)
-%library(zoo)
-%z <- zoo(curve$table$zeroRates, order.by=curve$table$date)
-%plot(z)
-%				\end{lstlisting}		
-%
-%\end{itemize}
-%\end{frame}
-\begin{frame}
-	\frametitle{Fixed Income in RQuantLib}
-	\framesubtitle{Examples: Bond pricing}	
-In this example, we construct a bond discounting term structure and a swap term structure then use them to price a zero coupon bond and a fixed rate bond. First, we will walk quickly through the QuantLib's implementation.
-\vskip5pt
-\pagecolor{bgcolor}
-\tiny
-\noindent
-\ttfamily
-\hlstd{}\hlslc{//\ the\ only\ header\ you\ need\ to\ use\ QuantLib}\hspace*{\fill}\\
-\hlstd{}\hldir{\#include\ $<$ql/quantlib.hpp$>$}\hspace*{\fill}\\
-\hlstd{}\hspace*{\fill}\\
-\hldir{\#include\ $<$boost/timer.hpp$>$}\hspace*{\fill}\\
-\hlstd{}\hldir{\#include\ $<$iostream$>$}\hspace*{\fill}\\
-\hlstd{}\hldir{\#include\ $<$iomanip$>$}\hspace*{\fill}\\
-\hlstd{}\hspace*{\fill}\\
-\hlkwa{using\ namespace\ }\hlstd{QuantLib}\hlsym{;}\hspace*{\fill}\\
-\hlstd{}\hspace*{\fill}\\
-\hldir{\#if\ defined(QL\textunderscore ENABLE\textunderscore SESSIONS)}\hspace*{\fill}\\
-\hlstd{}\hlkwa{namespace\ }\hlstd{QuantLib\ }\hlsym{\{}\hspace*{\fill}\\
-\hlstd{\hspace*{\fill}\\
-Integer\ }\hlkwd{sessionId}\hlstd{}\hlsym{()\ \{\ }\hlstd{}\hlkwa{return\ }\hlstd{}\hlnum{0}\hlstd{}\hlsym{;\ \}}\hspace*{\fill}\\
-\hlstd{}\hspace*{\fill}\\
-\hlsym{\}}\hspace*{\fill}\\
-\hlstd{}\hldir{\#endif}\hspace*{\fill}\\
-\hlstd{}\hspace*{\fill}\\
-\hspace*{\fill}\\
-\hlkwb{int\ }\hlstd{}\hlkwd{main}\hlstd{}\hlsym{(}\hlstd{}\hlkwb{int}\hlstd{}\hlsym{,\ }\hlstd{}\hlkwb{char}\hlstd{}\hlsym{{*}\ {[}{]})\ \{}\hspace*{\fill}\\
-\hlstd{\hspace*{\fill}\\
-}\hlstd{\ \ \ \ }\hlstd{}\hlkwa{try\ }\hlstd{}\hlsym{\{}\hspace*{\fill}\\
-\hlstd{\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{boost}\hlsym{::}\hlstd{timer\ timer}\hlsym{;}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{std}\hlsym{::}\hlstd{cout\ }\hlsym{$<$$<$\ }\hlstd{std}\hlsym{::}\hlstd{endl}\hlsym{;}\hspace*{\fill}\\
-\hlstd{\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{}\hlcom{/{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}}\hspace*{\fill}\\
-\hlcom{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlcom{{*}{*}{*}}\hlstd{\ \ }\hlcom{MARKET\ DATA}\hlstd{\ \ }\hlcom{{*}{*}{*}}\hspace*{\fill}\\
-\hlcom{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlcom{{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}/}\hlstd{\hspace*{\fill}\\
-\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{Calendar\ calendar\ }\hlsym{=\ }\hlstd{}\hlkwd{TARGET}\hlstd{}\hlsym{();}\hspace*{\fill}\\
-\hlstd{\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{Date\ }\hlkwd{settlementDate}\hlstd{}\hlsym{(}\hlstd{}\hlnum{18}\hlstd{}\hlsym{,\ }\hlstd{September}\hlsym{,\ }\hlstd{}\hlnum{2008}\hlstd{}\hlsym{);}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{}\hlslc{//\ must\ be\ a\ business\ day}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{settlementDate\ }\hlsym{=\ }\hlstd{calendar}\hlsym{.}\hlstd{}\hlkwd{adjust}\hlstd{}\hlsym{(}\hlstd{settlementDate}\hlsym{);}\hspace*{\fill}\\
-\hlstd{\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{Integer\ fixingDays\ }\hlsym{=\ }\hlstd{}\hlnum{3}\hlstd{}\hlsym{;}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{Natural\ settlementDays\ }\hlsym{=\ }\hlstd{}\hlnum{3}\hlstd{}\hlsym{;}\hspace*{\fill}\\
-\hlstd{\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{Date\ todaysDate\ }\hlsym{=\ }\hlstd{calendar}\hlsym{.}\hlstd{}\hlkwd{advance}\hlstd{}\hlsym{(}\hlstd{settlementDate}\hlsym{,\ {-}}\hlstd{fixingDays}\hlsym{,\ }\hlstd{Days}\hlsym{);}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{}\hlslc{//\ nothing\ to\ do\ with\ Date::todaysDate}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{Settings}\hlsym{::}\hlstd{}\hlkwd{instance}\hlstd{}\hlsym{().}\hlstd{}\hlkwd{evaluationDate}\hlstd{}\hlsym{()\ =\ }\hlstd{todaysDate}\hlsym{;}\hspace*{\fill}\\
-\hlstd{\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{std}\hlsym{::}\hlstd{cout\ }\hlsym{$<$$<$\ }\hlstd{}\hlstr{"Today:\ "}\hlstd{\ }\hlsym{$<$$<$\ }\hlstd{todaysDate}\hlsym{.}\hlstd{}\hlkwd{weekday}\hlstd{}\hlsym{()}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{}\hlsym{$<$$<$\ }\hlstd{}\hlstr{",\ "}\hlstd{\ }\hlsym{$<$$<$\ }\hlstd{todaysDate\ }\hlsym{$<$$<$\ }\hlstd{std}\hlsym{::}\hlstd{endl}\hlsym{;}\hspace*{\fill}\\
-\hlstd{\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{std}\hlsym{::}\hlstd{cout\ }\hlsym{$<$$<$\ }\hlstd{}\hlstr{"Settlement\ date:\ "}\hlstd{\ }\hlsym{$<$$<$\ }\hlstd{settlementDate}\hlsym{.}\hlstd{}\hlkwd{weekday}\hlstd{}\hlsym{()}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{}\hlsym{$<$$<$\ }\hlstd{}\hlstr{",\ "}\hlstd{\ }\hlsym{$<$$<$\ }\hlstd{settlementDate\ }\hlsym{$<$$<$\ }\hlstd{std}\hlsym{::}\hlstd{endl}\hlsym{;}\hspace*{\fill}\\
-\hlstd{\hspace*{\fill}\\
-\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{}\hlslc{//\ Building\ of\ the\ bonds\ discounting\ yield\ curve}\hspace*{\fill}\\
-\hlstd{\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{}\hlcom{/{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}}\hspace*{\fill}\\
-\hlcom{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlcom{{*}{*}{*}}\hlstd{\ \ }\hlcom{RATE\ HELPERS\ {*}{*}{*}}\hspace*{\fill}\\
-\hlcom{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlcom{{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}/}\hlstd{\hspace*{\fill}\\
-\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{}\hlslc{//\ RateHelpers\ are\ built\ from\ the\ above\ quotes\ together\ with}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{}\hlslc{//\ other\ instrument\ dependant\ infos.}\hlstd{\ \ }\hlslc{Quotes\ are\ passed\ in}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{}\hlslc{//\ relinkable\ handles\ which\ could\ be\ relinked\ to\ some\ other}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{}\hlslc{//\ data\ source\ later.}\hspace*{\fill}\\
-\hlstd{\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{}\hlslc{//\ Common\ data}\hspace*{\fill}\\
-\hlstd{\hspace*{\fill}\\
-\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{DayCounter\ zcBondsDayCounter\ }\hlsym{=\ }\hlstd{}\hlkwd{Actual365Fixed}\hlstd{}\hlsym{();}\hspace*{\fill}\\
-\hlstd{\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{boost}\hlsym{::}\hlstd{shared\textunderscore ptr}\hlsym{$<$}\hlstd{RateHelper}\hlsym{$>$\ }\hlstd{}\hlkwd{zc3m}\hlstd{}\hlsym{(}\hlstd{}\hlkwa{new\ }\hlstd{}\hlkwd{DepositRateHelper}\hlstd{}\hlsym{(}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{Handle}\hlsym{$<$}\hlstd{Quote}\hlsym{$>$(}\hlstd{zc3mRate}\hlsym{),}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{}\hlnum{3}\hlstd{}\hlsym{{*}}\hlstd{Months}\hlsym{,\ }\hlstd{fixingDays}\hlsym{,}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{calendar}\hlsym{,\ }\hlstd{ModifiedFollowing}\hlsym{,}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{}\hlkwa{true}\hlstd{}\hlsym{,\ }\hlstd{zcBondsDayCounter}\hlsym{));}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{boost}\hlsym{::}\hlstd{shared\textunderscore ptr}\hlsym{$<$}\hlstd{RateHelper}\hlsym{$>$\ }\hlstd{}\hlkwd{zc6m}\hlstd{}\hlsym{(}\hlstd{}\hlkwa{new\ }\hlstd{}\hlkwd{DepositRateHelper}\hlstd{}\hlsym{(}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{Handle}\hlsym{$<$}\hlstd{Quote}\hlsym{$>$(}\hlstd{zc6mRate}\hlsym{),}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{}\hlnum{6}\hlstd{}\hlsym{{*}}\hlstd{Months}\hlsym{,\ }\hlstd{fixingDays}\hlsym{,}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{calendar}\hlsym{,\ }\hlstd{ModifiedFollowing}\hlsym{,}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{}\hlkwa{true}\hlstd{}\hlsym{,\ }\hlstd{zcBondsDayCounter}\hlsym{));}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{boost}\hlsym{::}\hlstd{shared\textunderscore ptr}\hlsym{$<$}\hlstd{RateHelper}\hlsym{$>$\ }\hlstd{}\hlkwd{zc1y}\hlstd{}\hlsym{(}\hlstd{}\hlkwa{new\ }\hlstd{}\hlkwd{DepositRateHelper}\hlstd{}\hlsym{(}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{Handle}\hlsym{$<$}\hlstd{Quote}\hlsym{$>$(}\hlstd{zc1yRate}\hlsym{),}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{}\hlnum{1}\hlstd{}\hlsym{{*}}\hlstd{Years}\hlsym{,\ }\hlstd{fixingDays}\hlsym{,}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{calendar}\hlsym{,\ }\hlstd{ModifiedFollowing}\hlsym{,}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{}\hlkwa{true}\hlstd{}\hlsym{,\ }\hlstd{zcBondsDayCounter}\hlsym{));}\hspace*{\fill}\\
-\hlstd{\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{}\hlslc{//\ setup\ bonds}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{Real\ redemption\ }\hlsym{=\ }\hlstd{}\hlnum{100.0}\hlstd{}\hlsym{;}\hspace*{\fill}\\
-\hlstd{\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{}\hlkwb{const\ }\hlstd{Size\ numberOfBonds\ }\hlsym{=\ }\hlstd{}\hlnum{5}\hlstd{}\hlsym{;}\hspace*{\fill}\\
-\hlstd{\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{Date\ issueDates}\hlsym{{[}{]}\ =\ \{}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{todaysDate\ }\hlsym{+\ }\hlstd{}\hlnum{3}\hlstd{}\hlsym{,}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{todaysDate\ }\hlsym{+\ }\hlstd{}\hlnum{3}\hlstd{}\hlsym{,}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{todaysDate\ }\hlsym{+\ }\hlstd{}\hlnum{3}\hlstd{}\hlsym{,}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{todaysDate\ }\hlsym{+\ }\hlstd{}\hlnum{3}\hlstd{}\hlsym{,}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{todaysDate\ }\hlsym{+\ }\hlstd{}\hlnum{3}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{}\hlsym{\};}\hspace*{\fill}\\
-\hlstd{\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{Date\ maturities}\hlsym{{[}{]}\ =\ \{}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{calendar}\hlsym{.}\hlstd{}\hlkwd{advance}\hlstd{}\hlsym{(}\hlstd{todaysDate\ }\hlsym{+\ }\hlstd{}\hlnum{3}\hlstd{}\hlsym{,\ }\hlstd{}\hlnum{5}\hlstd{}\hlsym{,\ }\hlstd{Years}\hlsym{),}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{calendar}\hlsym{.}\hlstd{}\hlkwd{advance}\hlstd{}\hlsym{(}\hlstd{todaysDate\ }\hlsym{+\ }\hlstd{}\hlnum{3}\hlstd{}\hlsym{,\ }\hlstd{}\hlnum{6}\hlstd{}\hlsym{,\ }\hlstd{Years}\hlsym{),}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{calendar}\hlsym{.}\hlstd{}\hlkwd{advance}\hlstd{}\hlsym{(}\hlstd{todaysDate\ }\hlsym{+\ }\hlstd{}\hlnum{3}\hlstd{}\hlsym{,\ }\hlstd{}\hlnum{7}\hlstd{}\hlsym{,\ }\hlstd{Years}\hlsym{),}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{calendar}\hlsym{.}\hlstd{}\hlkwd{advance}\hlstd{}\hlsym{(}\hlstd{todaysDate\ }\hlsym{+\ }\hlstd{}\hlnum{3}\hlstd{}\hlsym{,\ }\hlstd{}\hlnum{16}\hlstd{}\hlsym{,\ }\hlstd{Years}\hlsym{),}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{calendar}\hlsym{.}\hlstd{}\hlkwd{advance}\hlstd{}\hlsym{(}\hlstd{todaysDate\ }\hlsym{+\ }\hlstd{}\hlnum{3}\hlstd{}\hlsym{,\ }\hlstd{}\hlnum{48}\hlstd{}\hlsym{,\ }\hlstd{Years}\hlsym{)}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{}\hlsym{\};}\hspace*{\fill}\\
-\hlstd{\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{Real\ couponRates}\hlsym{{[}{]}\ =\ \{}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{}\hlnum{0.02375}\hlstd{}\hlsym{,}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{}\hlnum{0.04625}\hlstd{}\hlsym{,}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{}\hlnum{0.03125}\hlstd{}\hlsym{,}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{}\hlnum{0.04000}\hlstd{}\hlsym{,}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{}\hlnum{0.04500}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{}\hlsym{\};}\hspace*{\fill}\\
-\hlstd{\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{Real\ marketQuotes}\hlsym{{[}{]}\ =\ \{}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{}\hlnum{100.390625}\hlstd{}\hlsym{,}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{}\hlnum{106.21875}\hlstd{}\hlsym{,}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{}\hlnum{100.59375}\hlstd{}\hlsym{,}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{}\hlnum{101.6875}\hlstd{}\hlsym{,}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{}\hlnum{102.140625}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{}\hlsym{\};}\hspace*{\fill}\\
-\hlstd{\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{std}\hlsym{::}\hlstd{vector}\hlsym{$<$\ }\hlstd{boost}\hlsym{::}\hlstd{shared\textunderscore ptr}\hlsym{$<$}\hlstd{SimpleQuote}\hlsym{$>$\ $>$\ }\hlstd{quote}\hlsym{;}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{}\hlkwa{for\ }\hlstd{}\hlsym{(}\hlstd{Size\ i}\hlsym{=}\hlstd{}\hlnum{0}\hlstd{}\hlsym{;\ }\hlstd{i}\hlsym{$<$}\hlstd{numberOfBonds}\hlsym{;\ }\hlstd{i}\hlsym{++)\ \{}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{boost}\hlsym{::}\hlstd{shared\textunderscore ptr}\hlsym{$<$}\hlstd{SimpleQuote}\hlsym{$>$\ }\hlstd{}\hlkwd{cp}\hlstd{}\hlsym{(}\hlstd{}\hlkwa{new\ }\hlstd{}\hlkwd{SimpleQuote}\hlstd{}\hlsym{(}\hlstd{marketQuotes}\hlsym{{[}}\hlstd{i}\hlsym{{]}));}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{quote}\hlsym{.}\hlstd{}\hlkwd{push\textunderscore back}\hlstd{}\hlsym{(}\hlstd{cp}\hlsym{);}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{}\hlsym{\}}\hspace*{\fill}\\
-\hlstd{\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{RelinkableHandle}\hlsym{$<$}\hlstd{Quote}\hlsym{$>$\ }\hlstd{quoteHandle}\hlsym{{[}}\hlstd{numberOfBonds}\hlsym{{]};}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{}\hlkwa{for\ }\hlstd{}\hlsym{(}\hlstd{Size\ i}\hlsym{=}\hlstd{}\hlnum{0}\hlstd{}\hlsym{;\ }\hlstd{i}\hlsym{$<$}\hlstd{numberOfBonds}\hlsym{;\ }\hlstd{i}\hlsym{++)\ \{}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{quoteHandle}\hlsym{{[}}\hlstd{i}\hlsym{{]}.}\hlstd{}\hlkwd{linkTo}\hlstd{}\hlsym{(}\hlstd{quote}\hlsym{{[}}\hlstd{i}\hlsym{{]});}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{}\hlsym{\}}\hspace*{\fill}\\
-\hlstd{\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{}\hlslc{//\ Definition\ of\ the\ rate\ helpers}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{std}\hlsym{::}\hlstd{vector}\hlsym{$<$}\hlstd{boost}\hlsym{::}\hlstd{shared\textunderscore ptr}\hlsym{$<$}\hlstd{FixedRateBondHelper}\hlsym{$>$\ $>$\ }\hlstd{bondsHelpers}\hlsym{;}\hspace*{\fill}\\
-\hlstd{\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{}\hlkwa{for\ }\hlstd{}\hlsym{(}\hlstd{Size\ i}\hlsym{=}\hlstd{}\hlnum{0}\hlstd{}\hlsym{;\ }\hlstd{i}\hlsym{$<$}\hlstd{numberOfBonds}\hlsym{;\ }\hlstd{i}\hlsym{++)\ \{}\hspace*{\fill}\\
-\hlstd{\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{Schedule\ }\hlkwd{schedule}\hlstd{}\hlsym{(}\hlstd{issueDates}\hlsym{{[}}\hlstd{i}\hlsym{{]},\ }\hlstd{maturities}\hlsym{{[}}\hlstd{i}\hlsym{{]},\ }\hlstd{}\hlkwd{Period}\hlstd{}\hlsym{(}\hlstd{Semiannual}\hlsym{),\ }\hlstd{}\hlkwd{UnitedStates}\hlstd{}\hlsym{(}\hlstd{UnitedStates}\hlsym{::}\hlstd{GovernmentBond}\hlsym{),}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{Unadjusted}\hlsym{,\ }\hlstd{Unadjusted}\hlsym{,\ }\hlstd{DateGeneration}\hlsym{::}\hlstd{Backward}\hlsym{,\ }\hlstd{}\hlkwa{false}\hlstd{}\hlsym{);}\hspace*{\fill}\\
-\hlstd{\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{boost}\hlsym{::}\hlstd{shared\textunderscore ptr}\hlsym{$<$}\hlstd{FixedRateBondHelper}\hlsym{$>$\ }\hlstd{}\hlkwd{bondHelper}\hlstd{}\hlsym{(}\hlstd{}\hlkwa{new\ }\hlstd{}\hlkwd{FixedRateBondHelper}\hlstd{}\hlsym{(}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{quoteHandle}\hlsym{{[}}\hlstd{i}\hlsym{{]},}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{settlementDays}\hlsym{,}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{}\hlnum{100.0}\hlstd{}\hlsym{,}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{schedule}\hlsym{,}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{std}\hlsym{::}\hlstd{vector}\hlsym{$<$}\hlstd{Rate}\hlsym{$>$(}\hlstd{}\hlnum{1}\hlstd{}\hlsym{,}\hlstd{couponRates}\hlsym{{[}}\hlstd{i}\hlsym{{]}),}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{}\hlkwd{ActualActual}\hlstd{}\hlsym{(}\hlstd{ActualActual}\hlsym{::}\hlstd{Bond}\hlsym{),}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{Unadjusted}\hlsym{,}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{redemption}\hlsym{,}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{issueDates}\hlsym{{[}}\hlstd{i}\hlsym{{]}));}\hspace*{\fill}\\
-\hlstd{\hspace*{\fill}\\
-}
-\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{bondsHelpers}\hlsym{.}\hlstd{}\hlkwd{push\textunderscore back}\hlstd{}\hlsym{(}\hlstd{bondHelper}\hlsym{);}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{}\hlsym{\}}\hspace*{\fill}\\
-\hlstd{\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{}\hlcom{/{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}}\hspace*{\fill}\\
-\hlcom{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlcom{{*}{*}}\hlstd{\ \ }\hlcom{CURVE\ BUILDING\ {*}{*}}\hspace*{\fill}\\
-\hlcom{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlcom{{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}/}\hlstd{\hspace*{\fill}\\
-\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{}\hlslc{//\ Any\ DayCounter\ would\ be\ fine.}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{}\hlslc{//\ ActualActual::ISDA\ ensures\ that\ 30\ years\ is\ 30.0}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{DayCounter\ termStructureDayCounter\ }\hlsym{=}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{}\hlkwd{ActualActual}\hlstd{}\hlsym{(}\hlstd{ActualActual}\hlsym{::}\hlstd{ISDA}\hlsym{);}\hspace*{\fill}\\
-\hlstd{\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{}\hlkwb{double\ }\hlstd{tolerance\ }\hlsym{=\ }\hlstd{}\hlnum{1.0e{-}15}\hlstd{}\hlsym{;}\hspace*{\fill}\\
-\hlstd{\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{}\hlslc{//\ A\ depo{-}bond\ curve}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{std}\hlsym{::}\hlstd{vector}\hlsym{$<$}\hlstd{boost}\hlsym{::}\hlstd{shared\textunderscore ptr}\hlsym{$<$}\hlstd{RateHelper}\hlsym{$>$\ $>$\ }\hlstd{bondInstruments}\hlsym{;}\hspace*{\fill}\\
-\hlstd{\hspace*{\fill}\\
-\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{}\hlslc{//\ Adding\ the\ Fixed\ rate\ bonds\ to\ the\ curve\ for\ the\ long\ end}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{}\hlkwa{for\ }\hlstd{}\hlsym{(}\hlstd{Size\ i}\hlsym{=}\hlstd{}\hlnum{0}\hlstd{}\hlsym{;\ }\hlstd{i}\hlsym{$<$}\hlstd{numberOfBonds}\hlsym{;\ }\hlstd{i}\hlsym{++)\ \{}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{bondInstruments}\hlsym{.}\hlstd{}\hlkwd{push\textunderscore back}\hlstd{}\hlsym{(}\hlstd{bondsHelpers}\hlsym{{[}}\hlstd{i}\hlsym{{]});}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{}\hlsym{\}}\hspace*{\fill}\\
-\hlstd{\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{ExponentialSplinesFitting\ }\hlkwd{exponentialSplines}\hlstd{}\hlsym{(}\hlstd{}\hlkwa{true}\hlstd{}\hlsym{);}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{boost}\hlsym{::}\hlstd{shared\textunderscore ptr}\hlsym{$<$}\hlstd{YieldTermStructure}\hlsym{$>$\ }\hlstd{}\hlkwd{bondDiscountingTermStructure}\hlstd{}\hlsym{(}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{}\hlkwa{new\ }\hlstd{}\hlkwd{FittedBondDiscountCurve}\hlstd{}\hlsym{(}\hlstd{settlementDays}\hlsym{,}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{calendar}\hlsym{,}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{bondsHelpers}\hlsym{,}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{termStructureDayCounter}\hlsym{,}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{exponentialSplines}\hlsym{,}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{tolerance}\hlsym{,}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{}\hlnum{5000}\hlstd{}\hlsym{));}\hspace*{\fill}\\
-\hlstd{\hspace*{\fill}\\
-\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{}\hlslc{//\ Building\ of\ the\ Libor\ forecasting\ curve}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{}\hlslc{//\ deposits}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{Rate\ d1wQuote}\hlsym{=}\hlstd{}\hlnum{0.043375}\hlstd{}\hlsym{;}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{Rate\ d1mQuote}\hlsym{=}\hlstd{}\hlnum{0.031875}\hlstd{}\hlsym{;}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{Rate\ d3mQuote}\hlsym{=}\hlstd{}\hlnum{0.0320375}\hlstd{}\hlsym{;}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{Rate\ d6mQuote}\hlsym{=}\hlstd{}\hlnum{0.03385}\hlstd{}\hlsym{;}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{Rate\ d9mQuote}\hlsym{=}\hlstd{}\hlnum{0.0338125}\hlstd{}\hlsym{;}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{Rate\ d1yQuote}\hlsym{=}\hlstd{}\hlnum{0.0335125}\hlstd{}\hlsym{;}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{}\hlslc{//\ swaps}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{Rate\ s2yQuote}\hlsym{=}\hlstd{}\hlnum{0.0295}\hlstd{}\hlsym{;}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{Rate\ s3yQuote}\hlsym{=}\hlstd{}\hlnum{0.0323}\hlstd{}\hlsym{;}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{Rate\ s5yQuote}\hlsym{=}\hlstd{}\hlnum{0.0359}\hlstd{}\hlsym{;}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{Rate\ s10yQuote}\hlsym{=}\hlstd{}\hlnum{0.0412}\hlstd{}\hlsym{;}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{Rate\ s15yQuote}\hlsym{=}\hlstd{}\hlnum{0.0433}\hlstd{}\hlsym{;}\hspace*{\fill}\\
-\hlstd{\hspace*{\fill}\\
-\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{}\hlcom{/{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}}\hspace*{\fill}\\
-\hlcom{}\hlstd{\ \ \ \ \ \ \ \ \ \ }\hlcom{{*}{*}{*}}\hlstd{\ \ \ \ }\hlcom{QUOTES}\hlstd{\ \ \ \ }\hlcom{{*}{*}{*}}\hspace*{\fill}\\
-\hlcom{}\hlstd{\ \ \ \ \ \ \ \ \ \ }\hlcom{{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}/}\hlstd{\hspace*{\fill}\\
-\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{}\hlslc{//\ SimpleQuote\ stores\ a\ value\ which\ can\ be\ manually\ changed;}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{}\hlslc{//\ other\ Quote\ subclasses\ could\ read\ the\ value\ from\ a\ database}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{}\hlslc{//\ or\ some\ kind\ of\ data\ feed.}\hspace*{\fill}\\
-\hlstd{\hspace*{\fill}\\
-}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{}\hlslc{//\ deposits}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{boost}\hlsym{::}\hlstd{shared\textunderscore ptr}\hlsym{$<$}\hlstd{Quote}\hlsym{$>$\ }\hlstd{}\hlkwd{d1wRate}\hlstd{}\hlsym{(}\hlstd{}\hlkwa{new\ }\hlstd{}\hlkwd{SimpleQuote}\hlstd{}\hlsym{(}\hlstd{d1wQuote}\hlsym{));}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{boost}\hlsym{::}\hlstd{shared\textunderscore ptr}\hlsym{$<$}\hlstd{Quote}\hlsym{$>$\ }\hlstd{}\hlkwd{d1mRate}\hlstd{}\hlsym{(}\hlstd{}\hlkwa{new\ }\hlstd{}\hlkwd{SimpleQuote}\hlstd{}\hlsym{(}\hlstd{d1mQuote}\hlsym{));}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{boost}\hlsym{::}\hlstd{shared\textunderscore ptr}\hlsym{$<$}\hlstd{Quote}\hlsym{$>$\ }\hlstd{}\hlkwd{d3mRate}\hlstd{}\hlsym{(}\hlstd{}\hlkwa{new\ }\hlstd{}\hlkwd{SimpleQuote}\hlstd{}\hlsym{(}\hlstd{d3mQuote}\hlsym{));}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{boost}\hlsym{::}\hlstd{shared\textunderscore ptr}\hlsym{$<$}\hlstd{Quote}\hlsym{$>$\ }\hlstd{}\hlkwd{d6mRate}\hlstd{}\hlsym{(}\hlstd{}\hlkwa{new\ }\hlstd{}\hlkwd{SimpleQuote}\hlstd{}\hlsym{(}\hlstd{d6mQuote}\hlsym{));}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{boost}\hlsym{::}\hlstd{shared\textunderscore ptr}\hlsym{$<$}\hlstd{Quote}\hlsym{$>$\ }\hlstd{}\hlkwd{d9mRate}\hlstd{}\hlsym{(}\hlstd{}\hlkwa{new\ }\hlstd{}\hlkwd{SimpleQuote}\hlstd{}\hlsym{(}\hlstd{d9mQuote}\hlsym{));}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{boost}\hlsym{::}\hlstd{shared\textunderscore ptr}\hlsym{$<$}\hlstd{Quote}\hlsym{$>$\ }\hlstd{}\hlkwd{d1yRate}\hlstd{}\hlsym{(}\hlstd{}\hlkwa{new\ }\hlstd{}\hlkwd{SimpleQuote}\hlstd{}\hlsym{(}\hlstd{d1yQuote}\hlsym{));}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{}\hlslc{//\ swaps}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{boost}\hlsym{::}\hlstd{shared\textunderscore ptr}\hlsym{$<$}\hlstd{Quote}\hlsym{$>$\ }\hlstd{}\hlkwd{s2yRate}\hlstd{}\hlsym{(}\hlstd{}\hlkwa{new\ }\hlstd{}\hlkwd{SimpleQuote}\hlstd{}\hlsym{(}\hlstd{s2yQuote}\hlsym{));}\hspace*{\fill}\\
-\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ }\hlstd{boost}\hlsym{::}\hlstd{shared\textunderscore ptr}\hlsym{$<$}\hlstd{Quote}\hlsym{$>$\ }\hlstd{}\hlkwd{s3yRate}\hlstd{}\hlsym{(}\hlstd{}\hlkwa{new\ }\hlstd{}\hlkwd{SimpleQuote}\hlstd{}\hlsym{(}\hlstd{s3yQuote}\hlsym{));}\hspace*{\fill}\\
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/rquantlib -r 210


More information about the Rquantlib-commits mailing list