示例#1
0
    public override double payoff(double S1, double S2)
    {
        if (w == 1)                     // Best
        {
            return(Comparisons.Max(S1, S2, K));
        }

        return(Comparisons.Min(S1, S2, K));
    }
示例#2
0
    public override double payoff(double S1, double S2)
    {
        if (type == 1)                  // Comparisons.Max
        {
            return(Comparisons.Max(w * Comparisons.Max(S1, S2) - w * K, 0.0));
        }

        return(Comparisons.Max(w * Comparisons.Min(S1, S2) - w * K, 0.0));
    }
示例#3
0
 public override double payoff(double S1, double S2)
 {
     return(Comparisons.Max(S1 - S2, 0.0));              // a1S1 - a2S2 in general
 }
示例#4
0
    public override double payoff(double S1, double S2)
    {
        double min = Comparisons.Min(S1, S2);

        return(Comparisons.Max(w * (n1 * S1 + n2 * S2 - K), 0.0));
    }
示例#5
0
    public override double payoff(double S1, double S2)
    {
        double max = Comparisons.Max(S1, S2);

        return(Comparisons.Max(w * (max - K), 0.0));
    }
示例#6
0
 public override double payoff(double S1, double S2)
 {
     return(Comparisons.Max(w * ((I1 / S1) - (I2 / S2)) - w * K, 0.0));
 }
示例#7
0
 public override double payoff(double S1, double S2)
 {
     return(Comparisons.Max(w1 * (S1 - K1), w2 * (S2 - K2), 0.0));
 }
示例#8
0
    public override double payoff(double S1, double S2)
    {
        double sum = a * S1 + b * S2;

        return(Comparisons.Max(w * (sum - K), 0.0));
    }
示例#9
0
 public override double payoff(double S1, double S2)
 {
     return(fer * Comparisons.Max(w * S1 - w * Kf, 0.0));
 }