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
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Mike D. <mik...@gm...> - 2021-03-26 02:06:33
|
Hi there. Try using: ql.ActualActual(ql.ActualActual.ISMA) That should work for UST. Best, Mike On Thu, Mar 25, 2021 at 20:42 jian Xu <jia...@gm...> wrote: > Hi, > In QuantLib, given a semi-annual FixedRateBond with 1% coupon, and > Actual/Actual day count convention, the actual coupon payment amount > varies. > > But my understanding is that the DCC only affects the accrual > calculation, not the actual coupon payment amount. Is this correct? > A check on the Bloomberg terminal seems to confirm this, since any > Act/Act bond also shows the coupon amount to be constant. > > So why is QuantLib different from Bloomberg? Which one is correct in > reality? (US bond market). Thank you very much. > > Following is a piece of code to produce the varying coupon in Python: > > import numpy as np > import pandas as pd > import QuantLib as ql > > acc_start = ql.Date(15, 2, 2020) > maturity = ql.Date(15, 2, 2025) > end_of_month = False > calendar = ql.UnitedStates(ql.UnitedStates.GovernmentBond) > period = ql.Period(ql.Semiannual) > accrual_convention = ql.Unadjusted > date_gen_rule = ql.DateGeneration.Backward > > schedule = ql.MakeSchedule(effectiveDate=acc_start, > terminationDate=maturity, > tenor=period, > calendar=calendar, > convention=accrual_convention, > rule=date_gen_rule, > endOfMonth=end_of_month) > > face = 100 > redemption = 100 > issue_date = ql.Date(16, 2, 2020) > day_count = ql.ActualActual() > coupon = 0.01 > days_settle = 2 > payment_convention = ql.ModifiedFollowing > > bond = ql.FixedRateBond(days_settle, face, schedule, [coupon], > day_count, payment_convention, redemption, issue_date) > > Then [(cf.date(), cf.amount()) for cf in bond.cashflows()] shows the > amount is not constant. > > > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: jian Xu <jia...@gm...> - 2021-03-26 01:40:00
|
Hi,
In QuantLib, given a semi-annual FixedRateBond with 1% coupon, and
Actual/Actual day count convention, the actual coupon payment amount
varies.
But my understanding is that the DCC only affects the accrual
calculation, not the actual coupon payment amount. Is this correct?
A check on the Bloomberg terminal seems to confirm this, since any
Act/Act bond also shows the coupon amount to be constant.
So why is QuantLib different from Bloomberg? Which one is correct in
reality? (US bond market). Thank you very much.
Following is a piece of code to produce the varying coupon in Python:
import numpy as np
import pandas as pd
import QuantLib as ql
acc_start = ql.Date(15, 2, 2020)
maturity = ql.Date(15, 2, 2025)
end_of_month = False
calendar = ql.UnitedStates(ql.UnitedStates.GovernmentBond)
period = ql.Period(ql.Semiannual)
accrual_convention = ql.Unadjusted
date_gen_rule = ql.DateGeneration.Backward
schedule = ql.MakeSchedule(effectiveDate=acc_start,
terminationDate=maturity,
tenor=period,
calendar=calendar,
convention=accrual_convention,
rule=date_gen_rule,
endOfMonth=end_of_month)
face = 100
redemption = 100
issue_date = ql.Date(16, 2, 2020)
day_count = ql.ActualActual()
coupon = 0.01
days_settle = 2
payment_convention = ql.ModifiedFollowing
bond = ql.FixedRateBond(days_settle, face, schedule, [coupon],
day_count, payment_convention, redemption, issue_date)
Then [(cf.date(), cf.amount()) for cf in bond.cashflows()] shows the
amount is not constant.
|
|
From: Carl S. <sch...@gm...> - 2021-03-25 17:22:03
|
I've realized I can just convert the spot price to forward and just use the Black model. On Thu, Mar 25, 2021 at 11:43 AM Carl S. <sch...@gm...> wrote: > Hello, > > I cannot find a way to calculate the implied vol of a european option > using Black-Scholes in quantlibXL. Calculating a price given a volatility > is simple, however. It seems possible for Black76 and Black-Bachelier > models. I am trying to avoid writing my own solver. It seems as if the > function to do this is not exposed to quantlibXL. Can anyone help? > > Thanks > |
|
From: Carl S. <sch...@gm...> - 2021-03-25 15:44:07
|
Hello, I cannot find a way to calculate the implied vol of a european option using Black-Scholes in quantlibXL. Calculating a price given a volatility is simple, however. It seems possible for Black76 and Black-Bachelier models. I am trying to avoid writing my own solver. It seems as if the function to do this is not exposed to quantlibXL. Can anyone help? Thanks |
|
From: Pedro S. <ph...@gm...> - 2021-03-24 22:51:53
|
Hello - am trying to price an index CDS option using QuantlibXL. Anyone aware of an existing template sheet or sample formula for creation of CDS and CDS objects? The sample template sheets provided with QuantlibXL do not cover creation of CDS option objects, and the approach used in quantlib python does not exactly apply to quantlibxl. Thanks, Pedro |
|
From: Christofer B. <bog...@gm...> - 2021-03-21 18:46:29
|
Thanks. Do we have any timeline when cap / floor pricing for ON coupons will be available? Also, some workout examples will be super helpful. On Sat, Mar 20, 2021 at 12:55 AM Peter Caspers <pca...@gm...> wrote: > > Hi Christofer, > > we have added a pricer here > > https://github.com/OpenSourceRisk/Engine/blob/master/QuantExt/qle/cashflows/blackovernightindexedcouponpricer.hpp > > inspired by Lyanshenko / Mercurio, Looking forward to backward looking > rates, section 6.3. Currently there are only the old Libor > volatilities available as far as I know. I'd expect that there will be > new volatility quotes in the future and some sort of market formula > that translates those into standard cap prices. Therefore the > implementation should be seen as preliminary and proprietary, there > are other possible approaches. We'll update the method as soon as the > market develops. I should also mention that there is a bug in the > github code, line 70 in the cpp should be > > Real stdDev = sigma * std::sqrt(std::max(fixingStartTime, 0.0) + > std::pow(fixingEndTime - > std::max(fixingStartTime, 0.0), 3.0) / > std::pow(fixingEndTime - > fixingStartTime, 2.0) / 3.0); > > which will be in the next ORE release. We also added daily (or > "local") cap / floor pricing for ON coupons, which will be available > in that release as well. Hope that helps in one way or the other. Any > feedback or discussions around this topic are welcome! > > Thanks > Peter > > On Wed, 17 Mar 2021 at 18:39, Christofer Bogaso > <bog...@gm...> wrote: > > > > Hi, > > > > I am just wondering if there is any implementation to price some > > Interest Rate Caps and Swaptions where payoff is based on Overnight > > rate contrary to present Libor references. > > > > So far I can only see QL implementation based on Libor. > > > > Any reference to OI based pricing would be appreciated. > > > > Thanks and regards, > > > > > > _______________________________________________ > > QuantLib-users mailing list > > Qua...@li... > > https://lists.sourceforge.net/lists/listinfo/quantlib-users |
|
From: Peter C. <pca...@gm...> - 2021-03-19 19:25:25
|
Hi Christofer, we have added a pricer here https://github.com/OpenSourceRisk/Engine/blob/master/QuantExt/qle/cashflows/blackovernightindexedcouponpricer.hpp inspired by Lyanshenko / Mercurio, Looking forward to backward looking rates, section 6.3. Currently there are only the old Libor volatilities available as far as I know. I'd expect that there will be new volatility quotes in the future and some sort of market formula that translates those into standard cap prices. Therefore the implementation should be seen as preliminary and proprietary, there are other possible approaches. We'll update the method as soon as the market develops. I should also mention that there is a bug in the github code, line 70 in the cpp should be Real stdDev = sigma * std::sqrt(std::max(fixingStartTime, 0.0) + std::pow(fixingEndTime - std::max(fixingStartTime, 0.0), 3.0) / std::pow(fixingEndTime - fixingStartTime, 2.0) / 3.0); which will be in the next ORE release. We also added daily (or "local") cap / floor pricing for ON coupons, which will be available in that release as well. Hope that helps in one way or the other. Any feedback or discussions around this topic are welcome! Thanks Peter On Wed, 17 Mar 2021 at 18:39, Christofer Bogaso <bog...@gm...> wrote: > > Hi, > > I am just wondering if there is any implementation to price some > Interest Rate Caps and Swaptions where payoff is based on Overnight > rate contrary to present Libor references. > > So far I can only see QL implementation based on Libor. > > Any reference to OI based pricing would be appreciated. > > Thanks and regards, > > > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users |
|
From: Christofer B. <bog...@gm...> - 2021-03-17 17:38:30
|
Hi, I am just wondering if there is any implementation to price some Interest Rate Caps and Swaptions where payoff is based on Overnight rate contrary to present Libor references. So far I can only see QL implementation based on Libor. Any reference to OI based pricing would be appreciated. Thanks and regards, |
|
From: Prasanna K. <pk...@ku...> - 2021-03-16 20:14:41
|
Hello. Are there any examples which show how to bootstrap the US Treasury yield curve, and then use them to price vanilla options? The following is an example of the US Treasury yield curve. Date 1 Mo 2 Mo 3 Mo 6 Mo 1 Yr 2 Yr 3 Yr 5 Yr 7 Yr 10 Yr 20 Yr 30 Yr 01/02/13 0.07 N/A 0.08 0.12 0.15 0.27 0.37 0.76 1.25 1.86 2.63 3.04 Any guidance would be appreciated. Thanks. |
|
From: Luigi B. <lui...@gm...> - 2021-03-16 13:48:45
|
Hi all,
PSA: I've opened https://github.com/lballabio/QuantLib/issues/1075 for
LIBOR transition. You're all welcome to contribute to the discussion and
the coding.
Luigi
|
|
From: Arkadiy N. <ark...@gm...> - 2021-03-11 17:24:35
|
Thank you for the clarification, that’s exactly what I was looking for - I probably could have looked it up in the code, but I am not particularly efficient in navigating C++ code, so really appreciate your responding quickly! Sent from my iPhone > On Mar 11, 2021, at 4:24 AM, Luigi Ballabio <lui...@gm...> wrote: > > > Hello, > the forwards are instantaneous — meaning they span an infinitesimal time, not 0.001, so you can calculate the 1M and 3M rates as integrals. > For the flat region over 1M, you'll get exp(- rate * 1M) = 1M DF. For the 3M, exp(I) = 3M DF where I is the integral between 0 and 3M; it's the area of the rectangle below the flat part plus the area of the trapezoid below the linear part, so you have simple formulas for both. > > Alternatively, once you bootstrapped the curve, you can ask it the implied deposit rates by calling > > curve->forwardRate(d1, d2, day_count, Simple); > > where d1 is the beginning of the deposit (usually spot, not today), d2 = d1 + 1M or 3M (taking holidays into account), and day_count is the day-count convention of the deposit. > > Hope this helps, > Luigi > > > >> On Wed, Mar 10, 2021 at 4:30 PM Arkadiy Naumov <ark...@gm...> wrote: >> Have a question for the community, which is a bit on obscure side. When using piecewise yield curve with interpolation on forward rates, how should I use instantaneous forward rates to make sure the original instruments (those set up by ratehelpers) are priced accurately? >> >> Here is what I mean: >> >> suppose all I have is two deposit helpers for 1M and 3M and I chose linear interpolation. >> Instantaneous forward rates (which span 0.001 fraction of a year) are flat prior to 1M. If these were daily rates, I would be looking for the rate that satisfies exp(-rate/365)^31 = 1M DF (1M DF is implied by 1M deposit rate). How do I modify this for the instantaneous forward? Is it exp(-rate*0.001)^85 (this is approximate - .001 is about 2.74 times smaller than 1 day of 365-day year) >> >> And then to get the rates filled out between 1M and 3M, is it >> PRODUCT (exp(-(1M_NodeRate + k*n) *0.001)) = 3M DF ? >> >> Where k is the slope (it is linear interpolation after all) and n is the number of times 0.001 fits between 1M and 3M >> >> Which would mean I can calculate k analytically >> >> Thank you in advance! I am going to go ahead and test my theory out anyway, but if it’s incorrect, I need the advice anyway! >> >> Sent from my iPhone >> >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users |
|
From: Luigi B. <lui...@gm...> - 2021-03-11 09:56:01
|
Hello,
it looks like it was only working for Call options. There might have
been more work to do. You're welcome to have a try, but the code as posted
doesn't fit the current architecture; it should be repackaged as a pricing
engine for DividendVanillaOption.
Luigi
On Thu, Mar 11, 2021 at 6:19 AM Prasanna Katta <pk...@ku...>
wrote:
> Luigi,
> Can we add this
> http://quantlib.10058.n7.nabble.com/new-faster-method-to-price-American-option-with-discrete-dividends-td2291.html to
> the current version of QL? I am happy to do the work, if that post
> contains code that will work. Do you remember why that wasn’t added back
> then?
>
> Thanks.
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Luigi B. <lui...@gm...> - 2021-03-11 09:24:22
|
Hello,
the forwards are instantaneous — meaning they span an infinitesimal
time, not 0.001, so you can calculate the 1M and 3M rates as integrals.
For the flat region over 1M, you'll get exp(- rate * 1M) = 1M DF. For the
3M, exp(I) = 3M DF where I is the integral between 0 and 3M; it's the area
of the rectangle below the flat part plus the area of the trapezoid below
the linear part, so you have simple formulas for both.
Alternatively, once you bootstrapped the curve, you can ask it the implied
deposit rates by calling
curve->forwardRate(d1, d2, day_count, Simple);
where d1 is the beginning of the deposit (usually spot, not today), d2 =
d1 + 1M or 3M (taking holidays into account), and day_count is the
day-count convention of the deposit.
Hope this helps,
Luigi
On Wed, Mar 10, 2021 at 4:30 PM Arkadiy Naumov <ark...@gm...>
wrote:
> Have a question for the community, which is a bit on obscure side. When
> using piecewise yield curve with interpolation on forward rates, how should
> I use instantaneous forward rates to make sure the original instruments
> (those set up by ratehelpers) are priced accurately?
>
> Here is what I mean:
>
> suppose all I have is two deposit helpers for 1M and 3M and I chose linear
> interpolation.
> Instantaneous forward rates (which span 0.001 fraction of a year) are flat
> prior to 1M. If these were daily rates, I would be looking for the rate
> that satisfies exp(-rate/365)^31 = 1M DF (1M DF is implied by 1M deposit
> rate). How do I modify this for the instantaneous forward? Is it
> exp(-rate*0.001)^85 (this is approximate - .001 is about 2.74 times smaller
> than 1 day of 365-day year)
>
> And then to get the rates filled out between 1M and 3M, is it
> PRODUCT (exp(-(1M_NodeRate + k*n) *0.001)) = 3M DF ?
>
> Where k is the slope (it is linear interpolation after all) and n is the
> number of times 0.001 fits between 1M and 3M
>
> Which would mean I can calculate k analytically
>
> Thank you in advance! I am going to go ahead and test my theory out
> anyway, but if it’s incorrect, I need the advice anyway!
>
> Sent from my iPhone
>
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Prasanna K. <pk...@ku...> - 2021-03-11 05:16:34
|
Luigi, Can we add this http://quantlib.10058.n7.nabble.com/new-faster-method-to-price-American-option-with-discrete-dividends-td2291.html <http://quantlib.10058.n7.nabble.com/new-faster-method-to-price-American-option-with-discrete-dividends-td2291.html> to the current version of QL? I am happy to do the work, if that post contains code that will work. Do you remember why that wasn’t added back then? Thanks. |
|
From: Luigi B. <lui...@gm...> - 2021-03-10 15:47:18
|
Hello,
the SofrFutureRateHelper class should work.
Luigi
On Sat, Dec 12, 2020 at 8:27 PM Philippe Hatstadt <
phi...@ex...> wrote:
> Is there an existing model to build a swap curve with SOFR futures instead
> of Eurodollar futures? Is the convexity adjustment futures vs forward a
> similar approach? I believe the daily compounding nature of the SOFR
> contract may complicate the approach a bit.
>
> Philippe Hatstadt
>
>
>
> Broker-Dealer services offered through Exos Securities LLC, member of SIPC
> <http://www.sipc.org/> / FINRA <http://www.finra.org/> / BrokerCheck
> <https://brokercheck.finra.org/>/ 2020 Exos, inc. For important
> disclosures, click here
> <https://www.exosfinancial.com/general-disclosures>.
>
>
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Luigi B. <lui...@gm...> - 2021-03-10 15:43:23
|
Hello,
there was a similar discussion in the past because, even for a purely
EQ payoff, the day counters for volatility and risk-free rate might be
different; but I can't find a link now. Anyway, the difference
unfortunately is not handled.
Luigi
On Tue, Mar 2, 2021 at 2:45 PM SX L <han...@ho...> wrote:
> I am not sure if similar questions have been asked before. Say, I have an
> EQ and FX hybrid payoff, and I decide to use MC to price it. How to handle
> the different Vol DCCs for EQ and FX? You know, for certain day, it could
> be a biz day for FX, but holiday for EQ (vol = 0).
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Luigi B. <lui...@gm...> - 2021-03-10 15:29:12
|
Hello,
a series of SimpleCashFlows is a start but requires you to precompute
the amounts. If they're based on fixed- or floating-rate notes, you might
consider using the corresponding classes instead (FixedRateCoupon or
IborCoupon) and offload some of the calculations.
Hope this helps.
Luigi
On Fri, Feb 5, 2021 at 6:54 PM Michael Megliola <mic...@gm...>
wrote:
> Hello,
>
> I am new to QuantLib. I am building a system that prices CLO tranches,
> which produce arbitrary forward cash flows. The tranches are typically
> floating rate notes, although some are fixed-rate notes.
>
> I need to price both types of notes. I viewed the QuantLib videos that
> describe bond pricing (including the dm calc), which all make perfect
> sense... but my cashflows are arbitrary (the tranche balances vary, and do
> not always pay in full).
>
> Is there an appropriate QuantLib class to represent a credit-sensitive
> tranche, or would I simply represent the forward cash flows as a series of
> SimpleCashFlow instances?
>
> I am guessing the answer is here:
> https://quantlib-python-docs.readthedocs.io/en/latest/cashflows.html but
> I do not know quite where to start.
>
> Thanks for any assistance,
>
> -- Michael Megliola
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Arkadiy N. <ark...@gm...> - 2021-03-10 15:28:24
|
Have a question for the community, which is a bit on obscure side. When using piecewise yield curve with interpolation on forward rates, how should I use instantaneous forward rates to make sure the original instruments (those set up by ratehelpers) are priced accurately? Here is what I mean: suppose all I have is two deposit helpers for 1M and 3M and I chose linear interpolation. Instantaneous forward rates (which span 0.001 fraction of a year) are flat prior to 1M. If these were daily rates, I would be looking for the rate that satisfies exp(-rate/365)^31 = 1M DF (1M DF is implied by 1M deposit rate). How do I modify this for the instantaneous forward? Is it exp(-rate*0.001)^85 (this is approximate - .001 is about 2.74 times smaller than 1 day of 365-day year) And then to get the rates filled out between 1M and 3M, is it PRODUCT (exp(-(1M_NodeRate + k*n) *0.001)) = 3M DF ? Where k is the slope (it is linear interpolation after all) and n is the number of times 0.001 fits between 1M and 3M Which would mean I can calculate k analytically Thank you in advance! I am going to go ahead and test my theory out anyway, but if it’s incorrect, I need the advice anyway! Sent from my iPhone |
|
From: Luigi B. <lui...@gm...> - 2021-03-10 15:22:05
|
Hello,
the constructor of FixedRateBond has a "redemption" argument you can
use for that.
Luigi
On Fri, Feb 12, 2021 at 3:23 PM Beau Lescott <le...@gm...> wrote:
> Hi everyone,
>
> I'm new to QL and was wondering if anyone has an off the shelf solution to
> the issue of calculating yield to call with a new redemption price using
> the FixedRateBond? In other words is there a way to give FixedRateBond a
> redemption price other than par?
>
> I can solve my issue by setting up a new bond with CallableFixedRateBond,
> but this seems to overcomplicate the issue.
>
> Thank you,
> Beau Lescott
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Luigi B. <lui...@gm...> - 2021-03-10 12:24:41
|
Hello,
in general you can use the approach described in <
https://www.youtube.com/watch?v=MgUlBB59Ll0&list=PLu_PrO8j6XAvOAlZND9WUPwTHY_GYhJVr&index=4>.
You can perturb your process and reprice (you can use quotes for that, by
the way; there's no need to use three processes). Formulas for second and
third mixed derivatives are, for instance, in the comments of <
http://www.holoborodko.com/pavel/numerical-methods/numerical-derivative/central-differences/
>.
Hope this helps,
Luigi
On Wed, Feb 24, 2021 at 8:14 AM Edward Lang <ed...@ed...> wrote:
> Hi,
>
> I am trying to calculate some of the second and third order greeks using
> QuantLib. At this stage I am maintaining three BlackScholesMertonProcess
> processes (standard; one for increased volatility; one for increased
> underlying price) and using those for some of the functions.
>
> That said, I am struggling with how I can apply this approach to greeks
> such as vomma, speed, color, ultima, etc. Does anyone have any suggestions?
> I also hope the other ones I've got are correct.
>
> # First order
> def delta(self):
> return self._ql_option.delta()
>
> def vega(self):
> return self._ql_option_for_vol_increase.NPV() -
> self._ql_option.NPV()
>
> def theta(self):
> return self._ql_option.theta()
>
> def lambda(self):
> return self._ql_option.delta() * (self._spot.value() /
> self._ql_option.NPV())
>
> def elasticity(self):
> return self.lambda()
>
> # rho: not implemented - not a priority
> # epsilon: not implemented - not a priority
>
> # Second order
> def gamma(self):
> return self._ql_option.gamma()
>
> def vanna(self):
> return self._ql_option_for_vol_increase.delta() -
> self._ql_option.delta()
>
> def charm(self):
> return self._ql_option_for_price_increase.theta() -
> self._ql_option.theta()
>
> # vomma: not implemented
> # veta: not implemented
> # vera: not implemented
>
> # Third order
> # speed: not implemented
>
> def zomma(self):
> return self._ql_option_for_vol_increase.gamma() -
> self._ql_option.gamma()
>
> # color: not implemented
> # ultima: not implemented
>
> Thanks!
>
>
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Luigi B. <lui...@gm...> - 2021-03-10 12:09:21
|
Hello,
I'm afraid there's no automated tool for that. SWIG doesn't generate
bare C code. QuantLibAddin used to have a C output, but I'm not sure it's
still supported, and it added some overhead for serialization etc. You
might have to write the C interfaces manually.
Luigi
On Sun, Feb 14, 2021 at 2:38 PM Moh Amed <ah...@gm...> wrote:
> Hi,
> I'm considering using QuantLib on a Pharo SmallTalk project.
> Pharo has a Foreign Function Interface that allows access to C libraries.
>
> Is anyone aware of smth that exists in the direction of wrapping the
> QuantLib library into C functions?
>
> Any suggestion is welcome.
>
> Thanks
> algo
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: S.J. L. <sjl...@ya...> - 2021-03-04 21:26:33
|
Release copies are working great! Thanks Luigi. SJ Sent from Yahoo Mail for iPhone On Tuesday, March 2, 2021, 11:58 AM, Luigi Ballabio <lui...@gm...> wrote: Hi, the QuantLib-SWIG version in master is not yet up to date with the latest changes in the library's master. For the time being, use the latest released version instead. Luigi On Tue, Mar 2, 2021 at 6:54 PM S.J. Liu via QuantLib-users <qua...@li...> wrote: Quantlib-SWIG make -C Java error: NettingType is not a member of QuantLib::OvernightIndexFuture | | | | | | | | | | | Quantlib-SWIG make -C Java error: NettingType is not a member of QuantLib::OvernightIndexFuture I cloned Quantlib from GitHub, make and install it fine. I also cloned Quantlib-swig. make -C Java or make-C Python get the same error about NettingType not a member of OvernightIndexFuture.( I u... | | | | Hi All, Does anyone have the same problem? I was using the most recent code and trying to build on Linux Ubuntu. Thanks._______________________________________________ QuantLib-users mailing list Qua...@li... https://lists.sourceforge.net/lists/listinfo/quantlib-users |
|
From: Ashwani S. <ash...@gm...> - 2021-03-04 14:01:22
|
Thanks Alix. I saw another post with similar problem this morning which was useful, here is the link <https://quant.stackexchange.com/questions/59269/quantlib-calibrating-hull-white-one-factor-on-negative-interest-rates> Updated the SwaptionHelper as you suggested (code below) and now it works. helper = ql.SwaptionHelper(ql.Period(d.start, ql.Years), ql.Period(d.length, ql.Years), ql.QuoteHandle(ql.SimpleQuote(d.volatility)), ql.USDLibor(ql.Period(3, ql.Months), term_structure), ql.Period('1Y'), ql.Actual360(), ql.Actual360(), term_structure, ql.BlackCalibrationHelper.RelativePriceError, ql.nullDouble(), 1.0, ql.Normal, 0.0, ) On Thu, Mar 4, 2021 at 6:16 AM Alix Lassauzet <ali...@gm...> wrote: > Hi, > > The constructor of a SwaptionHelper object does not look correct to me. > Take a look on the 3 différents ways to instantiate this class: > > C++ > > https://github.com/lballabio/QuantLib/blob/master/ql/models/shortrate/calibrationhelpers/swaptionhelper.hpp > > Swig > > https://github.com/lballabio/QuantLib-SWIG/blob/master/SWIG/calibrationhelpers.i > > Alix > > > Le jeu. 4 mars 2021 à 02:44, Ashwani Singh <ash...@gm...> a > écrit : > >> Looked into archeived messages but couldn't find anything relevant. I am >> trying to calibrate Hull White model using Goutam's code here >> <http://gouthamanbalaraman.com/blog/short-interest-rate-model-calibration-quantlib.html> with >> a tweak that instead of using flatForward term_structure, I am using >> ql.PiecewiseCubicZero(calc_date, bond_helpers, day_count) calibrated to US >> Treasuries. >> >> I suspect the error has to do with negative rates, but here is the piece >> of code which throws an error when I try running it >> >> swaptions = [] >> index = ql.USDLibor(ql.Period(3, ql.Months), term_structure) >> >> # Read US Swaptions vol data >> CalibrationData = namedtuple("CalibrationData", >> "start, length, volatility") >> data = [CalibrationData(1, 5, 0.1148), >> CalibrationData(2, 4, 0.1108), >> CalibrationData(3, 3, 0.1070), >> CalibrationData(4, 2, 0.1021), >> CalibrationData(5, 1, 0.1000 )] >> >> for d in data: >> vol_handle = ql.QuoteHandle(ql.SimpleQuote(d.volatility)) >> helper = ql.SwaptionHelper(ql.Period(d.start, ql.Years), >> ql.Period(d.length, ql.Years), >> vol_handle, >> index, >> index.tenor(), >> day_count, >> day_count, >> term_structure, >> ql.Normal, >> ) >> helper.setPricingEngine(engine) >> swaptions.append(helper) >> >> optimization_method = ql.LevenbergMarquardt(1.0e-8,1.0e-8,1.0e-8) >> end_criteria = ql.EndCriteria(10000, 100, 1e-6, 1e-8, 1e-8) >> model.calibrate(swaptions, optimization_method, end_criteria) >> >> >> ---------------------------------------------------------------------------RuntimeError Traceback (most recent call last)<ipython-input-78-1c3c09dff89b> in <module> 24 model = ql.HullWhite(yield_curve_handle) 25 engine = ql.JamshidianSwaptionEngine(model)---> 26 alpha, sigma = calibrate_hullwhite(yield_curve_handle, engine, model, day_count) 27 28 # Generate HW simulation paths >> <ipython-input-77-cab060688d5e> in calibrate_hullwhite(term_structure, engine, model, day_count) 32 optimization_method = ql.LevenbergMarquardt(1.0e-8,1.0e-8,1.0e-8) 33 end_criteria = ql.EndCriteria(10000, 100, 1e-6, 1e-8, 1e-8)---> 34 model.calibrate(swaptions, optimization_method, end_criteria) 35 36 return model.params() >> ~\AppData\Local\anaconda3\lib\site-packages\quantlib-1.21-py3.8-win-amd64.egg\QuantLib\QuantLib.py in calibrate(self, *args) 11289 > 11291 return _QuantLib.CalibratedModel_calibrate(self, *args) >> >> 11290 def calibrate(self, *args): >> >> 11292 11293 def setParams(self, params): RuntimeError: strike + >> displacement (-0.0114291 + 0) must be non-negative >> >> >> >> Any suggestions would be appreciated. >> >> Thanks. >> >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > |
|
From: Alix L. <ali...@gm...> - 2021-03-04 06:16:41
|
Hi, The constructor of a SwaptionHelper object does not look correct to me. Take a look on the 3 différents ways to instantiate this class: C++ https://github.com/lballabio/QuantLib/blob/master/ql/models/shortrate/calibrationhelpers/swaptionhelper.hpp Swig https://github.com/lballabio/QuantLib-SWIG/blob/master/SWIG/calibrationhelpers.i Alix Le jeu. 4 mars 2021 à 02:44, Ashwani Singh <ash...@gm...> a écrit : > Looked into archeived messages but couldn't find anything relevant. I am > trying to calibrate Hull White model using Goutam's code here > <http://gouthamanbalaraman.com/blog/short-interest-rate-model-calibration-quantlib.html> with > a tweak that instead of using flatForward term_structure, I am using > ql.PiecewiseCubicZero(calc_date, bond_helpers, day_count) calibrated to US > Treasuries. > > I suspect the error has to do with negative rates, but here is the piece > of code which throws an error when I try running it > > swaptions = [] > index = ql.USDLibor(ql.Period(3, ql.Months), term_structure) > > # Read US Swaptions vol data > CalibrationData = namedtuple("CalibrationData", > "start, length, volatility") > data = [CalibrationData(1, 5, 0.1148), > CalibrationData(2, 4, 0.1108), > CalibrationData(3, 3, 0.1070), > CalibrationData(4, 2, 0.1021), > CalibrationData(5, 1, 0.1000 )] > > for d in data: > vol_handle = ql.QuoteHandle(ql.SimpleQuote(d.volatility)) > helper = ql.SwaptionHelper(ql.Period(d.start, ql.Years), > ql.Period(d.length, ql.Years), > vol_handle, > index, > index.tenor(), > day_count, > day_count, > term_structure, > ql.Normal, > ) > helper.setPricingEngine(engine) > swaptions.append(helper) > > optimization_method = ql.LevenbergMarquardt(1.0e-8,1.0e-8,1.0e-8) > end_criteria = ql.EndCriteria(10000, 100, 1e-6, 1e-8, 1e-8) > model.calibrate(swaptions, optimization_method, end_criteria) > > > ---------------------------------------------------------------------------RuntimeError Traceback (most recent call last)<ipython-input-78-1c3c09dff89b> in <module> 24 model = ql.HullWhite(yield_curve_handle) 25 engine = ql.JamshidianSwaptionEngine(model)---> 26 alpha, sigma = calibrate_hullwhite(yield_curve_handle, engine, model, day_count) 27 28 # Generate HW simulation paths > <ipython-input-77-cab060688d5e> in calibrate_hullwhite(term_structure, engine, model, day_count) 32 optimization_method = ql.LevenbergMarquardt(1.0e-8,1.0e-8,1.0e-8) 33 end_criteria = ql.EndCriteria(10000, 100, 1e-6, 1e-8, 1e-8)---> 34 model.calibrate(swaptions, optimization_method, end_criteria) 35 36 return model.params() > ~\AppData\Local\anaconda3\lib\site-packages\quantlib-1.21-py3.8-win-amd64.egg\QuantLib\QuantLib.py in calibrate(self, *args) 11289 > 11291 return _QuantLib.CalibratedModel_calibrate(self, *args) > > 11290 def calibrate(self, *args): > > 11292 11293 def setParams(self, params): RuntimeError: strike + > displacement (-0.0114291 + 0) must be non-negative > > > > Any suggestions would be appreciated. > > Thanks. > > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Ashwani S. <ash...@gm...> - 2021-03-04 01:43:33
|
Looked into archeived messages but couldn't find anything relevant. I am trying to calibrate Hull White model using Goutam's code here <http://gouthamanbalaraman.com/blog/short-interest-rate-model-calibration-quantlib.html> with a tweak that instead of using flatForward term_structure, I am using ql.PiecewiseCubicZero(calc_date, bond_helpers, day_count) calibrated to US Treasuries. I suspect the error has to do with negative rates, but here is the piece of code which throws an error when I try running it swaptions = [] index = ql.USDLibor(ql.Period(3, ql.Months), term_structure) # Read US Swaptions vol data CalibrationData = namedtuple("CalibrationData", "start, length, volatility") data = [CalibrationData(1, 5, 0.1148), CalibrationData(2, 4, 0.1108), CalibrationData(3, 3, 0.1070), CalibrationData(4, 2, 0.1021), CalibrationData(5, 1, 0.1000 )] for d in data: vol_handle = ql.QuoteHandle(ql.SimpleQuote(d.volatility)) helper = ql.SwaptionHelper(ql.Period(d.start, ql.Years), ql.Period(d.length, ql.Years), vol_handle, index, index.tenor(), day_count, day_count, term_structure, ql.Normal, ) helper.setPricingEngine(engine) swaptions.append(helper) optimization_method = ql.LevenbergMarquardt(1.0e-8,1.0e-8,1.0e-8) end_criteria = ql.EndCriteria(10000, 100, 1e-6, 1e-8, 1e-8) model.calibrate(swaptions, optimization_method, end_criteria) ---------------------------------------------------------------------------RuntimeError Traceback (most recent call last)<ipython-input-78-1c3c09dff89b> in <module> 24 model = ql.HullWhite(yield_curve_handle) 25 engine = ql.JamshidianSwaptionEngine(model)---> 26 alpha, sigma = calibrate_hullwhite(yield_curve_handle, engine, model, day_count) 27 28 # Generate HW simulation paths <ipython-input-77-cab060688d5e> in calibrate_hullwhite(term_structure, engine, model, day_count) 32 optimization_method = ql.LevenbergMarquardt(1.0e-8,1.0e-8,1.0e-8) 33 end_criteria = ql.EndCriteria(10000, 100, 1e-6, 1e-8, 1e-8)---> 34 model.calibrate(swaptions, optimization_method, end_criteria) 35 36 return model.params() ~\AppData\Local\anaconda3\lib\site-packages\quantlib-1.21-py3.8-win-amd64.egg\QuantLib\QuantLib.py in calibrate(self, *args) 11289 > 11291 return _QuantLib.CalibratedModel_calibrate(self, *args) 11290 def calibrate(self, *args): 11292 11293 def setParams(self, params): RuntimeError: strike + displacement (-0.0114291 + 0) must be non-negative Any suggestions would be appreciated. Thanks. |