// barrier observed continuously or just at maturity (truncated payoff) enum BarrierActive {
Continuous = 0,
Maturity = 1
};
enum ForDom {
Domestic = 0,
Foreign = 1
};
} // namespace types
// binary option cash (domestic) // call - pays 1 if S_T is above strike K // put - pays 1 if S_T is below strike K double bincash(double S, double vol, double rd, double rf, double tau, double K,
types::PutCall pc, types::Greeks greeks);
// binary option asset (foreign) // call - pays S_T if S_T is above strike K // put - pays S_T if S_T is below strike K double binasset(double S, double vol, double rd, double rf, double tau, double K,
types::PutCall pc, types::Greeks greeks);
// vanilla put/call option // call pays (S_T-K)^+ // put pays (K-S_T)^+ // this is the same as: +/- (binasset - K*bincash) double putcall(double S, double vol, double rd, double rf, double tau, double K,
types::PutCall putcall, types::Greeks greeks);
// truncated put/call option, single barrier // need to specify whether it's down-and-out or up-and-out // regular (keeps monotonicity): down-and-out for call, up-and-out for put // reverse (destroys monoton): up-and-out for call, down-and-out for put // call pays (S_T-K)^+ // put pays (K-S_T)^+ double putcalltrunc(double S, double vol, double rd, double rf, double tau, double K, double B,
types::PutCall pc, types::KOType kotype,
types::Greeks greeks);
// wrapper function for put/call option which combines // double/single/no truncation barrier // B1<=0 - assume no lower barrier // B2<=0 - assume no upper barrier double putcalltrunc(double S, double vol, double rd, double rf, double tau, double K, double B1, double B2,
types::PutCall pc, types::Greeks greek);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.