Dear All,
I am running the vanilla swap example and the build was fine.
I have few questions regarding the output :
Date | 3-Month Forward rates | zero rates | Discount factors
attached the swap valuation file Regards, ------------------------------------------------------------------------------ LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users USDSwapValuation.cpp (54K) Download Attachment |
Hello Lawrence,
to get discount factors, zero rates and forward rates you can use, for instance, DayCounter dc = depoFutSwapTermStructure->dayCounter(); depoFutSwapTermStructure->discount(d); depoFutSwapTermStructure->zeroRate(d, dc, Continuous); // or Simple depoFutSwapTermStructure->forwardRate(d1, d2, dc, Simple); for any given date d (or any pair d1,d2 for forwards). If you want to know what dates the curve is using internally to interpolate, call depoFutSwapTermStructure->nodes(). As for writing to text: I'm not familiar with boost_archive_text, but what's wrong with simply writing to an ofstream? Finally: for the simulation, you'll have to use the market model in ql/models/marketmodels. But it's been a long time since I last used it, so I'll let someone else step in to answer. Luigi On Thu, Sep 19, 2013 at 4:04 PM, Lawrence Habahbeh <[hidden email]> wrote: > Dear All, > > I am running the vanilla swap example and the build was fine. > > > I have few questions regarding the output : > > how to get the Yield Curve::( Forward rates ,and the discount factors with > associated dates as output ) > > Date | 3-Month Forward rates | zero rates | Discount factors > > > > Would like to use the Bootstrapped curve,and generate 10,000 scenarios and > then reprice my swap of the simulated curves,total MtM are # of > paths(10,000)* # time steps per year (in this case quarterly)= 40,000 MtM's > > > I Tried using boost_archive_text to write output to text,but to no > avail,how to achieve writing to text ? > > > attached the swap valuation file > > > Regards, > > > ------------------------------------------------------------------------------ > LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! > 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint > 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack > includes > Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. > http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk > _______________________________________________ > QuantLib-users mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/quantlib-users > -- <https://implementingquantlib.blogspot.com> <https://twitter.com/lballabio> ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Given a curve, ForwardSpreadedTermstructure returns a new curve such
that the rates returned are equal to the rates returned from the original curve plus a spread. You can instantiate it by passing to its constructor the original curve and a handle containing the spread; see test-suite/termstructures.cpp for an example. Once you have the new curve, you can just use it to price the swap exactly like you used the depo-futures-swap curve; just replace the old one with the new. Luigi On Sat, Sep 28, 2013 at 3:08 PM, Lawrence Habahbeh <[hidden email]> wrote: > Many Thanks Luigi, > > on another note,The class ForwardSpreadedTermstructure ,what is it used for > exactly ? > > and how to use it to add a spread to my original curve,and reprice the swap > using the > class above Forward spreadedtermstructure? > > I have a depoFutSwap curve. > > appreciate your time. > Many Thanks, > > > On 25 September 2013 12:40, Luigi Ballabio <[hidden email]> wrote: >> >> Hello Lawrence, >> to get discount factors, zero rates and forward rates you can use, >> for instance, >> >> DayCounter dc = depoFutSwapTermStructure->dayCounter(); >> depoFutSwapTermStructure->discount(d); >> depoFutSwapTermStructure->zeroRate(d, dc, Continuous); // or Simple >> depoFutSwapTermStructure->forwardRate(d1, d2, dc, Simple); >> >> for any given date d (or any pair d1,d2 for forwards). If you want to >> know what dates the curve is using internally to interpolate, call >> depoFutSwapTermStructure->nodes(). >> >> As for writing to text: I'm not familiar with boost_archive_text, but >> what's wrong with simply writing to an ofstream? >> >> Finally: for the simulation, you'll have to use the market model in >> ql/models/marketmodels. But it's been a long time since I last used >> it, so I'll let someone else step in to answer. >> >> Luigi >> >> >> >> >> >> On Thu, Sep 19, 2013 at 4:04 PM, Lawrence Habahbeh >> <[hidden email]> wrote: >> > Dear All, >> > >> > I am running the vanilla swap example and the build was fine. >> > >> > >> > I have few questions regarding the output : >> > >> > how to get the Yield Curve::( Forward rates ,and the discount factors >> > with >> > associated dates as output ) >> > >> > Date | 3-Month Forward rates | zero rates | Discount factors >> > >> > >> > >> > Would like to use the Bootstrapped curve,and generate 10,000 scenarios >> > and >> > then reprice my swap of the simulated curves,total MtM are # of >> > paths(10,000)* # time steps per year (in this case quarterly)= 40,000 >> > MtM's >> > >> > >> > I Tried using boost_archive_text to write output to text,but to no >> > avail,how to achieve writing to text ? >> > >> > >> > attached the swap valuation file >> > >> > >> > Regards, >> > >> > >> > >> > ------------------------------------------------------------------------------ >> > LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! >> > 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, >> > SharePoint >> > 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack >> > includes >> > Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. >> > >> > http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk >> > _______________________________________________ >> > QuantLib-users mailing list >> > [hidden email] >> > https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > >> >> >> >> -- >> <https://implementingquantlib.blogspot.com> >> <https://twitter.com/lballabio> > > -- <https://implementingquantlib.blogspot.com> <https://twitter.com/lballabio> ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Free forum by Nabble | Edit this page |