You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
(60) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(18) |
Feb
(4) |
Mar
(6) |
Apr
(2) |
May
|
Jun
(12) |
Jul
(48) |
Aug
(6) |
Sep
(3) |
Oct
(24) |
Nov
(15) |
Dec
(18) |
| 2002 |
Jan
(39) |
Feb
(12) |
Mar
(80) |
Apr
(72) |
May
(46) |
Jun
(27) |
Jul
(23) |
Aug
(34) |
Sep
(65) |
Oct
(71) |
Nov
(19) |
Dec
(14) |
| 2003 |
Jan
(44) |
Feb
(59) |
Mar
(18) |
Apr
(62) |
May
(54) |
Jun
(27) |
Jul
(46) |
Aug
(15) |
Sep
(44) |
Oct
(36) |
Nov
(19) |
Dec
(12) |
| 2004 |
Jan
(26) |
Feb
(33) |
Mar
(47) |
Apr
(63) |
May
(36) |
Jun
(65) |
Jul
(80) |
Aug
(163) |
Sep
(65) |
Oct
(39) |
Nov
(36) |
Dec
(39) |
| 2005 |
Jan
(97) |
Feb
(78) |
Mar
(64) |
Apr
(64) |
May
(48) |
Jun
(55) |
Jul
(89) |
Aug
(57) |
Sep
(51) |
Oct
(111) |
Nov
(86) |
Dec
(76) |
| 2006 |
Jan
(84) |
Feb
(103) |
Mar
(143) |
Apr
(92) |
May
(55) |
Jun
(58) |
Jul
(71) |
Aug
(57) |
Sep
(74) |
Oct
(59) |
Nov
(8) |
Dec
(32) |
| 2007 |
Jan
(60) |
Feb
(40) |
Mar
(50) |
Apr
(26) |
May
(61) |
Jun
(120) |
Jul
(119) |
Aug
(48) |
Sep
(121) |
Oct
(66) |
Nov
(103) |
Dec
(43) |
| 2008 |
Jan
(60) |
Feb
(109) |
Mar
(92) |
Apr
(106) |
May
(82) |
Jun
(59) |
Jul
(67) |
Aug
(118) |
Sep
(131) |
Oct
(56) |
Nov
(37) |
Dec
(69) |
| 2009 |
Jan
(75) |
Feb
(76) |
Mar
(103) |
Apr
(78) |
May
(61) |
Jun
(35) |
Jul
(66) |
Aug
(69) |
Sep
(166) |
Oct
(46) |
Nov
(72) |
Dec
(65) |
| 2010 |
Jan
(48) |
Feb
(57) |
Mar
(93) |
Apr
(85) |
May
(123) |
Jun
(82) |
Jul
(98) |
Aug
(121) |
Sep
(146) |
Oct
(86) |
Nov
(72) |
Dec
(34) |
| 2011 |
Jan
(96) |
Feb
(55) |
Mar
(73) |
Apr
(57) |
May
(33) |
Jun
(74) |
Jul
(89) |
Aug
(71) |
Sep
(103) |
Oct
(76) |
Nov
(52) |
Dec
(61) |
| 2012 |
Jan
(48) |
Feb
(54) |
Mar
(78) |
Apr
(60) |
May
(75) |
Jun
(59) |
Jul
(33) |
Aug
(66) |
Sep
(43) |
Oct
(46) |
Nov
(75) |
Dec
(51) |
| 2013 |
Jan
(112) |
Feb
(72) |
Mar
(49) |
Apr
(48) |
May
(42) |
Jun
(44) |
Jul
(80) |
Aug
(19) |
Sep
(33) |
Oct
(37) |
Nov
(38) |
Dec
(98) |
| 2014 |
Jan
(113) |
Feb
(93) |
Mar
(49) |
Apr
(106) |
May
(97) |
Jun
(155) |
Jul
(87) |
Aug
(127) |
Sep
(85) |
Oct
(48) |
Nov
(41) |
Dec
(37) |
| 2015 |
Jan
(34) |
Feb
(50) |
Mar
(104) |
Apr
(80) |
May
(82) |
Jun
(66) |
Jul
(41) |
Aug
(84) |
Sep
(37) |
Oct
(65) |
Nov
(83) |
Dec
(52) |
| 2016 |
Jan
(68) |
Feb
(35) |
Mar
(42) |
Apr
(35) |
May
(54) |
Jun
(75) |
Jul
(45) |
Aug
(52) |
Sep
(60) |
Oct
(52) |
Nov
(36) |
Dec
(64) |
| 2017 |
Jan
(92) |
Feb
(59) |
Mar
(35) |
Apr
(53) |
May
(83) |
Jun
(43) |
Jul
(65) |
Aug
(68) |
Sep
(46) |
Oct
(75) |
Nov
(40) |
Dec
(49) |
| 2018 |
Jan
(68) |
Feb
(54) |
Mar
(48) |
Apr
(58) |
May
(51) |
Jun
(44) |
Jul
(40) |
Aug
(68) |
Sep
(35) |
Oct
(15) |
Nov
(7) |
Dec
(37) |
| 2019 |
Jan
(43) |
Feb
(7) |
Mar
(22) |
Apr
(21) |
May
(31) |
Jun
(39) |
Jul
(73) |
Aug
(45) |
Sep
(47) |
Oct
(89) |
Nov
(19) |
Dec
(69) |
| 2020 |
Jan
(52) |
Feb
(63) |
Mar
(45) |
Apr
(59) |
May
(42) |
Jun
(57) |
Jul
(30) |
Aug
(29) |
Sep
(75) |
Oct
(64) |
Nov
(96) |
Dec
(22) |
| 2021 |
Jan
(14) |
Feb
(24) |
Mar
(35) |
Apr
(58) |
May
(36) |
Jun
(15) |
Jul
(18) |
Aug
(31) |
Sep
(30) |
Oct
(33) |
Nov
(27) |
Dec
(16) |
| 2022 |
Jan
(35) |
Feb
(22) |
Mar
(14) |
Apr
(20) |
May
(44) |
Jun
(53) |
Jul
(25) |
Aug
(56) |
Sep
(11) |
Oct
(47) |
Nov
(22) |
Dec
(36) |
| 2023 |
Jan
(30) |
Feb
(17) |
Mar
(31) |
Apr
(48) |
May
(31) |
Jun
(7) |
Jul
(25) |
Aug
(26) |
Sep
(61) |
Oct
(66) |
Nov
(19) |
Dec
(21) |
| 2024 |
Jan
(37) |
Feb
(29) |
Mar
(26) |
Apr
(26) |
May
(34) |
Jun
(9) |
Jul
(27) |
Aug
(13) |
Sep
(15) |
Oct
(25) |
Nov
(13) |
Dec
(8) |
| 2025 |
Jan
(13) |
Feb
(1) |
Mar
(16) |
Apr
(17) |
May
(8) |
Jun
(6) |
Jul
(9) |
Aug
|
Sep
(6) |
Oct
(15) |
Nov
(6) |
Dec
|
| 2026 |
Jan
(6) |
Feb
(4) |
Mar
(20) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Marcin R. <mry...@gm...> - 2023-09-07 15:55:57
|
Hi Jonathan, I think that, at the moment, the library only offers flat forward extrapolation. However, you could use the following workaround: 1) Build the curve, based on the original input rates, using linear log-discount interpolation without enabling the extrapolation 2) Retrieve the nodes of the curve, which I assume will be (in Python) a list of tuples with dates and discount factors 2) From this curve calculate a zero rate for the last node: last_zero_rate = crv.zeroRate(crv.maxTime(), ql.Continuous).rate() 3) Calculate a discount factor for the very last QuantLib date: max_dt = ql. Date.maxDate() By taking the exponent of the year fraction from the reference date to max date, times last zero rate and times -1. And append the nodes with this last tuple (date and discount factor) 4) Reconstruct the curve using ql.DiscountCurve(dates, discounts, day_counter) and enable extrapolation. I think this should give the outcome you're looking for. Please note that the above approach will only work for linear schemes. Applying it with e.g. cubic splines will lead to a different solution of the tridiagonal system, and the resulting curves will be slightly different. Another downside is that bumping quote handles to obtain sensitivities will yield incorrect outcomes in the extrapolation region - so instead you would have to rebuild the curve to get the deltas. Hope this helps. Kind regards, Marcin On Thu, 24 Aug 2023 at 15:32, Jonathan George <Jon...@ni...> wrote: > Hi All, > > > > I am hoping that I might be able to get some help from this forum. > > > > Context: > > I am trying to bootstrap a yield curve using piecewise flat forward > interpolation between market obtained rates. Here is my output: > > > > > > I am using python and my curve construction is quite straight forward with > extrapolation enabled(I understand I am committing the cardinal sin by not > posting my code, but hoping that this is theoretical enough a question for > a straight forward answer) > > > > Question: > > Is it possible to fix the final zero rate post maturity of the last bond? > It seems that enableExtrapolation is fixing the final forward rate making > the zero rate decay over time. I am trying to avoid creating a custom > function to return zero and forward rates post maturity of the final bond. > > I have tried create two curves (a linear flat forward curve and a regular > flat forward curve) and combining using CompositeZeroYieldStructure however > I’m not sure which binary function to pass into the function. > > > > Any help would be appreciated. > > Regards > > Jonathan George > Quantitative Developer > > T: > +27 21 901 1363 <+27%2021%20901%201363> > > 36 Hans Strijdom Avenue > Foreshore, Cape Town, 8001 > www.ninetyone.com | <http://ninetyone.com/> > <https://www.linkedin.com/company/ninetyone/> > Follow us <https://www.linkedin.com/company/ninetyone> > <https://ninetyone.com/> > > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Steve H. <war...@gm...> - 2023-09-07 14:58:32
|
Hi Michael, Your bond’s maturity,2031/2/1, is beyond the curve horizon, 5yr, which is around 2028/6/9. Try to give a longer curve to cover bond length or enable extrapolation for sofrCurve. Best, Steve On Thu, Sep 7, 2023 at 10:44 PM Michael (DataDriven portal) < mi...@da...> wrote: > Hi All, > > I am pricing a bond using a SOFR yieldcurve (see code below) but getting *time > is past max curve time *run time error on bond.cleanPrice() function. > When I use a simple (not SOFR) curve (valCurve_test) there is no error. > > I would appreciate any help. > > Thanks, > > Michael > > > *********************************************************************************************************************************** > import QuantLib as ql > today = ql.Date(9,6,2023) > > # Curve > marketQuotes=[['1Y',0.05],['5Y',0.05]] > > # Bond > schedule = ql.Schedule(today, ql.Date(1,ql.February,2031), > ql.Period(ql.Semiannual), ql.UnitedStates(), > ql.ModifiedFollowing, ql.ModifiedFollowing, > ql.DateGeneration.Backward, False) > bond = ql.FixedRateBond(3, 100.0, schedule, [0.03625], ql.Actual360()) > > # OIS Helper > oisHelper = [] > for quote in marketQuotes: > oisHelper.append(ql.OISRateHelper(2, ql.Period(quote[0]), > ql.QuoteHandle(ql.SimpleQuote(quote[1]/100)), ql.Sofr())) > > # Curves Specifications > sofrCurve = ql.PiecewiseLinearZero(2, ql.UnitedStates(), oisHelper, > ql.Actual360()) > valCurve = ql.YieldTermStructureHandle(sofrCurve) > sofrIndex = ql.Sofr(valCurve) > swapEngine = ql.DiscountingSwapEngine(valCurve) > > valCurve_test=ql.YieldTermStructureHandle(ql.FlatForward(2, ql.TARGET(), > 0.10, ql.Actual360())) > > # Price Bond > bond_engine = ql.DiscountingBondEngine(valCurve) > bond.setPricingEngine(bond_engine) > bond_price = bond.cleanPrice() > print(bond_price) > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Michael (D. portal) <mi...@da...> - 2023-09-07 14:42:25
|
Hi All,
I am pricing a bond using a SOFR yieldcurve (see code below) but getting *time
is past max curve time *run time error on bond.cleanPrice() function. When
I use a simple (not SOFR) curve (valCurve_test) there is no error.
I would appreciate any help.
Thanks,
Michael
***********************************************************************************************************************************
import QuantLib as ql
today = ql.Date(9,6,2023)
# Curve
marketQuotes=[['1Y',0.05],['5Y',0.05]]
# Bond
schedule = ql.Schedule(today, ql.Date(1,ql.February,2031),
ql.Period(ql.Semiannual), ql.UnitedStates(),
ql.ModifiedFollowing, ql.ModifiedFollowing,
ql.DateGeneration.Backward, False)
bond = ql.FixedRateBond(3, 100.0, schedule, [0.03625], ql.Actual360())
# OIS Helper
oisHelper = []
for quote in marketQuotes:
oisHelper.append(ql.OISRateHelper(2, ql.Period(quote[0]),
ql.QuoteHandle(ql.SimpleQuote(quote[1]/100)), ql.Sofr()))
# Curves Specifications
sofrCurve = ql.PiecewiseLinearZero(2, ql.UnitedStates(), oisHelper,
ql.Actual360())
valCurve = ql.YieldTermStructureHandle(sofrCurve)
sofrIndex = ql.Sofr(valCurve)
swapEngine = ql.DiscountingSwapEngine(valCurve)
valCurve_test=ql.YieldTermStructureHandle(ql.FlatForward(2, ql.TARGET(),
0.10, ql.Actual360()))
# Price Bond
bond_engine = ql.DiscountingBondEngine(valCurve)
bond.setPricingEngine(bond_engine)
bond_price = bond.cleanPrice()
print(bond_price)
|
|
From: Jonathan S. <sw...@gm...> - 2023-09-07 12:08:07
|
Hi David,
I think what you should do is implement IIDPathGenerator with the same
public interface as PathGenerator but without inheriting from it, and then
define your own MC traits like so:
template <class RNG = PseudoRandom>
struct IIDSingleVariate {
typedef RNG rng_traits;
typedef Path path_type;
typedef PathPricer<path_type> path_pricer_type;
typedef typename RNG::rsg_type rsg_type;
typedef IIDPathGenerator<rsg_type> path_generator_type;
enum { allowsErrorEstimate = RNG::allowsErrorEstimate };
};
Then you can use those traits when setting up the McSimulation like so:
typedef IIDSingleVariate<LowDiscrepancy>::path_generator_type
generator_type;
MonteCarloModel<IIDSingleVariate, LowDiscrepancy>
McSimulation(myPathGenerator, myPathPricer, statisticsAccumulator, false);
I haven't tested this but hope it helps.
On Thu, Aug 31, 2023 at 11:56 PM David Klein <dk...@gm...> wrote:
> I would like to run a MC simulation, something like:
> ext::shared_ptr<StochasticProcess1D> diffusion(new
> GeometricBrownianMotionProcess(1.0, 0.0, sigma_));
> LowDiscrepancy::rsg_type RSG =
> LowDiscrepancy::make_sequence_generator(nTimeSteps, seed);
> typedef SingleVariate<LowDiscrepancy>::path_generator_type
> generator_type;
> ext::shared_ptr<generator_type> myPathGenerator(new
> generator_type(diffusion, T, nTimeSteps, RSG, brownianBridge));
> MonteCarloModel<SingleVariate,
> LowDiscrepancy>McSimulation(myPathGenerator, myPathPricer,
> statisticsAccumulator, false);
> McSimulation.addSamples(nSamples);
>
> But instead of using a GeometricBrownianMotionProcess I just want a simple
> IID process. I managed to fake it out by setting my time steps to be of
> length 1 and then defining a StochasticProcess1D where the drift term is
> drift(t, x) = -x. Ugly kludge.
>
> Instead I tried to define my own IIDPathGenerator as a derived class from
> PathGenerator in a way that would allow me to define IID paths (the term
> "path" is obviously a misnomer in this case). But this doesn't work since
> the "next()" method of PathGenerator isn't virtual, so when I pass it as an
> argument to MCSimulation the base class's "next()" method is called.
>
> Note: I am a total newbie to QuantLib and my C++ is rusty, so please be
> patient...
>
> Thanks,
>
> David Klein
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Jonathan S. <sw...@gm...> - 2023-09-05 12:53:12
|
Hello, 1. Could you provide a bit more info on why you want a path containing a single step? The typical use case for PathGenerator is for many steps, with the value at the first step (i.e. at t_0) being equal to the starting price. Maybe what you're looking for isn't a path, but something else. 2. It might be possible to reimplement the RNG classes using the C++11 standard library <random> header but it's a risky change in my opinion because there might be numerical differences on different platforms, which users could be sensitive to. Also in terms of Boost dependence, the only part of your code snippet that depends on boost is boost::shared_ptr, which should be replaced with QuantLib::ext::shared_ptr. None of the RNG classes in your snippet themselves depend on Boost directly. On Tue, Sep 5, 2023 at 5:53 AM U.Mutlu <um...@mu...> wrote: > Hello, > > I've the following, possibly very old, code for generating GBM values. > It practically requires that nIntervalls_in_t (ie. timeSteps) > must be >= 2 b/c the first generated value always equals the passed > startingPrice. > Is this behavior hardcoded in QuantLib or can this be overridden > via a setting or function call, so that it shall not return always > the startingPrice as the first value : > > 2nd question is: can this code be simplified and modernized by using > C++ methods of C++11, preferably w/o any Boost dependence, for example > using std::normal_distribution instead of the Box-Muller kludge below? > Cf. also the many distribtion types and the RNGs in C++11 at > https://en.cppreference.com/w/cpp/numeric/random > > ... > > // instantiate Geometric Brownian Motion (GBM) stochastic process > const auto& gbm = boost::shared_ptr<StochasticProcess>(new > GeometricBrownianMotionProcess(startingPrice, drift_mu, vola_sigma)); > > // generate sequence of normally distributed random numbers from > uniform > distribution using Box-Muller transformation > BigInteger seed = SeedGenerator::instance().get(); > typedef BoxMullerGaussianRng<MersenneTwisterUniformRng> > MersenneBoxMuller; > MersenneTwisterUniformRng mersenneRng(seed); > MersenneBoxMuller boxMullerRng(mersenneRng); > > RandomSequenceGenerator<MersenneBoxMuller> gsg(nIntervals_in_t, > boxMullerRng); > > // generate simulated path of stock price > PathGenerator<RandomSequenceGenerator<MersenneBoxMuller>> > gbmPathGenerator(gbm, t, nIntervals_in_t, gsg, false); > const Path& samplePath = gbmPathGenerator.next().value; > > for (size_t i = 1; i < nIntervals_in_t; ++i) // skipping 0th elem > as > it's startingPrice > { > const auto Sx = samplePath.at(i); > ... > > > > > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Luigi B. <lui...@gm...> - 2023-09-05 12:47:38
|
Hello,
the first point of the path corresponds to t=0, therefore it contains
the starting price. Passing timeSteps = 1 to the generator should give you
sample paths with 2 points, that is, the starting point and the one after
the time step.
Modernizing the code would be nice, but it must be done without breaking
backward compatibility with the current code (i.e., user code that uses
QuantLib and that compiles today should still compile with the next
version) so it's probably not worth the effort. I'd be happy to be proven
wrong, though.
Hope this helps,
Luigi
On Mon, Sep 4, 2023 at 10:54 PM U.Mutlu <um...@mu...> wrote:
> Hello,
>
> I've the following, possibly very old, code for generating GBM values.
> It practically requires that nIntervalls_in_t (ie. timeSteps)
> must be >= 2 b/c the first generated value always equals the passed
> startingPrice.
> Is this behavior hardcoded in QuantLib or can this be overridden
> via a setting or function call, so that it shall not return always
> the startingPrice as the first value :
>
> 2nd question is: can this code be simplified and modernized by using
> C++ methods of C++11, preferably w/o any Boost dependence, for example
> using std::normal_distribution instead of the Box-Muller kludge below?
> Cf. also the many distribtion types and the RNGs in C++11 at
> https://en.cppreference.com/w/cpp/numeric/random
>
> ...
>
> // instantiate Geometric Brownian Motion (GBM) stochastic process
> const auto& gbm = boost::shared_ptr<StochasticProcess>(new
> GeometricBrownianMotionProcess(startingPrice, drift_mu, vola_sigma));
>
> // generate sequence of normally distributed random numbers from
> uniform
> distribution using Box-Muller transformation
> BigInteger seed = SeedGenerator::instance().get();
> typedef BoxMullerGaussianRng<MersenneTwisterUniformRng>
> MersenneBoxMuller;
> MersenneTwisterUniformRng mersenneRng(seed);
> MersenneBoxMuller boxMullerRng(mersenneRng);
>
> RandomSequenceGenerator<MersenneBoxMuller> gsg(nIntervals_in_t,
> boxMullerRng);
>
> // generate simulated path of stock price
> PathGenerator<RandomSequenceGenerator<MersenneBoxMuller>>
> gbmPathGenerator(gbm, t, nIntervals_in_t, gsg, false);
> const Path& samplePath = gbmPathGenerator.next().value;
>
> for (size_t i = 1; i < nIntervals_in_t; ++i) // skipping 0th elem
> as
> it's startingPrice
> {
> const auto Sx = samplePath.at(i);
> ...
>
>
>
>
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: U.Mutlu <um...@mu...> - 2023-09-04 20:51:13
|
Hello, I've the following, possibly very old, code for generating GBM values. It practically requires that nIntervalls_in_t (ie. timeSteps) must be >= 2 b/c the first generated value always equals the passed startingPrice. Is this behavior hardcoded in QuantLib or can this be overridden via a setting or function call, so that it shall not return always the startingPrice as the first value : 2nd question is: can this code be simplified and modernized by using C++ methods of C++11, preferably w/o any Boost dependence, for example using std::normal_distribution instead of the Box-Muller kludge below? Cf. also the many distribtion types and the RNGs in C++11 at https://en.cppreference.com/w/cpp/numeric/random ... // instantiate Geometric Brownian Motion (GBM) stochastic process const auto& gbm = boost::shared_ptr<StochasticProcess>(new GeometricBrownianMotionProcess(startingPrice, drift_mu, vola_sigma)); // generate sequence of normally distributed random numbers from uniform distribution using Box-Muller transformation BigInteger seed = SeedGenerator::instance().get(); typedef BoxMullerGaussianRng<MersenneTwisterUniformRng> MersenneBoxMuller; MersenneTwisterUniformRng mersenneRng(seed); MersenneBoxMuller boxMullerRng(mersenneRng); RandomSequenceGenerator<MersenneBoxMuller> gsg(nIntervals_in_t, boxMullerRng); // generate simulated path of stock price PathGenerator<RandomSequenceGenerator<MersenneBoxMuller>> gbmPathGenerator(gbm, t, nIntervals_in_t, gsg, false); const Path& samplePath = gbmPathGenerator.next().value; for (size_t i = 1; i < nIntervals_in_t; ++i) // skipping 0th elem as it's startingPrice { const auto Sx = samplePath.at(i); ... |
|
From: David K. <dk...@gm...> - 2023-08-31 14:52:54
|
I would like to run a MC simulation, something like:
ext::shared_ptr<StochasticProcess1D> diffusion(new
GeometricBrownianMotionProcess(1.0, 0.0, sigma_));
LowDiscrepancy::rsg_type RSG =
LowDiscrepancy::make_sequence_generator(nTimeSteps, seed);
typedef SingleVariate<LowDiscrepancy>::path_generator_type
generator_type;
ext::shared_ptr<generator_type> myPathGenerator(new
generator_type(diffusion, T, nTimeSteps, RSG, brownianBridge));
MonteCarloModel<SingleVariate,
LowDiscrepancy>McSimulation(myPathGenerator, myPathPricer,
statisticsAccumulator, false);
McSimulation.addSamples(nSamples);
But instead of using a GeometricBrownianMotionProcess I just want a simple
IID process. I managed to fake it out by setting my time steps to be of
length 1 and then defining a StochasticProcess1D where the drift term is
drift(t, x) = -x. Ugly kludge.
Instead I tried to define my own IIDPathGenerator as a derived class from
PathGenerator in a way that would allow me to define IID paths (the term
"path" is obviously a misnomer in this case). But this doesn't work since
the "next()" method of PathGenerator isn't virtual, so when I pass it as an
argument to MCSimulation the base class's "next()" method is called.
Note: I am a total newbie to QuantLib and my C++ is rusty, so please be
patient...
Thanks,
David Klein
|
|
From: Luigi B. <lui...@gm...> - 2023-08-30 16:34:38
|
That's correct! Those files are the 64-bit versions of QuantLib. You'll need to specify Platform=x64 in your project. Google gives me < https://learn.microsoft.com/en-us/cpp/build/how-to-configure-visual-cpp-projects-to-target-64-bit-platforms?view=msvc-170> or < https://learn.microsoft.com/en-us/visualstudio/ide/how-to-configure-projects-to-target-platforms?view=vs-2022 >. Luigi On Wed, Aug 30, 2023 at 4:28 PM Roberto Santander <rob...@gm...> wrote: > > *Regarding the * > 1>LINK : fatal error LNK1104: cannot open file 'QuantLib-mt-gd.lib' > I searched for the file QuantLib-mt-gd.lib in the directory C:\QuantLib\ > QuantLib-1.31.1 > it has not been generated. > The only file files that appeared on the C:\QuantLib\QuantLib-1.31.1\\lib > are: > QuantLib-x64-mt.lib > QuantLib-x64-mt-gd.lib > QuantLib-x64-mt.pdb > QuantLib-x64-mt-gd.pdb > > Can someone help me to solve this problem? > IDE Microsoft Visual Studio Community 2022 (64-bit) - Current Version > 17.7.2 > > > > > > [image: Mailtrack] > <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&> Remitente > notificado con > Mailtrack > <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&> 30/08/23, > 09:27:46 > > On Mon, Aug 28, 2023 at 12:47 PM Roberto Santander <rob...@gm...> > wrote: > >> lib directory has these two files >> QuantLib-x64-mt.lib >> QuantLib-x64-mt-gd.lib >> >> CONFIGURATION MANAGER WINDOWS >> Active solution configuration: Debug >> Active solution platform: x64 >> >> PROJECT CONTEXTS: >> Project: MyProject >> Configuration: Debug >> Platform: Win32 >> Build: checked >> ____ >> The error might be due to: Platform: Win32 >> how can I switch to x64 ???? >> I have no idea how to make changes: Platform: x64 >> >> I am wondering if I should do a copy-paste-rename of one of those files? >> >> Thanks in advance >> R. >> >> >> >> [image: Mailtrack] >> <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&> Remitente >> notificado con >> Mailtrack >> <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&> 28/08/23, >> 12:46:15 >> >> On Mon, Aug 28, 2023 at 12:27 PM Luigi Ballabio <lui...@gm...> >> wrote: >> >>> Hi Roberto, it's the platform, but add the list in cc, please — I'm not >>> familiar with VC++ configuration but someone on the list might be able to >>> help. >>> >>> On Mon, Aug 28, 2023 at 7:10 PM Roberto Santander < >>> rob...@gm...> wrote: >>> >>>> lib directory has these two files >>>> QuantLib-x64-mt.lib >>>> QuantLib-x64-mt-gd.lib >>>> >>>> CONFIGURATION MANAGER WINDOWS >>>> Active solution configuration: Debug >>>> Active solution platform: x64 >>>> >>>> PROJECT CONTEXTS: >>>> Project: MyProject >>>> Configuration: Debug >>>> Platform: Win32 >>>> Build: checked >>>> ____ >>>> The error might be due to: Platform: Win32 >>>> how can I switch to x64 ???? >>>> I have no idea how to make changes: Platform: x64 >>>> Thanks in advance >>>> R. >>>> >>>> >>>> >>>> >>>> [image: Mailtrack] >>>> <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&> Remitente >>>> notificado con >>>> Mailtrack >>>> <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&> 28/08/23, >>>> 12:08:59 >>>> >>>> On Mon, Aug 28, 2023 at 11:48 AM Luigi Ballabio < >>>> lui...@gm...> wrote: >>>> >>>>> Hello Roberto, >>>>> what do you have in the "lib" folder in QuantLib? I'm guessing >>>>> "QuantLib-x64-mt-gd.lib" and "QuantLib-x64-mt.lib"? If so, you compiled >>>>> QuantLib in 64-bit mode as you wanted, but it looks like your project is >>>>> looking for the 32-bit version. I haven't used VC++ in a while, but you >>>>> should fiddle with the project settings and make sure that 64-bit mode is >>>>> enabled. >>>>> >>>>> Hope this helps, >>>>> Luigi >>>>> >>>>> >>>>> On Mon, Aug 28, 2023 at 6:02 PM Roberto Santander < >>>>> rob...@gm...> wrote: >>>>> >>>>>> Hi Luigi >>>>>> >>>>>> I just successfully installed the latest versión of Quantlib 1.31.1 >>>>>> and Boost 1.83.0 >>>>>> >>>>>> I followed all the instructions: first realease and then debug mode >>>>>> was also generated. >>>>>> >>>>>> I have exactly this issue going on >>>>>> >>>>>> >>>>>> https://quantlib-users.narkive.com/s1cglhvV/some-big-picture-issues-and-cannot-open-file-quantlib-vc90-mt-gd-lib >>>>>> >>>>>> Could you please tell me how to synchronize them? I want to execute >>>>>> it on DEBUG mode / 64 bits >>>>>> >>>>>> >>>>>> This is the error message I am getting: >>>>>> >>>>>> 1>LINK : fatal error LNK1104: cannot open file 'QuantLib-mt-gd.lib' >>>>>> >>>>>> >>>>>> Thanks in advance >>>>>> >>>>>> ps: >>>>>> >>>>>> MS Visual Studio Community 2022 64 bits V17_7.2 @ -toolSet(v143) >>>>>> >>>>>> >>>>>> >>>>>> [image: Mailtrack] >>>>>> <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&> Remitente >>>>>> notificado con >>>>>> Mailtrack >>>>>> <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&> 28/08/23, >>>>>> 10:56:39 >>>>>> _______________________________________________ >>>>>> QuantLib-users mailing list >>>>>> Qua...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>>>>> >>>>> |
|
From: Roberto S. <rob...@gm...> - 2023-08-30 14:28:56
|
*Regarding the * 1>LINK : fatal error LNK1104: cannot open file 'QuantLib-mt-gd.lib' I searched for the file QuantLib-mt-gd.lib in the directory C:\QuantLib\ QuantLib-1.31.1 it has not been generated. The only file files that appeared on the C:\QuantLib\QuantLib-1.31.1\\lib are: QuantLib-x64-mt.lib QuantLib-x64-mt-gd.lib QuantLib-x64-mt.pdb QuantLib-x64-mt-gd.pdb Can someone help me to solve this problem? IDE Microsoft Visual Studio Community 2022 (64-bit) - Current Version 17.7.2 [image: Mailtrack] <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&> Remitente notificado con Mailtrack <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&> 30/08/23, 09:27:46 On Mon, Aug 28, 2023 at 12:47 PM Roberto Santander <rob...@gm...> wrote: > lib directory has these two files > QuantLib-x64-mt.lib > QuantLib-x64-mt-gd.lib > > CONFIGURATION MANAGER WINDOWS > Active solution configuration: Debug > Active solution platform: x64 > > PROJECT CONTEXTS: > Project: MyProject > Configuration: Debug > Platform: Win32 > Build: checked > ____ > The error might be due to: Platform: Win32 > how can I switch to x64 ???? > I have no idea how to make changes: Platform: x64 > > I am wondering if I should do a copy-paste-rename of one of those files? > > Thanks in advance > R. > > > > [image: Mailtrack] > <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&> Remitente > notificado con > Mailtrack > <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&> 28/08/23, > 12:46:15 > > On Mon, Aug 28, 2023 at 12:27 PM Luigi Ballabio <lui...@gm...> > wrote: > >> Hi Roberto, it's the platform, but add the list in cc, please — I'm not >> familiar with VC++ configuration but someone on the list might be able to >> help. >> >> On Mon, Aug 28, 2023 at 7:10 PM Roberto Santander <rob...@gm...> >> wrote: >> >>> lib directory has these two files >>> QuantLib-x64-mt.lib >>> QuantLib-x64-mt-gd.lib >>> >>> CONFIGURATION MANAGER WINDOWS >>> Active solution configuration: Debug >>> Active solution platform: x64 >>> >>> PROJECT CONTEXTS: >>> Project: MyProject >>> Configuration: Debug >>> Platform: Win32 >>> Build: checked >>> ____ >>> The error might be due to: Platform: Win32 >>> how can I switch to x64 ???? >>> I have no idea how to make changes: Platform: x64 >>> Thanks in advance >>> R. >>> >>> >>> >>> >>> [image: Mailtrack] >>> <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&> Remitente >>> notificado con >>> Mailtrack >>> <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&> 28/08/23, >>> 12:08:59 >>> >>> On Mon, Aug 28, 2023 at 11:48 AM Luigi Ballabio < >>> lui...@gm...> wrote: >>> >>>> Hello Roberto, >>>> what do you have in the "lib" folder in QuantLib? I'm guessing >>>> "QuantLib-x64-mt-gd.lib" and "QuantLib-x64-mt.lib"? If so, you compiled >>>> QuantLib in 64-bit mode as you wanted, but it looks like your project is >>>> looking for the 32-bit version. I haven't used VC++ in a while, but you >>>> should fiddle with the project settings and make sure that 64-bit mode is >>>> enabled. >>>> >>>> Hope this helps, >>>> Luigi >>>> >>>> >>>> On Mon, Aug 28, 2023 at 6:02 PM Roberto Santander < >>>> rob...@gm...> wrote: >>>> >>>>> Hi Luigi >>>>> >>>>> I just successfully installed the latest versión of Quantlib 1.31.1 >>>>> and Boost 1.83.0 >>>>> >>>>> I followed all the instructions: first realease and then debug mode >>>>> was also generated. >>>>> >>>>> I have exactly this issue going on >>>>> >>>>> >>>>> https://quantlib-users.narkive.com/s1cglhvV/some-big-picture-issues-and-cannot-open-file-quantlib-vc90-mt-gd-lib >>>>> >>>>> Could you please tell me how to synchronize them? I want to execute >>>>> it on DEBUG mode / 64 bits >>>>> >>>>> >>>>> This is the error message I am getting: >>>>> >>>>> 1>LINK : fatal error LNK1104: cannot open file 'QuantLib-mt-gd.lib' >>>>> >>>>> >>>>> Thanks in advance >>>>> >>>>> ps: >>>>> >>>>> MS Visual Studio Community 2022 64 bits V17_7.2 @ -toolSet(v143) >>>>> >>>>> >>>>> >>>>> [image: Mailtrack] >>>>> <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&> Remitente >>>>> notificado con >>>>> Mailtrack >>>>> <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&> 28/08/23, >>>>> 10:56:39 >>>>> _______________________________________________ >>>>> QuantLib-users mailing list >>>>> Qua...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>>>> >>>> |
|
From: Magnus G. <mag...@ho...> - 2023-08-29 10:49:19
|
Dear all, I am currently using QuantlibXL, the newest version being 1.22, and having some issues with seasonality. I`ve attempted to replicated the results I get in excel manually. However, there is one variable which I cannot identify the source to. In MultiplicativePriceSeasonality::seasonalityCorrection, a Rate is passed as an argument which changes several times (for each date that the seasonality adjustment is expected, say monthly, when utilising breakpoints in the code) without me identifying a pattern. Does anyone know why this rate is added? Is it perhaps an adjustment to remove a trend in the underlying CPI index? Kind Regards, Magnus |
|
From: Roberto S. <rob...@gm...> - 2023-08-28 17:48:09
|
lib directory has these two files QuantLib-x64-mt.lib QuantLib-x64-mt-gd.lib CONFIGURATION MANAGER WINDOWS Active solution configuration: Debug Active solution platform: x64 PROJECT CONTEXTS: Project: MyProject Configuration: Debug Platform: Win32 Build: checked ____ The error might be due to: Platform: Win32 how can I switch to x64 ???? I have no idea how to make changes: Platform: x64 I am wondering if I should do a copy-paste-rename of one of those files? Thanks in advance R. [image: Mailtrack] <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&> Remitente notificado con Mailtrack <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&> 28/08/23, 12:46:15 On Mon, Aug 28, 2023 at 12:27 PM Luigi Ballabio <lui...@gm...> wrote: > Hi Roberto, it's the platform, but add the list in cc, please — I'm not > familiar with VC++ configuration but someone on the list might be able to > help. > > On Mon, Aug 28, 2023 at 7:10 PM Roberto Santander <rob...@gm...> > wrote: > >> lib directory has these two files >> QuantLib-x64-mt.lib >> QuantLib-x64-mt-gd.lib >> >> CONFIGURATION MANAGER WINDOWS >> Active solution configuration: Debug >> Active solution platform: x64 >> >> PROJECT CONTEXTS: >> Project: MyProject >> Configuration: Debug >> Platform: Win32 >> Build: checked >> ____ >> The error might be due to: Platform: Win32 >> how can I switch to x64 ???? >> I have no idea how to make changes: Platform: x64 >> Thanks in advance >> R. >> >> >> >> >> [image: Mailtrack] >> <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&> Remitente >> notificado con >> Mailtrack >> <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&> 28/08/23, >> 12:08:59 >> >> On Mon, Aug 28, 2023 at 11:48 AM Luigi Ballabio <lui...@gm...> >> wrote: >> >>> Hello Roberto, >>> what do you have in the "lib" folder in QuantLib? I'm guessing >>> "QuantLib-x64-mt-gd.lib" and "QuantLib-x64-mt.lib"? If so, you compiled >>> QuantLib in 64-bit mode as you wanted, but it looks like your project is >>> looking for the 32-bit version. I haven't used VC++ in a while, but you >>> should fiddle with the project settings and make sure that 64-bit mode is >>> enabled. >>> >>> Hope this helps, >>> Luigi >>> >>> >>> On Mon, Aug 28, 2023 at 6:02 PM Roberto Santander < >>> rob...@gm...> wrote: >>> >>>> Hi Luigi >>>> >>>> I just successfully installed the latest versión of Quantlib 1.31.1 >>>> and Boost 1.83.0 >>>> >>>> I followed all the instructions: first realease and then debug mode >>>> was also generated. >>>> >>>> I have exactly this issue going on >>>> >>>> >>>> https://quantlib-users.narkive.com/s1cglhvV/some-big-picture-issues-and-cannot-open-file-quantlib-vc90-mt-gd-lib >>>> >>>> Could you please tell me how to synchronize them? I want to execute it >>>> on DEBUG mode / 64 bits >>>> >>>> >>>> This is the error message I am getting: >>>> >>>> 1>LINK : fatal error LNK1104: cannot open file 'QuantLib-mt-gd.lib' >>>> >>>> >>>> Thanks in advance >>>> >>>> ps: >>>> >>>> MS Visual Studio Community 2022 64 bits V17_7.2 @ -toolSet(v143) >>>> >>>> >>>> >>>> [image: Mailtrack] >>>> <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&> Remitente >>>> notificado con >>>> Mailtrack >>>> <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&> 28/08/23, >>>> 10:56:39 >>>> _______________________________________________ >>>> QuantLib-users mailing list >>>> Qua...@li... >>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>>> >>> |
|
From: Luigi B. <lui...@gm...> - 2023-08-28 16:48:54
|
Hello Roberto,
what do you have in the "lib" folder in QuantLib? I'm guessing
"QuantLib-x64-mt-gd.lib" and "QuantLib-x64-mt.lib"? If so, you compiled
QuantLib in 64-bit mode as you wanted, but it looks like your project is
looking for the 32-bit version. I haven't used VC++ in a while, but you
should fiddle with the project settings and make sure that 64-bit mode is
enabled.
Hope this helps,
Luigi
On Mon, Aug 28, 2023 at 6:02 PM Roberto Santander <rob...@gm...>
wrote:
> Hi Luigi
>
> I just successfully installed the latest versión of Quantlib 1.31.1
> and Boost 1.83.0
>
> I followed all the instructions: first realease and then debug mode was
> also generated.
>
> I have exactly this issue going on
>
>
> https://quantlib-users.narkive.com/s1cglhvV/some-big-picture-issues-and-cannot-open-file-quantlib-vc90-mt-gd-lib
>
> Could you please tell me how to synchronize them? I want to execute it on
> DEBUG mode / 64 bits
>
>
> This is the error message I am getting:
>
> 1>LINK : fatal error LNK1104: cannot open file 'QuantLib-mt-gd.lib'
>
>
> Thanks in advance
>
> ps:
>
> MS Visual Studio Community 2022 64 bits V17_7.2 @ -toolSet(v143)
>
>
>
> [image: Mailtrack]
> <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&> Remitente
> notificado con
> Mailtrack
> <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&> 28/08/23,
> 10:56:39
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Roberto S. <rob...@gm...> - 2023-08-28 15:58:51
|
Hi Luigi I just successfully installed the latest versión of Quantlib 1.31.1 and Boost 1.83.0 I followed all the instructions: first realease and then debug mode was also generated. I have exactly this issue going on https://quantlib-users.narkive.com/s1cglhvV/some-big-picture-issues-and-cannot-open-file-quantlib-vc90-mt-gd-lib Could you please tell me how to synchronize them? I want to execute it on DEBUG mode / 64 bits This is the error message I am getting: 1>LINK : fatal error LNK1104: cannot open file 'QuantLib-mt-gd.lib' Thanks in advance ps: MS Visual Studio Community 2022 64 bits V17_7.2 @ -toolSet(v143) [image: Mailtrack] <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&> Remitente notificado con Mailtrack <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&> 28/08/23, 10:56:39 |
|
From: Jonathan G. <Jon...@ni...> - 2023-08-24 13:29:49
|
Hi All, I am hoping that I might be able to get some help from this forum. Context: I am trying to bootstrap a yield curve using piecewise flat forward interpolation between market obtained rates. Here is my output: [cid:image003.png@01D9D69D.7A43BF10] I am using python and my curve construction is quite straight forward with extrapolation enabled(I understand I am committing the cardinal sin by not posting my code, but hoping that this is theoretical enough a question for a straight forward answer) Question: Is it possible to fix the final zero rate post maturity of the last bond? It seems that enableExtrapolation is fixing the final forward rate making the zero rate decay over time. I am trying to avoid creating a custom function to return zero and forward rates post maturity of the final bond. I have tried create two curves (a linear flat forward curve and a regular flat forward curve) and combining using CompositeZeroYieldStructure however I'm not sure which binary function to pass into the function. Any help would be appreciated. Regards Jonathan George Quantitative Developer T:+27 21 901 1363 36 Hans Strijdom Avenue Foreshore, Cape Town, 8001 www.ninetyone.com | Follow us |
|
From: Mike D. <mik...@gm...> - 2023-08-23 20:29:32
|
Quantlib Cookbook is v nice document. Has some examples of how to bump zero curves etc and you can then use the standard sensitivity methods to separate delta vs gamma pnl if you like… Hope that helps. -Mike On Wed, Aug 23, 2023 at 15:20 Brian Smith <bri...@gm...> wrote: > Hi, > > I am looking for some examples on how can i estimate Gamma sensitivity of > a typical fixed-float Swap w.r.t. zero curve at different tenors. > > Is there any way to estimate the same with Quantlib? > > Any insight/reference will be very helpful. > > Thanks for your time. > > > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Brian S. <bri...@gm...> - 2023-08-23 20:17:17
|
Hi, I am looking for some examples on how can i estimate Gamma sensitivity of a typical fixed-float Swap w.r.t. zero curve at different tenors. Is there any way to estimate the same with Quantlib? Any insight/reference will be very helpful. Thanks for your time. |
|
From: Luigi B. <lui...@gm...> - 2023-08-23 12:22:21
|
That's just for swaptions, unfortunately. There's no Bachelier version of the AnalyticEuropeanEngine for options. Luigi On Wed, Aug 23, 2023 at 1:26 PM Ben Watson <ben...@ma...> wrote: > BachelierSwaptionEngine is on that list > > On Wed, 23 Aug 2023, 6:45 pm André de Boer, <are...@gm...> wrote: > >> Hi Kenji, >> >> I am not expert on this subject, but have you noticed the website: >> https://quantlib-python-docs.readthedocs.io/en/latest/pricing_engines.html >> . >> >> Regards, >> Andre >> >> On Wed, 23 Aug 2023 at 00:35, forward_rate--- via QuantLib-users < >> qua...@li...> wrote: >> >>> Hi All、 >>> >>> >>> I tried to find how to evaluate a listed option of 3m Euribor Futures, >>> >>> such as Call strike 96.00 Expire Sep 19, 2023(Bloomberg ticker: ERU3C 96) >>> >>> using Normal(Bachelier) model. >>> >>> >>> I know the way with lognormal Black model in Python as >>> >>> >>> Engine = ql.AnalyticEuropenaEngine( ql.BlackProcess(...) ) >>> >>> optionOBJECT.setPricingEngine(Engine) >>> >>> >>> But I cannot find the class of the process of Normal(Bachelier) model. >>> >>> >>> Could you suggest any constructors for Normal(Bachelier) model >>> >>> to evaluate the listed Euribor Futures' option? >>> >>> >>> Thanks - Kenji >>> _______________________________________________ >>> QuantLib-users mailing list >>> Qua...@li... >>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>> >> >> >> -- >> Best regards, >> André de Boer >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Ben W. <ben...@ma...> - 2023-08-23 11:23:33
|
BachelierSwaptionEngine is on that list On Wed, 23 Aug 2023, 6:45 pm André de Boer, <are...@gm...> wrote: > Hi Kenji, > > I am not expert on this subject, but have you noticed the website: > https://quantlib-python-docs.readthedocs.io/en/latest/pricing_engines.html > . > > Regards, > Andre > > On Wed, 23 Aug 2023 at 00:35, forward_rate--- via QuantLib-users < > qua...@li...> wrote: > >> Hi All、 >> >> >> I tried to find how to evaluate a listed option of 3m Euribor Futures, >> >> such as Call strike 96.00 Expire Sep 19, 2023(Bloomberg ticker: ERU3C 96) >> >> using Normal(Bachelier) model. >> >> >> I know the way with lognormal Black model in Python as >> >> >> Engine = ql.AnalyticEuropenaEngine( ql.BlackProcess(...) ) >> >> optionOBJECT.setPricingEngine(Engine) >> >> >> But I cannot find the class of the process of Normal(Bachelier) model. >> >> >> Could you suggest any constructors for Normal(Bachelier) model >> >> to evaluate the listed Euribor Futures' option? >> >> >> Thanks - Kenji >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > > > -- > Best regards, > André de Boer > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: André de B. <are...@gm...> - 2023-08-23 08:43:47
|
Hi Kenji, I am not expert on this subject, but have you noticed the website: https://quantlib-python-docs.readthedocs.io/en/latest/pricing_engines.html. Regards, Andre On Wed, 23 Aug 2023 at 00:35, forward_rate--- via QuantLib-users < qua...@li...> wrote: > Hi All、 > > > I tried to find how to evaluate a listed option of 3m Euribor Futures, > > such as Call strike 96.00 Expire Sep 19, 2023(Bloomberg ticker: ERU3C 96) > > using Normal(Bachelier) model. > > > I know the way with lognormal Black model in Python as > > > Engine = ql.AnalyticEuropenaEngine( ql.BlackProcess(...) ) > > optionOBJECT.setPricingEngine(Engine) > > > But I cannot find the class of the process of Normal(Bachelier) model. > > > Could you suggest any constructors for Normal(Bachelier) model > > to evaluate the listed Euribor Futures' option? > > > Thanks - Kenji > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > -- Best regards, André de Boer |
|
From: <for...@ya...> - 2023-08-22 22:31:57
|
* { font-size: 13px; font-family: 'MS Pゴシック', sans-serif;}p, ul, ol, blockquote { margin: 0;}a { color: #0064c8; text-decoration: none;}a:hover { color: #0057af; text-decoration: underline;}a:active { color: #004c98;}
Hi All、
I tried to find how to evaluate a listed option of 3m Euribor Futures,
such as Call strike 96.00 Expire Sep 19, 2023(Bloomberg ticker: ERU3C 96)
using Normal(Bachelier) model.
I know the way with lognormal Black model in Python as
Engine = ql.AnalyticEuropenaEngine( ql.BlackProcess(...) )
optionOBJECT.setPricingEngine(Engine)
But I cannot find the class of the process of Normal(Bachelier) model.
Could you suggest any constructors for Normal(Bachelier) model
to evaluate the listed Euribor Futures' option?
Thanks - Kenji
|
|
From: Ben W. <ben...@ma...> - 2023-08-21 00:32:37
|
You can build bonds from cashflows. I use it to price extendable bonds
def make_frb(self):
self.freq = ql.Period(qq.Frequency.get(self.tenor))
self.fixedDayCount=qq.DayCountBasis.get(self.paymentConvention)
self.bond_cashflows,self.reset_spread,self.reset_index=self.get_coupon_cashflows()
bond=ql.Bond(int(self.settlementDays), self.local_calendar, self.start_date,self.bond_cashflows)
self.accrual_start_date = ql.BondFunctions.accrualStartDate(bond)
return bond
self.start_date,self.bond_cashflows() is a internal function that returns the cashflows
From: Michael (DataDriven portal) <mi...@da...>
Sent: Saturday, August 19, 2023 8:05 PM
To: QuantLib users <qua...@li...>
Subject: [Quantlib-users] Bond With Custom Cashflows
Hi All,
I have a bond with a standard schedule but not standard cash flow dollar amounts that I can define (that doesn't fit any Quantlib standard bond types). Is it possible to create a bond object in Quantlib with these cashflows? For example, start with a fixed rate bond, and then overwrite the cashflow amounts. Or create it any other way?
Thanks!
Michael
|
|
From: Michael (D. portal) <mi...@da...> - 2023-08-19 11:18:21
|
Hi All, I have a bond with a standard schedule but not standard cash flow dollar amounts that I can define (that doesn't fit any Quantlib standard bond types). Is it possible to create a bond object in Quantlib with these cashflows? For example, start with a fixed rate bond, and then overwrite the cashflow amounts. Or create it any other way? Thanks! Michael |
|
From: Peter C. <pca...@gm...> - 2023-08-18 07:15:13
|
I am sorry for the confusion: The equivalence of single period swaption / caplet holds for forward-looking rates only, i.e. the old Ibors and forward looking RFR term rates. For backward looking RFR rates there is no such translation because of the different option exercise date. Thank you Peter On Fri, 18 Aug 2023 at 04:13, Steve Hsieh <war...@gm...> wrote: > > Hi Peter > Thanks for the reply. Sorry, I still don’t get it. Allow me to bother you more. Take an example, the m*n swaption has m-length option tenor, when ITM at expiry we will enter into a n-length swap. So the 2nd ibor caplet can be regarded as an swaption whose option tenor, 3m, and then enter into a swap with 3m swap tenor. > what I am confused is that the caplet on RFR seems not the case, it has overlapping option tenor and swap tenor when map to a single period swaption. > > Do I get anything wrong? > Thank your for the help. > > Regards, > Steve > > On Fri, Aug 18, 2023 at 2:03 AM Peter Caspers <pca...@gm...> wrote: >> >> Hi Steve >> >> the standard 1y cap on RFR has >> >> 0m 3m >> 3m 3m >> 6m 3m >> 9m 3m >> >> caplets. >> >> Best >> Peter >> >> >> Steve Hsieh <war...@gm...> schrieb am Do. 17. Aug. 2023 um 08:30: >>> >>> Hi Peter and Ioannis, >>> I am also interested in this discussion and have one question about the “ swaption exercising into a single-period swap.” I am confused by the option tenor in IBOR and RFR world. >>> >>> 1. In a fixing in advance IBOR world: >>> Take one year cap for example, we only have 3 live caplets since first one is fixing on trade day and actually no volatility at all. Assuming the payment frequency is 3m, then we have: >>> Caplet2=3m*3m swaption >>> Caplet3=6m*3m swaption >>> Caplet4=9m*3m swaption >>> >>> 2. In a fixing in arrear RFR world: >>> we now have 4 caplets, then we have: >>> Caplet1=3m*3m swaption >>> Caplet2=6m*3m swaption >>> Caplet3=9m*3m swaption >>> Caplet4=12m*3m swaption >>> >>> Am I correct? >>> >>> Regards, >>> Steve >>> >>> >>> >>> >>> >>> On Mon, Jul 31, 2023 at 3:24 AM Peter Caspers <pca...@gm...> wrote: >>>> >>>> Hi Ioannis, >>>> >>>> Yes that makes sense to me, a swaption exercising into a single-period >>>> swap is the same as a (single) caplet / floorlet. >>>> >>>> I am just not sure how practical this approach is, it depends on what >>>> exactly you intend to do. >>>> >>>> By the way - you want to make sure that the conventions of the >>>> swaption are set correctly, e.g. the day counter of the fixed leg of >>>> the swap should be the same as on the floating leg to mimic an >>>> optionlet (e.g. A360 for both sides in the EUR case). And the swaption >>>> should be physically settled. >>>> >>>> This also reminds me of extensions for RFR swaptions we did in >>>> ORE-QuantLib, e.g. the ATM rate calculations for swaptions which is >>>> correct here >>>> >>>> https://github.com/OpenSourceRisk/QuantLib/blob/116cf704bf6642de824aff035ce9849e1e621fce/ql/termstructures/volatility/swaption/swaptionvolcube.cpp#L91 >>>> >>>> but not yet in the original QuantLib. We still have to harmonize that stuff. >>>> >>>> Thank you >>>> Peter >>>> >>>> On Thu, 27 Jul 2023 at 21:01, Ioannis Rigopoulos <qua...@de...> wrote: >>>> > >>>> > Thanks Peter for the quick response. >>>> > >>>> > I posed the question because I have received an inquiry from the rates >>>> > option desk of a big Chinese bank, to whom I have already told I am >>>> > using QuantLib and ORE for the analytics part. >>>> > >>>> > Therefore I am really looking forward to any advancement that you could >>>> > possibly make with regard to the SABR calibration in that area. >>>> > >>>> > If you allow me, I would like to draw on to your expertise in this area >>>> > by asking you one quick question: >>>> > >>>> > As you know, both libraries have the ability to use SABR in the context >>>> > of swaptions. Some time ago I had even published the blog >>>> > https://blog.deriscope.com/index.php/en/excel-quantlib-swaption-sabr >>>> > along with a spreadsheet that demonstrates the cubic vol calibration of >>>> > the SABR parameters. Perhaps my thinking is naive, but a capfloor >>>> > consists of optionlets, which in turn are trivial one-period swaptions. >>>> > Since we can imply the optionlet vols by stripping the available >>>> > capfloor market vols, I suspect that we may then treat these implied >>>> > optionlet vols as if they were given swaption vols. Obviously the vols >>>> > manifold in this case will be a surface rather than a cube since all >>>> > swaptions will reference an underlying swap consisting of a single >>>> > period. I am wondering what would happen if I nevertheless run the SABR >>>> > calibration on these swaption vols, just like in the link above. >>>> > >>>> > Do you think such an approach could make sense? >>>> > >>>> > Thanks again for your time and your advice. >>>> > >>>> > Ioannis >>>> > >>>> > On 7/27/2023 9:22 PM, Peter Caspers wrote: >>>> > > Hi Ioannis, >>>> > > >>>> > > I agree with you, SABR is a popular method to model volatility smiles, >>>> > > especially for rates and we should support it for both swaptions and >>>> > > cap / floors. It's on my personal short list for sure (since a while!) >>>> > > and also loosely on the ORE roadmap, clients keep asking for this. >>>> > > >>>> > > Actually, it is kind of supported already in QuantExt because you can >>>> > > use SABRInteprolation with the StrippedOptionletAdapter (the version >>>> > > of this class in QuantExt). I never tried this though, and we don't >>>> > > expose this in the OREData curve builder, for a reason: >>>> > > >>>> > > I think there is more work to do, since when you model a whole cap >>>> > > surface or swaption cube with SABR you want to make sure that the SABR >>>> > > parameters vary smoothly for different expiries (and swap lengths), >>>> > > otherwise your interpolated vols might be useless. >>>> > > >>>> > > We also definitely want to look into arbitrage-free flavours of SABR >>>> > > like we started here >>>> > > >>>> > > https://github.com/OpenSourceRisk/Engine/blob/master/QuantExt/qle/models/normalsabr.hpp#L37 >>>> > > >>>> > > Anyway, we'll keep you posted. >>>> > > >>>> > > Thanks >>>> > > Peter >>>> > > >>>> > > >>>> > > >>>> > > >>>> > > >>>> > > >>>> > > >>>> > > On Thu, 27 Jul 2023 at 15:11, Ioannis Rigopoulos <qua...@de...> wrote: >>>> > >> Hi Peter, >>>> > >> >>>> > >> I am asking you directly regarding my recent QuantLib inquiry below >>>> > >> because I saw your name as being the last contributor to >>>> > >> strippedoptionletadapter.cpp and I have not received any response yet. >>>> > >> >>>> > >> Since you also are an expert in the ORE library, I would also like to >>>> > >> ask you if that library supports the SABR calibration of capfloors. >>>> > >> >>>> > >> Many thanks! >>>> > >> >>>> > >> Ioannis >>>> > >> >>>> > >> On 7/21/2023 9:25 PM, Ioannis Rigopoulos wrote: >>>> > >>> Does anybody know why sabr interpolation of capfloor volatilities >>>> > >>> seems to be unsupported in both quantlib and ore although it is >>>> > >>> apparently common practice in the industry? >>>> > >>> >>>> > >>> More specifically, in strippedoptionletadapter.cpp there is a >>>> > >>> commented out code segment starting with "strikeInterpolations_[i] = >>>> > >>> ext::shared_ptr<SABRInterpolation>(...)". >>>> > >>> >>>> > >>> Does anybody know why this segment has been commented out? >>>> > >>> >>>> > >>> >>>> > >> -- >>>> > >> This email has been checked for viruses by Avast antivirus software. >>>> > >> www.avast.com >>>> > >>>> > -- >>>> > This email has been checked for viruses by Avast antivirus software. >>>> > www.avast.com >>>> >>>> >>>> _______________________________________________ >>>> QuantLib-users mailing list >>>> Qua...@li... >>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users |
|
From: Steve H. <war...@gm...> - 2023-08-18 02:13:44
|
Hi Peter Thanks for the reply. Sorry, I still don’t get it. Allow me to bother you more. Take an example, the m*n swaption has m-length option tenor, when ITM at expiry we will enter into a n-length swap. So the 2nd ibor caplet can be regarded as an swaption whose option tenor, 3m, and then enter into a swap with 3m swap tenor. what I am confused is that the caplet on RFR seems not the case, it has overlapping option tenor and swap tenor when map to a single period swaption. Do I get anything wrong? Thank your for the help. Regards, Steve On Fri, Aug 18, 2023 at 2:03 AM Peter Caspers <pca...@gm...> wrote: > Hi Steve > > the standard 1y cap on RFR has > > 0m 3m > 3m 3m > 6m 3m > 9m 3m > > caplets. > > Best > Peter > > > Steve Hsieh <war...@gm...> schrieb am Do. 17. Aug. 2023 um > 08:30: > >> Hi Peter and Ioannis, >> I am also interested in this discussion and have one question about the “ >> swaption exercising into a single-period swap.” I am confused by the option >> tenor in IBOR and RFR world. >> >> 1. In a fixing in advance IBOR world: >> Take one year cap for example, we only have 3 live caplets since first >> one is fixing on trade day and actually no volatility at all. Assuming the >> payment frequency is 3m, then we have: >> Caplet2=3m*3m swaption >> Caplet3=6m*3m swaption >> Caplet4=9m*3m swaption >> >> 2. In a fixing in arrear RFR world: >> we now have 4 caplets, then we have: >> Caplet1=3m*3m swaption >> Caplet2=6m*3m swaption >> Caplet3=9m*3m swaption >> Caplet4=12m*3m swaption >> >> Am I correct? >> >> Regards, >> Steve >> >> >> >> >> >> On Mon, Jul 31, 2023 at 3:24 AM Peter Caspers <pca...@gm...> >> wrote: >> >>> Hi Ioannis, >>> >>> Yes that makes sense to me, a swaption exercising into a single-period >>> swap is the same as a (single) caplet / floorlet. >>> >>> I am just not sure how practical this approach is, it depends on what >>> exactly you intend to do. >>> >>> By the way - you want to make sure that the conventions of the >>> swaption are set correctly, e.g. the day counter of the fixed leg of >>> the swap should be the same as on the floating leg to mimic an >>> optionlet (e.g. A360 for both sides in the EUR case). And the swaption >>> should be physically settled. >>> >>> This also reminds me of extensions for RFR swaptions we did in >>> ORE-QuantLib, e.g. the ATM rate calculations for swaptions which is >>> correct here >>> >>> >>> https://github.com/OpenSourceRisk/QuantLib/blob/116cf704bf6642de824aff035ce9849e1e621fce/ql/termstructures/volatility/swaption/swaptionvolcube.cpp#L91 >>> >>> but not yet in the original QuantLib. We still have to harmonize that >>> stuff. >>> >>> Thank you >>> Peter >>> >>> On Thu, 27 Jul 2023 at 21:01, Ioannis Rigopoulos <qua...@de...> >>> wrote: >>> > >>> > Thanks Peter for the quick response. >>> > >>> > I posed the question because I have received an inquiry from the rates >>> > option desk of a big Chinese bank, to whom I have already told I am >>> > using QuantLib and ORE for the analytics part. >>> > >>> > Therefore I am really looking forward to any advancement that you could >>> > possibly make with regard to the SABR calibration in that area. >>> > >>> > If you allow me, I would like to draw on to your expertise in this area >>> > by asking you one quick question: >>> > >>> > As you know, both libraries have the ability to use SABR in the context >>> > of swaptions. Some time ago I had even published the blog >>> > https://blog.deriscope.com/index.php/en/excel-quantlib-swaption-sabr >>> > along with a spreadsheet that demonstrates the cubic vol calibration of >>> > the SABR parameters. Perhaps my thinking is naive, but a capfloor >>> > consists of optionlets, which in turn are trivial one-period swaptions. >>> > Since we can imply the optionlet vols by stripping the available >>> > capfloor market vols, I suspect that we may then treat these implied >>> > optionlet vols as if they were given swaption vols. Obviously the vols >>> > manifold in this case will be a surface rather than a cube since all >>> > swaptions will reference an underlying swap consisting of a single >>> > period. I am wondering what would happen if I nevertheless run the SABR >>> > calibration on these swaption vols, just like in the link above. >>> > >>> > Do you think such an approach could make sense? >>> > >>> > Thanks again for your time and your advice. >>> > >>> > Ioannis >>> > >>> > On 7/27/2023 9:22 PM, Peter Caspers wrote: >>> > > Hi Ioannis, >>> > > >>> > > I agree with you, SABR is a popular method to model volatility >>> smiles, >>> > > especially for rates and we should support it for both swaptions and >>> > > cap / floors. It's on my personal short list for sure (since a >>> while!) >>> > > and also loosely on the ORE roadmap, clients keep asking for this. >>> > > >>> > > Actually, it is kind of supported already in QuantExt because you can >>> > > use SABRInteprolation with the StrippedOptionletAdapter (the version >>> > > of this class in QuantExt). I never tried this though, and we don't >>> > > expose this in the OREData curve builder, for a reason: >>> > > >>> > > I think there is more work to do, since when you model a whole cap >>> > > surface or swaption cube with SABR you want to make sure that the >>> SABR >>> > > parameters vary smoothly for different expiries (and swap lengths), >>> > > otherwise your interpolated vols might be useless. >>> > > >>> > > We also definitely want to look into arbitrage-free flavours of SABR >>> > > like we started here >>> > > >>> > > >>> https://github.com/OpenSourceRisk/Engine/blob/master/QuantExt/qle/models/normalsabr.hpp#L37 >>> > > >>> > > Anyway, we'll keep you posted. >>> > > >>> > > Thanks >>> > > Peter >>> > > >>> > > >>> > > >>> > > >>> > > >>> > > >>> > > >>> > > On Thu, 27 Jul 2023 at 15:11, Ioannis Rigopoulos < >>> qua...@de...> wrote: >>> > >> Hi Peter, >>> > >> >>> > >> I am asking you directly regarding my recent QuantLib inquiry below >>> > >> because I saw your name as being the last contributor to >>> > >> strippedoptionletadapter.cpp and I have not received any response >>> yet. >>> > >> >>> > >> Since you also are an expert in the ORE library, I would also like >>> to >>> > >> ask you if that library supports the SABR calibration of capfloors. >>> > >> >>> > >> Many thanks! >>> > >> >>> > >> Ioannis >>> > >> >>> > >> On 7/21/2023 9:25 PM, Ioannis Rigopoulos wrote: >>> > >>> Does anybody know why sabr interpolation of capfloor volatilities >>> > >>> seems to be unsupported in both quantlib and ore although it is >>> > >>> apparently common practice in the industry? >>> > >>> >>> > >>> More specifically, in strippedoptionletadapter.cpp there is a >>> > >>> commented out code segment starting with "strikeInterpolations_[i] >>> = >>> > >>> ext::shared_ptr<SABRInterpolation>(...)". >>> > >>> >>> > >>> Does anybody know why this segment has been commented out? >>> > >>> >>> > >>> >>> > >> -- >>> > >> This email has been checked for viruses by Avast antivirus software. >>> > >> www.avast.com >>> > >>> > -- >>> > This email has been checked for viruses by Avast antivirus software. >>> > www.avast.com >>> >>> >>> _______________________________________________ >>> QuantLib-users mailing list >>> Qua...@li... >>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>> >> |