Reference for parameters when constructing a bond
None
an int value
0 | Actual360 |
1 | Actual365Fixed |
2 | ActualActual (NB: soft deprecated, defaults to ActualActual.ISDA) |
3 | ActualBusiness252 |
4 | OneDayCounter |
5 | SimpleDayCounter |
6 | Thirty360 (NB: soft deprecated, defaults to Thirty360.BondBasis) |
7 | Actual365Fixed.NoLeap (NB: Actual365NoLeap if QuantLib version < 1.16) |
8 | ActualActual.ISMA |
9 | ActualActual.Bond |
10 | ActualActual.ISDA |
11 | ActualActual.Historical |
12 | ActualActual.AFB |
13 | ActualActual.Euro |
14 | Thirty360.USA |
15 | Thirty360.BondBasis |
16 | Thirty360.European |
17 | Thirty360.EurobondBasis |
18 | Thirty360.Italian |
19 | Thirty360.German |
an int value
0 | Following |
1 | ModifiedFollowing |
2 | Preceding |
3 | ModifiedPreceding |
4 | Unadjusted |
5 | HalfMonthModifiedFollowing |
6 | Nearest |
anything else | Unadjusted |
an int value
0 | Simple |
1 | Compounded |
2 | Continuous |
3 | SimpleThenCompounded |
an int value
-1 | NoFrequency |
0 | Once |
1 | Annual |
2 | Semiannual |
3 | EveryFourthMonth |
4 | Quarterly |
6 | BiMonthtly |
12 | Monthly |
13 | EveryFourthWeek |
26 | BiWeekly |
52 | Weekly |
365 | Daily |
anything else | OtherFrequency |
an int value to specify date generation rule
0 | Backward |
1 | Forward |
2 | Zero |
3 | ThirdWednesday |
4 | Twentieth |
5 | TwentiethIMM |
6 | OldCDS |
7 | CDS |
anything else | TwentiethIMM |
an int value to specify duration type
0 | Simple |
1 | Macaulay |
2 | Modified |
Khanh Nguyen knguyen@cs.umb.edu
Please see any decent Finance textbook for background reading, and the
QuantLib
documentation for details on the QuantLib
implementation, particularly the datetime classes.
https://www.quantlib.org/ for details on QuantLib
.