Class StructuredNotes
java.lang.Object
com.quantfinlib.pricing.StructuredNotes
STRUCTURED NOTES — the retail shelf, priced the only honest way: by
DECOMPOSITION into the vanilla pieces this library already prices.
Every structured product is a bond plus options in a costume; the
costume is what the issuer charges for. Pricing by replication makes
the margin visible, and the tests ARE the decompositions (each note
must equal its replicating portfolio to machine precision).
- Reverse convertible — par bond + fat coupon, but the
investor has SOLD a put struck at K: if S_T < K they receive
shares worth
S_T/Kof par instead of par.value = (par + coupon) * DF(T) - (par/K) * put(K). The "9% coupon" is put premium in disguise — the whole product in one sentence. (The knock-in variant needs a down-and-in put, which this library does not yet price closed-form — stated, not approximated.) - Capital-protected note —
protection * parfloor plusparticipationof the upside:value = protection * par * DF(T) + participation * (par/S0) * call(S0). The issuer's real product decision is the PARTICIPATION RATE the budget affords:participationFor(double, double, double, double, double, double, double, double)inverts the pricing for it — low rates or high vol mean thin participation, which is why these notes flourish when rates are high and die when they are zero. - Discount certificate — buy the underlying at a discount,
give away the upside beyond a cap: the covered call,
value = S * e^{-qT} - call(cap). The discount to spot is exactly the call premium received.
Deltas come from the same decompositions (sum of the pieces'
BlackScholes.delta(com.quantfinlib.pricing.BlackScholes.OptionType, double, double, double, double, double, double) terms), so hedging a note is hedging its
replication — which is literally what the issuer's desk does. Values
are per note of face par (certificate: per unit of
underlying). Issuer margin = issue price minus fair value; this class
computes fair value and leaves the margin arithmetic in plain sight.
Research lane, deterministic.
-
Method Summary
Modifier and TypeMethodDescriptionstatic doublecapitalProtectedNote(double par, double protection, double participation, double spot, double rate, double carry, double vol, double timeYears) Fair value of a capital-protected note:protectionof par floored, plusparticipationof the underlying's upside fromspot.static doublediscountCertificate(double spot, double cap, double rate, double carry, double vol, double timeYears) Fair value per unit of underlying of a discount certificate capped atcap: the covered callS e^{-qT} - call(cap).static doublediscountCertificateDelta(double spot, double cap, double rate, double carry, double vol, double timeYears) Delta of the discount certificate: long stock, short call.static doubleparticipationFor(double par, double protection, double issuePrice, double spot, double rate, double carry, double vol, double timeYears) The participation rate a given ISSUE PRICE affords:(issuePrice - protection * par * DF) / ((par/S0) * call).static doublereverseConvertible(double par, double couponRate, double spot, double strike, double rate, double carry, double vol, double timeYears) Fair value of a vanilla reverse convertible of facepar.static doublereverseConvertibleDelta(double par, double spot, double strike, double rate, double carry, double vol, double timeYears) Delta of the reverse convertible: short put makes the holder LONG the stock.
-
Method Details
-
reverseConvertible
public static double reverseConvertible(double par, double couponRate, double spot, double strike, double rate, double carry, double vol, double timeYears) Fair value of a vanilla reverse convertible of facepar.- Parameters:
couponRate- total coupon rate for the LIFE of the note (0.09 = 9% paid at maturity with the redemption)strike- the conversion strike K (shares delivered are worthS_T/K * parwhenS_T < K)
-
reverseConvertibleDelta
public static double reverseConvertibleDelta(double par, double spot, double strike, double rate, double carry, double vol, double timeYears) Delta of the reverse convertible: short put makes the holder LONG the stock. -
capitalProtectedNote
public static double capitalProtectedNote(double par, double protection, double participation, double spot, double rate, double carry, double vol, double timeYears) Fair value of a capital-protected note:protectionof par floored, plusparticipationof the underlying's upside fromspot. -
participationFor
public static double participationFor(double par, double protection, double issuePrice, double spot, double rate, double carry, double vol, double timeYears) The participation rate a given ISSUE PRICE affords:(issuePrice - protection * par * DF) / ((par/S0) * call). This is the issuer's product-design equation solved for its one free variable — and the reason zero-rate eras produce notes with embarrassing participation: the bond floor eats the whole budget. -
discountCertificate
public static double discountCertificate(double spot, double cap, double rate, double carry, double vol, double timeYears) Fair value per unit of underlying of a discount certificate capped atcap: the covered callS e^{-qT} - call(cap). -
discountCertificateDelta
public static double discountCertificateDelta(double spot, double cap, double rate, double carry, double vol, double timeYears) Delta of the discount certificate: long stock, short call.
-